Top
Interstage Big DataComplex Event Processing Server V1.1.0 Developer's Reference
FUJITSU Software

3.3.1 SOAP Adapter

This section explains the SOAP adapter communication method.

3.3.1.1 End Point

A SOAP adapter uses CEP service Web server features to receive event data.


The end point address (URL) is as follows:

http://cepServerHostName/cepEngineNameFrontServerService/SoapReceiverService

Example

If the CEP Server host name is "bdcep", and the CEP engine name is "CEPengine1":

http://bdcep/CEPengine1FrontServerService/SoapReceiverService

3.3.1.2 Send Message

Use HTTP protocol (HTTP binding) to send a SOAP message in which event data is stored to the CEP Server.

Information

The SOAP adapter of BDCEP conforms to SOAP 1.1 specification.

SOAP message

The format of SOAP messages posted to the CEP engine is as follows:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header />

<S:Body>

<a:
notify xmlns:a="http://adapter.front.cep.cspf.fujitsu.com/">
<type>
eventDataFormat</type>
<eventTypeId>
eventTypeID</eventTypeId>
<data>
eventData</data>
</a:
notify>
</S:Body>

</S:Envelope>
SOAP header (S:Header)

Specify a blank element.

SOAP body (S:Body)

Describe the event data information below in the notify element value and specify it in the SOAP body.

Specify "http://adapter.front.cep.cspf.fujitsu.com/" in the xmlns attribute (XML namespace) of the notify element.

Send information

Specification method

Specification example

Event data format

Specify as the type element value

If the event data is in CSV format:

<type>CSV</type>

Event type ID

Specify as the eventTypeId element value

If the event type (development asset ID of the event type definition) is EVENTTYPE_01:

<eventTypeId>EVENTTYPE_01</eventTypeId>

Event data content

Specify as the data element value

<data>MEM0001,1010,1</data>


HTTP request

Specify the CEP engine that posts the event data.

POST path HTTP/version
path

The path part of the end point address.

version

The HTTP protocol version.

Point

BDCEP supports HTTP protocol versions 1.0 and 1.1.

Example

If the CEP engine name is "CEPengine1":

POST /CEPengine1FrontServerService/SoapReceiverService HTTP/1.1

Request header

Specify event data information as follows:

Send information

Specification method

Specification example

Character set

Specify in the Content-Type header

(Can be omitted for UTF-8)

If the event data encoding is Shift JIS:

Content-Type: text/xml; charset=Shift_JIS

Note

If a character set is not specified, the encoding is not converted. Therefore, even if the encoding of the sent event data is not UTF-8, the high-speed filter and complex event processing operate interpreting the input event as being in UTF-8.


Message body

Specify the SOAP message (as above).


Example

The send message for the following scenario is shown below:

  • CEP Server host name: bdcep

  • CEP engine name: CEPengine1

  • Event data format: CSV format

  • Event type ID: EVENTTYPE_01

  • Character set: Shift JIS

    POST /CEPengine1FrontServerService/SoapReceiverService HTTP/1.1
    Host: bdcep

    Content-Type: text/xml; charset=Shift_JIS
    Content-Length:
    nnnn
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header />

    <S:Body>

    <a:notify xmlns:a="http://adapter.front.cep.cspf.fujitsu.com/">
    <type>CSV</type>

    <eventTypeId>EVENTTYPE_01</eventTypeId>
    <data>MEM0001,1010,1</data>

    </a:notify>

    </S:Body>

    </S:Envelope>

3.3.1.3 Response Message

After an HTTP request is sent, a response message (SOAP message) posted from the CEP Server is received.

The HTTP response and the information posted in the message body are shown below.


SOAP message

The format of the SOAP message posted from the CEP engine is shown below.

Note that newlines have been inserted here for this example, but newlines are not inserted in the actual messages.

<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

<S:Body>

<ns2:notifyResponse xmlns:ns2="http://adapter.front.cep.cspf.fujitsu.com/">

