Schemas Not Successfully Loaded in Mapper When Using Headers Configured with WSDLs Ending in asmx

If headers are configured in the SOAP Adapter to use Dot Net or Microsoft WCF-based services (a WSDL that generally ends with asmx), the schemas are not successfully loaded in the mapper because the prefixes for schema and prefix s4 for the element type are not defined at the schema level.

The schemas are in line to the WSDL with prefix declarations at the WSDL level, but not at the schema level. The following code sample is from the WSDL:

<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" .........
xmlns:s4="http://webservices.com/1.0/Core/"  
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"  
targetNamespace="http://tempuri.org/"  
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
....
   <s:schema elementFormDefault="qualified"  targetNamespace="http://webservices.com/1.0/Core/">   
   <s:element name="WSHeader" type="s4:WSHeader" /> 
---
</wsdl:Definitions>

As a workaround add the prefix declarations manually in the schemas, re-import the IAR file and proceed. The following is an example of the schema in the WSDL after artifact generation:

<s:schema elementFormDefault="qualified" 
targetNamespace="http://webservices.com/1.0/Core/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s4="http://webservices.com/1.0/Core/"> 
....
</s:schema>