Hi Mark & Rob,
my webMethods Integration Server (SOAP server) is receiving SOAP messages from 2 different clients: another webMethods (using connector) and another middleware product. And yes, I have used the getBody and xmlNodeToDocument to extract the argument from the SOAP message itself.
The XML below is the SOAP message I receive from a webMethods connector:
soapenv:Body
<ns1:addNumbersRequest xmlns:ns1=“urn:web.text.service” soapenv:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
1|2|3
</ns1:addNumbersRequest>
</soapenv:Body>
I do not have any problems executing the SOAP server service using the SOAP message above, as webMethods connector does not generate "xsi:type=“string”. The document generated from the SOAP message above would be like doc.jpg (please see attachment)
However, the other middleware product produces the following SOAP message:
soapenv:Body
<ns1:addNumbersRequest xmlns:ns1=“urn:web.text.service” soapenv:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
<ns1:numbers xsi:type=“xsd:string”>1|2|3</ns1:numbers>
</ns1:addNumbersRequest>
</soapenv:Body>
And using this SOAP message, webMethods fails to execute, since the xmlNodeToDocument generates a document that is different from the document generated from the first SOAP message. The document generated for this SOAP message is doc2.jpg (please see attachment)
By right, webMethods should be able to execute both SOAP message without any problems. When I write the SOAP service in POJO, I do not have any problems in processing both SOAP messages (a.k.a. they are treated as the same request)
What should I do in webMethods to be able to accept both SOAP messages and process them without errors?
Currently, I need to create 2 separate services: one to accomodate the connector SOAP client and another to accomodate the SOAP message being passed by another middleware product.
Thanks for the advice.
Cheers,
Kristanto Oetomo
#webMethods#API-Management#soa