The WSD auto generation tool appears to ignore the response/output message schema definition as defined in the WSDL. Anybody doing top down WSDL development? Look at the output message in a tool like SoapUI and you will see that webMethods IS is adding a top level root element in the SOAP body. It’s the input message with Response appended to it.
Here is an example:
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ser-root:sendRequestResponse xmlns:ser-root="http://www.wm.com">
<webm:sendRequestResponse xmlns:webm="http://www.wm.com">
<webm:RequestResponse>
<webm:LastName>BeB</webm:LastName>
</webm:RequestResponse>
</webm:sendRequestResponse>
</ser-root:sendRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Several problems with this:
1-Doesn’t match the schema definition which means other tools like .Net which try to import the WSDL aren’t going to work because the classes are not going to be defined correctly.
2-Can’t override it in IS, it’s locked down.
Why is it doing this? As far as I can tell it’s putting the entire reference document into the WSD Response/Body Document instead of just the payload. To see an example of what I’m seeing take a look at Mark C’s DocLitWebServiceExample7.1.
Look at the OrderService WSD. Take a look at the createOrder service. The response definition has a document reference to ResponseStatus which is the payload of the output message. If you run the createOrder you get this as the output:
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ser-root:createOrderResponse xmlns:ser-root="urn:wmusers.com.services.OrderService">
<ResponseStatus>
<ReturnCode>0000</ReturnCode>
<ResponseMessage>
<Code>OK</Code>
<Severity>Info</Severity>
<Description>OrderID 1 created successfully</Description>
</ResponseMessage>
</ResponseStatus>
</ser-root:createOrderResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Which is what you would expect if you look at the webMethods auto generated WSDL. However if you take that WSDL or any other WSDL you created by hand and auto generate the WSD, you get a different message definition. Instead of ResponseStatus as the document reference for the createOrder/Response body message definition, you get createOrderResponse as the document reference and here is the problem. When you then run the service, here is the output:
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ser-root:createOrderResponse xmlns:ser-root="urn:wmusers.com.services.OrderService">
<tns:createOrderResponse xmlns:tns="urn:wmusers.com.services.OrderService">
<ResponseStatus>
<ReturnCode>sdf</ReturnCode>
<ResponseMessage>
<Code>334</Code>
<Severity>3</Severity>
<Description>test</Description>
</ResponseMessage>
</ResponseStatus>
</tns:createOrderResponse>
</ser-root:createOrderResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Notice the extra Node that webMethods IS has thrown in.
I can hand code the provider in IS to match the WSDL and make it work correctly. But we shouldn’t have to do this. Anybody found anything different? Is there a magic switch I’m missing here?