WM Soap processor produces invalid body(?)

Hi

I have a wsdl (well… a fraction of it) file that is generated from a web service (soap-rpc) created in .Net. I know soap-rpc isn´t the best but it´s a 3rd party service so I cant do much about that.

When consuming the service from .Net, it works well but if I try to do the same using wm (by creating a ws connector) I get a soap fault:
“The ID attribute is not declared”

If looking at the wm generated soap body, the KS01710I element contains an “id” attribute whereas the .Net generated soap body does not.

Can anyone please explain why, or at least try :slight_smile:

I have attached the wsdl file and the output from the tests using .Net and wm.

[WM Soap Message]
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/[/color][COLOR=#0000ff]" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/[/color][COLOR=#0000ff]"
xmlns:xsd="http://www.w3.org/2001/XMLSchema[/color][COLOR=#0000ff]"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance[/color][COLOR=#0000ff]"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/[/color][COLOR=#0000ff]">
<SOAP-ENV:Body>
[SIZE=1]<ser-root:KS01710_Operation xmlns:ser-root="http://www.foo.com/webservices[COLOR=#0000ff]"
SOAP-ENC:root='1’>
[/size]<KS01710I xsi:type="sc1:KS01710I" xmlns:sc1="http://www.foo.com" id="id1">
<PR_DATO xsi:type="xsd:string">12341234</PR_DATO>
</KS01710I>
</ser-root:KS01710_Operation>
</SOAP-ENV:Body>
</
SOAP-ENV:Envelope>
[/COLOR]
[.Net Soap Message]
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/[/color][COLOR=#0000ff]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance[/color][COLOR=#0000ff]" xmlns:xsd="http://www.w3.org/2001/XMLSchema[/color][COLOR=#0000ff]">
<soap:Body>
[SIZE=1]<KS01710_Operation xmlns="http://www.foo.com/webservices[COLOR=#0000ff]">
[/size]<KS01710I xmlns=“”>
<PR_DATO xmlns="http://www.foo.com">test</PR_DATO>
</KS01710I>
</KS01710_Operation>
</soap:Body>
</
soap:Envelope>

Regards
Mikael
[/COLOR]

This is a RPC/Literal not RPC/Encoded. I don’t believe RPC/Literal is supported by webMethods IS server. Maybe I missed something but I don’t see the “ID” attribute declared in the WSDL or the XML Schema file.

Did you try removing the “ID” attribute from your IS generated document? It probably looks like @ID or something. Don’t know why it’s in there to start with. Remove that and give it a shot.

BTW, the title of this thread is incorrect.

The webMethods component producing the soap body that does not correctly invoke your service is the Flow generated by the Web Services Connector wizard. It has nothing whatsoever to do with the soap processor which handles inbound soap messages (/soap/default for doc/literal) and (/soap/rpc) for rpc-encoded.

As Mark G suggested, just modify the generated Flow called a Web Service Connector to make it send the message that will invoke your partner’s operation. It may be as simple as removing the “@ID” attribute from a doc type, but you shouldn’t stop there. Add changes to make the Flow more robust with regard to error handling and easier to maintain by replacing the hardcoded reference to the soap endpoint address with a value obtained from a property file.

Mark

Hi

Thanks for the quick replies.
The thing is, there is no @id attribute in the IS generated document.

I´ll see if I can get a new wsdl which is rpc/encoded and try that as well.

Mark: I will do as you suggest :slight_smile:

Thanks
Mikael

Mikael,

I’m pretty sure that the @ID attribute is being created by the generated Flow somehow. If you look hard enough you’ll find where it is coming from and can remove it. Failing that, you can build the XML string you know will invoke the op successfully and post it using pub.flow:http.

Since you partner is using .Net, be sure to see the thread I posted yesterday about needed IS fixes, if you plan to use HTTPS.

Mark