Sending XML string using pub.client:http

I’m using webMethods Integration Server, 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.

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.


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.