Using service output templates to generate HTML

Basically, I need to implement the following scenario. A Trading partner sends xml to TN.

In the processing rule inside Trading Networks, there is the respond with field under Action tab. Here in the message text field put the value
%value html% where html is the html template that you have.
This should return the html template whenever the business rule is invoked.
Thanks and hope this helps!

Ok, I have added the %value htmlOutputTemplateName% tag to the processing Rule’s Action tab, under Respond with’s Message text box and added “text/html” as the Content type.

The output template of a service is returned to HTTP clients when that service is called via HTTP.

If a generic service like TN recieve is what the partner calls and your service is called via a routing rule, your service’s template will not be returned.

There are two options:

  1. Create a new entry point service that has the desired output template and all it does is call tn receive. It may be a bit tricky based on your routing rules to match an entry point with the desired template, so there is option #2.

  2. There is a WmPublic service pub.flow:setResponse which allows for the exact response of the service call to be set. Within your service call the appropriate WmPublic pub.report service to apply the template to the pipeline and call setResponse with the result. This is also make it easy to look at the HTML to be returned within your service.

HTH,
Fred

Fred, let me ask a different question, what would be the best way to accomplish the following task. Receiveing xml from a trading partner via TN and sending back xml to trading partner via TN, but also taking the xml you are returning the the trading partner and formating that as html and emailing that html to the trading partner all as on synchronous action?
steve

Hi,
Sorry for asking a normal question. Iam new to Trading Networks.