The result of passing the soap body node to pub.xml:nodeToDocument is a document named “document” containing another document named : where could be any prefix supplied by the sender and is the name of the element inside the soap body.
Your target service, the one you want to invoke, is probably expecting a input document type named “createOrderRequest” or “createOrder” not “document\ns1:createOrder” or “document\foo:createOrder”.
My renameDocument java service accepts the document produced by the pub.xml:nodeToDocument service (Step 4) and the prefix and localName produced by the pub.xml:queryXMLNode service (Step 2) to produce a document called “renamedDoc” with a child document with a name equal to the localName without any prefix. There is probably a more elegant way to do this without having to pass in the prefix and localName.
When “renamedDoc” is mapped to the “inputs” document of a java service that invokes the target service, only the contents of “renamedDoc” are passed to the target service resulting in the target service only receiving a correctly named document type extracted from the soap body.
Clear as mud?
Mark
#webMethods#API-Management#soa