Sending XML Response back


I have a requirement where the TP posts the xmldata to my service. They will directly call my service which accepts the xml string as input and extracts the content and routes it to the Trading Networks (Routing Instance) which sends the payload to another instance.

Now, What should I do is that I need to send an XML response back on its status. I have the XML response structure. How can I achieve this. Please let me know your valuable suggestions.

Thanks all in advance.

Any Suggestions…Please reply.

Can you expand more a bit…as I understood in a different way,
like you receive XML from TP, process it, route again to TN, then again call a service…am I right?

Yes or No, do say…


Hi Suvigya,

I receive an XML from Trading Partner. then I need to extract the payload and route it to TN so that the processing rule service will send it to another instance.

The above part is all good. But when the trading partner calls the service directly they need an acknowledgement or response back. Like failure or success. It has to be synchronous. Immediate response when they send the data to the service.


Review the docs for pub.flow:setResponse. Post any questions you might have.

But Rob, he can also use the “Respond With” feature, in the actions tab of processing rule, as everything will pass from TN only…
If I am right??

That would work if the caller was invoking directly. (Which I generally recommend against doing.)

Sorry for stealing the thread…

Hi Rob,

I would like to hear more of your thoughts on the above comment and what is the alternative you would suggest?

If you have already written elsewhere could you please direct me to the thread.


I would like to use service templates and send the pipeline data.
I have created a output template and structured it to get the pipeline data for some values. How can I test to see what actually is getting carried into the response. I mean to say. How can I see the output response.

Let me know.

Improving Upon