Sending back data from TN

I have a requirement where,

  1. Client sends xml to one of my java service.
  2. This java Service forwads the request to TN(by http post) http://myserver:5555/invoke/
  3. The TN takes the XML data and inokes a processing rule.
  4. This Processing rule gives out a string(outputstr).
    Issue - I need to send this outputstring to my client back.
    I do not know how to send this string to client back
    Could anyone plz help me …
    Thanks in advance


Do you want to send response back to partner via TN or using directly http service?
Once you create the outputstring response(xmldata)use routeXML or tn:receive service this will route the XML to TN and depends on the outbound processingrule using prefferable delivery method you can post response back to your partner.



what do i have to do if i want to send the response as part of the same http request made by the client?


Use pub.flow:setResponse service for response in the same http session.Please see the docs for more information.



There is one more approach to send the response back to the sender from TN.

once you invoke a service from the processing rule. you can define an output variable in the service like ‘ResponseOut’. In ‘Respond With’ in the Actions tab of processing rule, respond to the sender using


Yes this is also one of the option for immediate response from TN if TN was used in the integration or else use setResponse in the developer.

RMG & Satya,

Thanks for the inputs.


You can also use an output template, which can use variable substitution to easily place pipeline data into the desired format. IS will automatically package up the response for you.

Keep in mind that regardless of the approach used, the processing rule that gets invoked (and the associated service) must be run synchronously, otherwise the only data available in the pipeline will be what TN gives back to you (bizdoc, sender, etc.).