Using an HTTP channel and a destination configured to use a SOAP Serializer, BusinessEvents can act as a web services platform, sending and receiving SOAP requests. You can configure the project manually or using a WSDL import utility, which greatly simplifies configuration.
When a correctly configured HTTP destination receives a SOAP request, the SOAP serializer deserializes the SOAP message to its corresponding event. That event has to be inherited from a SOAPEvent. The event payload contains the SOAP envelope.
To create a SOAP event, create a SimpleEvent that inherits a
SOAPEvent. It makes event configuration easier. Its payload has a
message root element having an
Envelope child element. The root element contains
Header and
Body elements, and the Body element has a
Fault element. You can further configure these elements using the payload editor.
A rule in the project accesses the SOAP event payload as needed using the mapper or SOAP catalog functions. The rule puts the SOAP response into the payload of a SOAPEvent that is sent to the client. The SOAP serializer sends the SOAP response to the client.
SOAP catalog functions enable you to access and process the contents of the following elements in the event payload of an incoming SOAPEvent, and add elements to the outbound SOAPEvent:
For Soap requests, the header property SOAPAction represents the destination name, and the
requestURI represents the channel URI. BusinessEvents combines these
SOAPAction and
requestURI to create destination URI. It maps the request with a destination having same URI as the newly created URI.
For example, if the requestURI of a request is
/QueryBooks and the value of
SOAPAcion is
QueryBooksByAuthor, then BusinessEvents engine maps the request with a destination having
/QueryBooks/QueryBooksByAuthor URI if it exists.
You can either manually create and configure project resources to work with SOAP services or use the WSDL import feature which creates the resources for you, and then configure them as needed. See
Understanding the WSDL to Project Resource Mapping for details.
Configure an HTTP channel, an HTTP connection resource for the channel. See Working with HTTP Requests for details. Connection configuration is the same for SOAP and HTTP channels, except that for SOAP destinations, you need to use
Configure SOAPevents that will be used to receive the SOAP requests and send out SOAP responses. SOAPEvent is an event type provided with BusinessEvents. also configure any other ontology
WSDL (Web Services Description Language) is an XML format for describing web services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information.
BusinessEvents can import a WSDL file and create the required project artifacts based on it, such as events, rules, rule functions, channels, and destinations.
When you import an abstract WSDL, channel and transport information is not available and you must create those resources manually. Concrete WSDLS contain information that is used to create these resources automatically.
See Understanding the WSDL to Project Resource Mapping to understand what project resources are created, and which sections of the WSDL are used to create each resource.
Table 18 shows how the project resources are exported as a WSDL file.
|
|
The base structure (Envelope -> Header -> Body) which conforms to SOAP schema, is created. You can define your own schemas for header elements and body and use them with this.
|
|
|
Forms the <soap:address> host and port.
|
Select HTTP as the Driver, Resource as the Method of Configuration and point to the HTTP Connection.
|
Forms the <soap:address> URI.
|
Set SOAPMessageSerializer as the default serializer.
|
Forms the soapAction attribute of the operation.
|
Ensure that the rule function has SOAPEventIn as the input parameter, and SOAPEventOut as the return type.
|
Forms the <wsdl:operation> operation.
|
In the Destination Group of Agent Classes, associate each destination with a preprocessor rule function. Thus the destination name becomes soapAction specified for that particular operation.
|
Associates soapAction to the operation in the HTTP binding.
|