We have an endpoint hosted in a Mule that has been migrated from an ASMX .NET web service definition file.
The placement of namespaces is different from what .NET expected and what Mule seems to have implemented from this WSDL.
The error coming from the .NET client connecting to the endpoint is as follows:
Possible SOAP version mismatch: the envelope namespace http: // foo / bar / was unexpected. Waiting for http://schemas.xmlsoap.org/soap/envelope/ .
The SOAP envelope expected by Mule is as follows:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:foo="http://foo/bar/">
<soap:Body>
<foo:DoSomething>
<foo:xmlDocument>
</foo:xmlDocument>
</foo:DoSomething>
</soap:Body>
</soap:Envelope>
So far, WSDL hosted in .NET translates WSDL as:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DoSomething xmlns="http://foo/bar/">
<xmlDocument></xmlDocument>
</DoSomething>
</soap:Body>
</soap:Envelope>
http://foo/bar .NET, , .NET , Mule.
.NET. , , . Mule, .
WSDL :
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://foo/bar/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://foo/bar/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://foo/bar/">
<s:element name="DoSomething">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="xmlDocument" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DoSomethingResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="DoSomethingResult" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="DoSomethingSoapIn">
<wsdl:part name="parameters" element="tns:DoSomething" />
</wsdl:message>
<wsdl:message name="DoSomethingSoapOut">
<wsdl:part name="parameters" element="tns:DoSomethingResponse" />
</wsdl:message>
<wsdl:portType name="DoSomethingInboundSoap">
<wsdl:operation name="DoSomething">
<wsdl:input message="tns:DoSomethingSoapIn" />
<wsdl:output message="tns:DoSomethingSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DoSomethingInboundSoap" type="tns:DoSomethingInboundSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="DoSomething">
<soap:operation soapAction="http://foo/bar/DoSomething" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="DoSomethingInboundSoap12" type="tns:DoSomethingInboundSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="DoSomething">
<soap12:operation soapAction="http://foo/bar/DoSomething" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DoSomethingInbound">
<wsdl:port name="DoSomethingInboundSoap" binding="tns:DoSomethingInboundSoap">
<soap:address location="http://foo/bar/DoSomethingInbound.asmx" />
</wsdl:port>
<wsdl:port name="DoSomethingInboundSoap12" binding="tns:DoSomethingInboundSoap12">
<soap12:address location="http://foo/bar/DoSomethingInbound.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>