Add http response information to TN

Hi all,

i have a third party application that trigger xml transaction to our IS via http post which then, invokes a receive service within my wM package. It will validate, then write the xmldata from the http post into TN. Upon completion, it will also generate a custom xml data in the http response (using setResponse service).


  1. How do i retrieve the http response - status code and status message that was sent?
  2. How can i capture the whole http response (status code, status messages, output from my setResponse ) and add as another contentPart in TN?

Appreciate any suggestions. Thanks in advance!


Please check this thread link,


hi RMG,
thanks for info in the link. But, the link explains posting XML to IS and extracting response from it.

in my case, I’m trying to extract the http response that my IS sent to the originator of the http post. Currently, I am receiving the http post transaction as a node, convert into bizdoc and send to TN, create custom xmldata and send to originator in setResponse service.

Because of my limited Java skillset, can someone help me or share with me any API that will be able to extract the http response status code, status message and custom xmldata sent to the originator of the http post? How do i leverage the getHttpResponseHeader??



Thanks for sharing the code.

oh… my pleasure in sharing the code, RMG.

I just hope the code is of some help to Ling. The whole experience to get the code working was quite consternated.

Saurabh, your comment: “Here is a code snippet I used long time back (with v4.6).”… i AM on 4.6, so, works for me and i’ll do any tweaking required. :wink: btw, sorry to ask this question here, but, did u used to work in Santa Clara, abt 4-5 yrs ago? Pls reply/email me at

Thanks Saurabh and RMG.