Designing Intelligent Event Processor (IEP) Projects

WSDL Documents in IEP Module Projects

When you save an IEP Module project, IEP generates a Web Services Description Language (WSDL) document for each event processor.

The WSDL documents contain the endpoints for the event processors.


Caution – Caution –

Do not edit any section of the generated WSDL other than the following sections:


IEP generates a WSDL document according to specific rules based on the XML Schema (the XSD) that are important to understand. These rules are provided as reference and to enable you to change specific binding components and service engines that can be changed.

The name of the WSDL document is derived from the name of the event processor. For example, if the event processor is called insiderTrade.iep, then the WSDL document is called insiderTrade.wsdl.


Note –

If you subsequently rename the event processor, IEP does not refactor the name of the WSDL document.


The target namespace is a convention of an XML Schema that enables the WSDL document to refer to itself.

In the process of representing the event process in the WSDL document, the name of your event process is concatenated with the string _iep to form the target namespace. For example, if the name of the event process is MyEventProcessor, then the target namespace of the WSDL is MyEventProcessor_iep.


<definitions targetNamespace="MyEventProcessor_iep"
             xmlns:tns="MyEventProcessor_iep"
             xmlns:typens="MyEventProcessor_iep"
             xmlns:defns="MyEventProcessor_iep"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:file="http://schemas.sun.com/jbi/wsdl-extensions/file/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">

Data Types in the WSDL Document

The WSDL document defines XSD types (data types). IEP data types, as observable and editable from the property editor for a specific operator, have their counterparts in XSD data types.

For each operator, IEP generates two XSD elements: a regular message object and a batch message object.

Each XSD element contains the following:

Attributes have specific data types and have their equivalent representation in the XSD.

IEP Data Type  

XSD Data Type  

INTEGER 

int 

BIGINT 

long 

DOUBLE 

double 

VARCHAR 

string 

DATE 

date 

TIMESTAMP 

dateTime 

The following types are based on a simple event process that contains a Stream Input operator and a Stream Output operator.


<types>
   <xsd:schema targetNamespace="MyEventProcessor_iep" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="MyStreamInput_MsgObj">
         <xsd:complexType>
            <xsd:sequence>
               <xsd:element name="AttrInteger" type="xsd:int"/>
               <xsd:element name="AttrBigInt" type="xsd:long"/>
               <xsd:element name="AttrDouble" type="xsd:double"/>
               <xsd:element name="AttrVarchar" type="xsd:string"/>
               <xsd:element name="AttrDate" type="xsd:date"/>
               <xsd:element name="AttrTimestamp" type="xsd:dateTime"/>
            </xsd:sequence>
         </xsd:complexType>
      </xsd:element>
      <xsd:element name="MyStreamInputBatch_MsgObj">
         <xsd:complexType>
            <xsd:sequence>
               <xsd:element name="MyStreamInput_MsgObj" minOccurs="0" 
maxOccurs="unbounded">
                  <xsd:complexType>
                     <xsd:sequence>
               <xsd:element name="AttrInteger" type="xsd:int"/>
               <xsd:element name="AttrBigInt" type="xsd:long"/>
               <xsd:element name="AttrDouble" type="xsd:double"/>
               <xsd:element name="AttrVarchar" type="xsd:string"/>
               <xsd:element name="AttrDate" type="xsd:date"/>
               <xsd:element name="AttrTimestamp" type="xsd:dateTime"/>
                     </xsd:sequence>
                  </xsd:complexType>
               </xsd:element>
            </xsd:sequence>
         </xsd:complexType>
      </xsd:element>
      <xsd:element name="StreamOutput0_MsgObj">
         <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="AttrInteger" type="xsd:int"/>
              <xsd:element name="AttrBigInt" type="xsd:long"/>
              <xsd:element name="AttrDouble" type="xsd:double"/>
              <xsd:element name="AttrVarchar" type="xsd:string"/>
              <xsd:element name="AttrDate" type="xsd:date"/>
              <xsd:element name="AttrTimestamp" type="xsd:dateTime"/>
            </xsd:sequence>
         </xsd:complexType>
      </xsd:element>
   </xsd:schema>
