This section explains how to develop a collaboration application, as follows:
Develop an application to send events to the CEP engine.
Develop the application according to the type of input adapter to be used.
Refer to Chapter 3, "Input Adapter Reference" in the Developer's Reference for information on sample programs by input adapter type.
Develop a Web service application to be called from the SOAP listener.
This section explains the Web service development procedure.
Create a WSDL.
Create a WSDL (interface definition) for a user-developed Web service from the interface information (Web service URL, namespace, prefix, and method) of the Web service to be called, that was defined in the SOAP listener definition, and from the parameters that are specified in the complex event processing statements (SELECT statements).
Below is an example of the association between the complex event processing statement (SELECT statement) for detecting the target events, the SOAP listener definition associated with that rule, and SOAP messages generated from the SOAP listener.
Figure 5.5 Association between a rule definition, listener definition, and SOAP messages to be sent
A sample WSDL for a Web service for receiving these SOAP messages is shown below. This WSDL defines a message receive-only (one-way) Web service. If it is implemented as a Web service that returns a response to the CEP engine (request-response), the CEP engine ignores this response.
001 | <?xml version='1.0' encoding='UTF-8'?> |
Modifying, as follows, the underlined parts according to a rule definition or SOAP listener definition allows the WSDL above to be used to generate a template of the Web service to be created:
Line numbers 003, 005, and 011
Use the value of the namespace in the SOAP listener definition as the target namespace of the WSDL ("targetNamespace" attribute of the "definitions" element), the declaration of the target namespace prefix ("xmlns:tns" attribute of the "definitions" element), and the target namespace of the XML schema in the WSDL ("targetNamespace" attribute of the "xs:schema" element in the "types" element).
Line numbers 012 and 025
Use the value of the root element in the SOAP listener definition as the name of the root element of messages to be defined in the XML schema in the WSDL ("name" attribute of the "xs:element" element in "xs:schema" element in the "types" element) and the element defined as a message of the WSDL ("element" attribute of the "part" element in the "message" element).
Line numbers 015 and 016
Use the output property name of the complex event processing statement (SELECT statement) as the name of the subelement of the root element to be defined in the XML schema in the WSDL ("name" attribute of the "xs:element" element under the root element definition in the "types" element).
Create as many similar lines as the number of properties to be output. In the example above, this element type ("type" attribute of the "xs:element" element) is specifying a string ("xs:string"). Setting this to suit the property type will, depending on the tool used, generate source code according to the type, so type conversion will no longer be required in the program.
Line number 047
In the final WSDL for service publishing, the actual URL of the service will be entered in the "location" attribute of the "soapbind:address" element under the "service" element, and this will also be the value of the connection URL in the listener definition. However, this connection URL is often unsure at development, so there is no problem with leaving it as in the sample above.
Develop the Web service application.
Based on the created WSDL, output a template for the Web service application from the development tool being used, and then add the application logic to it.
Develop an application to analyze event logs. Develop the application using the Hadoop API. Refer to the Interstage Big Data Parallel Processing Server manuals for details.
Develop a cache access application. Refer to the Interstage eXtreme Transaction Processing Server manuals for details.