XML "pretty print" format

Is there a way to change the format of xml that webMethods sends? I have both TN and the setResponse method (in flow) sending a xml documents to a TP in “pretty print” format (the format with indentations and carraige returns), but they would like it all in one line. It seems that this formatting is extracted from the developer so I’m not sure if it can be changed.

Before I get flamed, I have read all documentation and it doesn’t seem to be addressed. I understand that both formats are legal xml (and I’d prefer to send it in “pretty”) and that the TP’s system should handle all forms of legal xml. However, they are having technology limitations on their systems and I’m not in a position to tell them to fix their own problem. So, their lack of a decent xml parser becomes my problem.

Example formats:

pretty print

value

desired format
value

Any help is appreciated.

Thanks

Hello,

It doesnt look like we have a built-in mechanism to achieve this. May be you can try to write a wrapper service which removes all the new line characters.

Just my 2 cents…

HTH,
Anitha

Of course, the correct answer is to push back and tell the trading partner that their technology needs to deal with all valid XML documents and not to code this custom format just for them.

However, given that you might lose that battle …

I assume you attempted to use pub.string:replace and that it didn’t work for you.

If so, then I would agree that a simple java service that would be used as a transformer in your Flow would do the trick.

Mark

Hmm… pub.string:replace should work: when setting it’s ‘searchString’ input, just right click, choose ‘Use larger editor’, press Enter (this sets CR+LF as the search string, I think), and it should strip newlines from ‘inString’