Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 10 Advanced Topics : SOAP Envelope Attributes and Namespaces

SOAP Envelope Attributes and Namespaces
This section shows how a private process can set SOAP envelope attributes and namespaces. The SOAP message generated by TIBCO BusinessConnect SOAP Protocol has the private process-supplied envelope attributes and namespaces along with the default attributes and namespaces generated by TIBCO BusinessConnect SOAP Protocol.
The SOAP envelope attributes are managed following these rules:
A SOAP envelope namespace, such as http://www.w3.org/2003/05/soap-envelope, cannot be sent from the private process. The private process cannot send the namespace for a SOAP envelope prefix that has been defined in TIBCO Administrator for a given trading partner.
Envelope Attributes and Namespaces Example
The ae/SOAP/InitiatorRequest and ae/SOAP/ResponderResponse SOAP AE class have the envelopeAttributes field. This field is of type sequence, ae/SOAP/Attributes. ae/SOAP/Attributes is a sequence of the class ae/SOAP/Attribute.
The ae/SOAP/Attribute class contains the following fields:
The following example is a SOAP 1.2 message:

 
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pro="http://myorg.com/schemas/promotions"
pro:promotionExpiryDate="03/12/2003">
. . .
</SOAP-ENV:Envelope>

 
This SOAP message has a namespace and a promotionExpiryDate attribute in the namespace http://myorg.com/schemas/promotions.
Create an ae/SOAP/Attributes sequence element. This sequence node has two ae/SOAP/Attribute elements.
The field values for the first ae/SOAP/Attribute:
name: xmlns:pro
value: "http://myorg.com/schemas/promotions"
The field values for the second ae/SOAP/Attribute:
name: pro:promotionExpiryDate
value: 03/12/2003
Set the ae/SOAP/Attributes sequence element to the envelopeAttributes field in the ae/SOAP/InitiatorRequest or ae/SOAP/ResponderResponse node.
If an attribute is not bound to a namespace, an error occurs and the transaction is cancelled.
Configurable Namespace Prefix for the Envelope Namespace
The prefix for the envelope namespace is now configurable.
For example, a SOAP message can have the following format:
<abc:Envelope
xmlns:abc="http://www.w3.org/2003/05/soap-envelope/">
<abc:Header>
......
</abc:Header>
<abc:Body>
......
</abc:Body>
</abc:Envelope>
where abc replaces the previously pre-defined string SOAP-ENV.
The string SOAP-ENV is still the default, but it can be replaced by any string that you want. This prefix is not used for SOAP faults, which are always sent with the SOAP-ENV prefix.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved