Web service stage how to prevent the encoding the message

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Web service stage how to prevent the encoding the message

Post by MrBlack »

In the web service that I'm using, when I upload, the payload/message, which happens to be an XML document, on the receiving end the message has been HTML escaped so "<" becomes "&lt". Does anyone know how to prevent this?

I found this thread, and the posted said they changed his encoding but I don't know what he means or how to do it. And since the thread is so old I doubt I'll get a response.

viewtopic.php?p=303799

I'm working trying all different settings such as setting the DocType to String or XML or Blank, I'm just waiting for a reply from my recipient to see if doing that had any effect.

UPDATE:
I found this posting from IBM but so far the user defined method didn't work and I'm waiting for my SA to get back to me to test changing an application setting.

http://www-01.ibm.com/support/docview.w ... wg21414028
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

If it is truly a SOAP based web service then the content of the xml inside the payload (when xml is being passed as the actual input data), then by design it has to be "escaped" on the wire [xml inside of xml]. The receiving application, when normally de-serializing the SOAP payload, will un-escape those characters.

It's awfully strange when you might "not" want it to be escaped, but it could be because of some custom tooling on the other end....

You might need to build the SOAP envelope by yourself....depends on a lot of things....

Here are some thing to use to help you debug this:

a) make it a Server Job so that you can use tracing. Select tracing for your Web Services Transformer on the left side of the Tracing dialog and then check all four boxes on the right. In the middle of the trace log you will see an "xml out" log record that has the exact payload being sent on the wire. Now you will be able to see "exactly" what is being sent.

b) by now you should already be using a tool like SOAPui so that you know EXACTLY what the payload on the wire should look like when it works. Ultimately, you want your payload in the log of (1) to match what you KNOW works when using SOAPui.

b) play with the Data Element "xml".....that may help and give you a shortcut --- otherwise you may just have to work on building the whole working payload in an upstream xmlOutput or regular Transformer Stage.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply