Pubclienthttp and primaryHttp


I am trying to send a XML string using pub.client.http using POST method. As i understand it goes as a body of the request message.

I am trying to understand how is this different from using Delivery Method By in Processing Rules-Action as Primary HTTP in Trading Networks.

The reason i am asking is, if i send it through primary HTTP via the Trading Networks, it passes the XML correctly, where as when i use the pub.client.http, it gives error. The error coming from the client application is not a well formed XML.

Would appreciate an early response.


Hey Sandip,
It sounds some encoding problem. Do you have special characters in the xml document? What encoding you are using when you send the xml file via pub.client.http? If you are not using iso-8859-1 then try to put on header level as
<?xml version = “1.0” encoding = “is0-8859-1”?>
and see if this solves your problem.


Hello Sandeep,

Have you set the HTTP Header field ‘Content-Type’ to ‘text/xml’. Set this and it should work.

Also another alternative is to convert the XML to bytes with proper encoding and map the bytes and the encoding to the pub.client:http service. Also do not forget the HTTP Header field ‘Content-Type’

  • Rajesh Rao