IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  XML "pretty print" format

    Posted 01/31/07 06:01 PM

    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


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: XML "pretty print" format

    Posted 01/31/07 06:46 PM

    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


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: XML "pretty print" format

    Posted 02/02/07 12:33 AM

    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


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: XML "pretty print" format

    Posted 02/06/07 03:25 AM

    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’


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods