Integration Server 10.15 | Web Services Developer’s Guide | Preserving Namespace Declarations when Decoding xsd:any Elements
 
Preserving Namespace Declarations when Decoding xsd:any Elements
When decoding a SOAP request or response that includes an xsd:any element, Integration Server preserves all the namespace declarations associated with an xsd:any element. This includes the namespace declarations for any elements nested in the xsd:any element.
Integration Server preserves namespace declarations for the xsd:any element by inserting the following field into the document:
@xmlns: <prefix>
Where <prefix> is the prefix defined in the SOAP message. If no prefix is defined, meaning that the default namespace is being declared, the variable name will be @xmlns.
The value of the @xmlns: <prefix> variable is the namespace declaration. Integration Server adds one @xmlns:<prefix> field for each namespace declaration in the xsd:any field. Additionally, the corresponding field for an element that belongs to the namespace includes the prefix in the field name.
Preserving xmlns attributes for namespace qualified elements in an xsd:any element can result in unexpected and unwanted fields. Unlike fields that correspond to declared elements, for an xsd:any field that corresponds to an xsd:any element in the WSDL document there is not a corresponding IS document type that identifies the possible fields and namespaces that appear at run time. Because the possible elements and corresponding namespaces are not defined in a corresponding document type, Integration Server considers the namespaces from an xsd:any element to be undeclared.
Integration Server represents an any element from an XML Schema definition referenced by a WSDL document by indicating that the IS document type that contains the corresponding any field may have unspecified fields (Allow unspecified fields is set to true). However, this does not alleviate the issue that the namespace declarations in the SOAP message are not present in an IS document type.
To control whether or not Integration Server retains namespaces in an xsd:any element when decoding a SOAP request or SOAP response, Integration Server includes the server configuration parameter watt.server.SOAP.retainUndeclaredNamespace. When set to the default value of true, Integration Server preserves namespace declarations for the xsd:any element. Additionally, the corresponding field for an element that belongs to the namespace includes the prefix in the field name, when set to false, Integration Server does not retain the namespace declarations for an xsd:any element and the name of the field corresponding to an element in the declared namespace names do not include the prefix.