Using an HTTP channel and a destination configured to use a SOAP Serializer, TIBCO 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. TIBCO BusinessEvents combines the
SOAPAction and
requestURI to create a 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 TIBCO BusinessEvents engine maps the request with a destination having
/QueryBooks/QueryBooksByAuthor URI if it exists.
The section Creating Resources Using the WSDL Import Utility explains how to use the WSDL import feature to create the resources.
Also see Understanding the WSDL to Project Resource Mapping for details about how the WSDL elements correspond to project resources.
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 for the serializer. For SOAP destinations, use the following serializer:
After you complete Task B, set that
SOAPEvent as the default event for the destination.
Configure the SOAPevents that will receive the SOAP requests and send out SOAP responses. Also configure any other ontology as needed. SOAPEvent is an event type provided with TIBCO BusinessEvents. However it is created in a two-step manner:
The payload of a SOAPEvent is automatically configured with the structure of a SOAP message. It has Header and Body elements, and within the Body element, a Fault element. You can further configure the Header and Body elements using the payload editor.
In general the procedure of serving requests and sending requests to other servers is the same for SOAP services as for other HTTP interactions. See
Working with HTTP Requests. One rule function is used as the event preprocessor.
In addition, you must configure rules and rule functions to access information from the SOAP messages in the inbound events, and to populate outbound events with SOAP message details. Set two SOAPevents you configured in
Task B as input and return arguments of the preprocessor. See
Parsing and Building SOAP Messages for details.
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.
TIBCO BusinessEvents can parse an imported WSDL file and create the required project artifacts based on its contents: the channels and destinations (concrete WSDLS only), events, rules, and rule functions.
Both abstract and concrete WSDL files can be used. 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 which sections of the WSDL are used to create each resource.
Table 21 shows how related project resources are exported as a WSDL file.