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.

 View Only
Expand all | Collapse all

Sending XML string using pub.client:http

  • 1.  Sending XML string using pub.client:http

    Posted Mon January 04, 2016 11:18 PM

    I’m using webMethods Integration Server 9.6.0.0, Updates IS_9.6_Core_Fix2.

    Currently I need to use my flow service to send XML string from a String input to a partner’s web service. I’m using “pub.client:http” to do this.
    My problem is, when I connect my String input (which contains the XML string) to “data/string” property in “pub.client:http” and send the data, my partner’s web service will throw “Content is not allowed in prolog” error. I believe this is due to there’s a byte order mark (BOM) at the beginning of the XML when it’s being passed from the input string to “data/string” property.

    I don’t have the error if I paste the XML string directly in the “data/string” property. Can anybody help me how to remove this BOM when being passed to pub.client:http?

    Thanks in advance.


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


  • 2.  RE: Sending XML string using pub.client:http

    Posted Tue January 05, 2016 02:16 PM

    Hi Mahzan,

    you can convert the string to a byte arry, remove the first bytes from the array an the reconvert the byte array to a string.

    Are you just invokinhg http directly or is there a WSDL available from which you can create a WS Consumer Service?

    If possible I would suggest to try the second approach.

    Regards,
    Holger


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


  • 3.  RE: Sending XML string using pub.client:http

    Posted Tue January 05, 2016 09:40 PM

    Hi Holger,

    Thanks for the suggestion. I’m going to give it a try.
    The web service is a REST services with no WSDL available, so I have to execute it directly via HTTP POST.
    Thanks.


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