Request-Reply via TN

Hello,
We have a partner who is using Jakarta HTTPClient to invoke our TN URL such as:
[url]http://mycompany.com/invoke/wm.tn.receive[/url]

How do I configure TN such that when I get this request, I read a xml/flat file and pass it back to the http request as a response?

Thanks.

Create a wrapper service that the partner invokes. Partners should normally never invoke wm.tn:receive directly.

The wrapper service can do some housekeeping if needed and pass the doc to TN for processing. The processing can then place a var in the pipeline that the wrapper can pick up and send in the response.

There are caveats to keep in mind:

  • This approach is somewhat of a hack in that the wrapper service will rely on an undeclared pipeline variable being present. This makes maintenance harder (“where the heck does the “fooDoc” come from?”).

  • The service which will read the xml/flat file and is invoked by TN processing rule must be invoked synchronously. If it is invoked async or as a service execution task then the wrapper service will never see the resulting document.

  • The reprocessing/resubmit facilities of TN will be useless in this case.

HTH.

Did’nt need to do all that. Just use ‘respond With’ tab in processing rule and specify <% value [pipeline variable] %> for the response.

Eric

That’s one way to go but I think the caveats above still apply. And as covered in other threads and in this eZine article, it is recommended that partners don’t call wm.tn:receive directly. A wrapper service is really the way to go.