</types>

Message Objects in the WSDL Document

The WSDL document contains two types of message objects:

IEP uses the regular message object when you are sending in one message at a time. A batch message object is useful when you want to send in multiple messages.


<message name="MyStreamInput_Msg">
   <part name="input" element="typens:MyStreamInput_MsgObj"/>
</message>
<message name="MyStreamInputBatch_Msg">
   <part name="input" element="typens:MyStreamInputBatch_MsgObj"/>
</message>
<message name="StreamOutput0_Msg">
   <part name="output" element="typens:StreamOutput0_MsgObj"/>
</message>

If one of the messages in the batch message group fails to be processed appropriately in the IEP, others will fail as well.

With a single message object, message failure is on a one-by-one basis.

Bindings and Services in the WSDL Document

By default, the WSDL documents that are automatically generated in an IEP Module project include concrete information (bindings and services).

You can configure IEP to generate abstract WSDL documents instead.

Generating Concrete WSDL Documents

By default, the WSDL documents that are automatically generated in an IEP Module project include concrete information (bindings and services).

If the event processor has a Stream Input operator, then the WSDL document contains a SOAP-based binding and service.

If the event processor has a Stream Output operator, a Batched Stream Output operator, or a Relation Output operator, then the WSDL document contains a file-based binding and service.

The following example shows a SOAP-based binding and service, followed by a file-based binding and service.


<binding name="InputBinding" type="defns:InputPt">
   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
   <operation name="MyStreamInput">
      <soap:operation soapAction="MyStreamInput"/>
      <input>
         <soap:body use="literal"/>
      </input>
   </operation>
   <operation name="MyStreamInputBatch">
      <soap:operation soapAction="MyStreamInputBatch"/>
      <input>
         <soap:body use="literal"/>
      </input>
   </operation>
</binding>

<service name="InputService">
   <port name="InputPort" binding="tns:InputBinding">
      <soap:address location="http://localhost:12100/service/newEventProcessor_iep"/>
   </port>
</service>

<binding name="OutputBinding_StreamOutput0" type="defns:OutputPt_StreamOutput0">
   <file:binding/>
   <operation name="StreamOutput0">
      <file:operation/>
      <input>
         <file:message fileName="StreamOutput0.txt"
                 fileNameIsPattern="false"
                 addEOL="false"
                 multipleRecordsPerFile="true"
                 use="literal"/>
      </input>
   </operation>
</binding>

<service name="OutputService_StreamOutput0">
   <port name="OutputPort_StreamOutput0" binding="tns:OutputBinding_StreamOutput0">
      <file:address fileDirectory="C:/temp/newEventProcessor_iep"/>
   </port>
</service>

You might need to manually update the default settings for any binding and service. For example, the default file directory is a Windows path, which would not work correctly on a UNIX system.

For detailed information about the binding and service configuration, see the documentation for the HTTP Binding Component and the File Binding Component.


Note –

If you manually update the WSDL document and then save the IEP Module project again, the changes that you made to the WSDL document are overwritten.


Generating Abstract WSDL Documents

You can configure IEP to generate abstract WSDL documents by editing a flag in the IEP project properties file. The bindings and services are not included.

With this approach, you can define the bindings and services by using the Composite Application Service Assembly (CASA) Editor.


Caution – Caution –

If you use the CASA Editor, do not clone the IEP WSDL document to customize its generated bindings and services. Updates to the generated WSDL documents will not be updated after the cloning. Over time, the cloned and edited WSDL document deployed for the bindings will become inconsistent with the WSDL document deployed for the IEP Service Engine.


ProcedureTo Generate Abstract WSDL Documents

  1. Go to the location of the IEP Module project and open the project.properties file.

  2. Change the value of the always.generate.abstract.wsdl flag to true.

  3. Save the project.properties file.