<return>
returnMessage</return>
</ns2:notifyResponse>

</S:Body>

</S:Envelope>
returnMessage

This message shows the SOAP adapter processing results.

If processed normally, the message is "Code=0 Message=Message sending is completed normally."


HTTP response

An HTTP response message is posted.

HTTP/version statusCode supplementaryMessage
version

HTTP protocol version.

statusCode

HTTP request result.

supplementaryMessage

Supplementary message in accordance with the status code.

Example

If event data send ended normally:

HTTP/1.1 200 OK

Message body

A SOAP message (as above) is posted.

Point

When an error occurs, a message is output to the syslog and the engine log. Refer to "3.4 Error Processing" for information on error processing.

Various messages, in accordance with the processing result, are as follows:

Processing result

Message (*1)

Normal end

200 OK

Code=0 Message=Sending message completed normally.

None

Format error

The event data format does not exist.

200 OK

Code=-100 Message=Event type format is not defined.

cep10306e: Event Type Format is not defined. EngineId=cepEngineName

Processing result error

Log output processing failed.

200 OK

Code=-200 Message=Logging failed.

cep10401e: The Log was not able to be output. EngineId=cepEngineName, EVENT=receivedEvent, ERRORINFO=internalInformation

Note: Newlines in received events are converted to &#012; before output. If an event exceeds the length that can be output to the syslog, only partial event information is output to the syslog.

Format error

The event type ID does not exist.

200 OK

Code=-300 Message=Event type id is not defined.

cep10305e: Event Type ID is not defined. EngineId=cepEngineName

Format error

A format other than CSV or XML is specified for the event data format.

200 OK

Code=-400 Message=Unknown event format [eventFormat].

cep10114e: Unknown Event format. EngineId=cepEngineName, format=eventFormat

Settings content discrepancy

The event type ID is not known.

200 OK

Code=-500 Message=Unknown event type id [eventType].

cep10108e: Event type is not found. EngineId=cepEngineName, eventType=eventType

Format error

The character set is not known.

415 Unsupported Media Type

None

None

Settings content discrepancy

The event data type does not match the deployed event type definition.

200 OK

Code=-700 Message=It differs from the registered format [eventFormat].

cep10116e: It differs from the registered format. EngineId=cepEngineName, format=eventFormat

Busy status

The CEP Server is temporarily or permanently overloaded.

200 OK

Code=-800 Message=Server is busy now.

cep10301w: FrontServer is busy. Event is aborted. EngineId=cepEngineName

or

cep10302e: FrontServer is continuously busy. Event is aborted. EngineId=cepEngineName

Format error

The event data size exceeds 32,000,000 bytes.

200 OK

Code=-900 Message=Bad Event data size [eventDataSize].

cep10310e: Event Data Size is over. EngineId=cepEngineName, Size=eventDataSize

CEP Server not running

200 OK

Code=-1000 Message=Server is not Running.

cep10300w: FrontServer is not running. Event is aborted. EngineId=cepEngineName

*1: The contents of each row are as follows:

Top row: HTTP status code + supplementary message

Middle row: Return message included in SOAP message (variable information shown in italic)

Bottom row: Message output to syslog and engine log (variable information shown in italic)

3.3.1.4 Notes

This section explains notes related to the use of the SOAP adapter.

Number of simultaneous connections

If multiple event sender applications connect to a SOAP adapter simultaneously, the maximum number of simultaneous connections to the SOAP adapter might be reached. In this case, the suspended status temporarily occurs for subsequent connection requests from event sender applications.

Since the SOAP adapter responds to suspended status connection requests in accordance with the processing of the received event data, no action is required by the event sender application.

Information

The maximum number of simultaneous connections to a SOAP adapter is 50.

Since SOAP adapters and HTTP adapters share use of the Web server features of the CEP Server, the actual number of connections is the combined number of SOAP adapter and HTTP adapter connections.

Communication protocol

The SOAP adapter communication protocols do not support HTTPS (HTTP over SSL/TLS).