What You May Need to Know About Multiple Schema Elements in a WSDL Types Section
If there are multiple <schema> elements in a wsdl <types> section,
getElement() method takes only the first <schema> element in the following scenarios:
-
If there are no
targetNamespaceelements. -
If
<schema>elements under<wsdl:types>have the sametargetNamespace.
To avoid this, ensure that each schema element contains:
-
A
targetNamespaceelement. -
Each
targetNamespaceelement is different from the other in each schema.
The following is the example of <wsdl:types> section with different targetNamespace elements.
<wsdl:types>
<schema xmlns="http://www.example.com/2001/XMLSchema"
targetNamespace="http://namespace1.name/">
<import namespace="http://xmlns.example.com/singleString"
schemaLocation="../Schemas/singleString.xsd" />
</schema>
<schema xmlns="http://www.example.com/2001/XMLSchema"
targetNamespace="http://namespace2.name/">
<import namespace="http://xmlns.example.com/pcbpel/samples/expense"
schemaLocation="../Schemas/mqresponse.xsd" />
</schema>
</wsdl:types>