SonicMQ’ Outbound Routing seems to interfere with the fulfil

Posted by CESAR PEÑALOSA on 14-Sep-2010 11:15

Hi People!

Within an ESB Itinerary (with Sonic ESB V7.6.2) is required to invoke a RESTful Web Service and transform the ‘Response’ as a new ‘Step’ in the Itinerary.

The problem occurs with the Step associated with the Transformation (i.e., after the invocation of RESTful WS), this Step is not achieved in the Itinerary. Simply, the Response from the RESTful WS is returned immediately to the Requester of the ESB Process, originally established by the ESB Process with the ‘JMSReplyTo’ property.


From an ESB configuration perspective, I have tried to manipulate the property ‘JMSReplyTo’ without success (using SonicESB Header Extensions into a XSLT Stylesheet). I'm not thinking to write a ‘Custom Service’ using SonicMQ’ API...

I believe important to mention that the invocation of RESTful WS is carried out through ‘SonicMQ Outbound Routing’; i.e., the ‘Endpoint’ in question points to ‘sonic.http::destination_name’, and I set the 'URI' required through the ‘X-HTTP-DestinationURL’ property.
Again, the result from the RESTful WS is "successful", for your information, the associated HTTP method is POST, and MIME type is XML
.

I want to know how would change this behavior?, that is, once that it get the response from the RESTful WS, continue the following Step into the ESB Process Itinerary.


Please, can someone help me with this issue? Any idea about of how I would execute the ESB itinerary of end to end, without incurring in programming API, may be, setting a few properties only?...


Thanks,

César Peñalosa.

All Replies

Posted by tsteinbo on 15-Sep-2010 04:04

If I read the problem correctly you want to perform a REST request/reply in a step and then continue the itinerary with the result?

To do so will require and Endpoint.callout(), which synchronously waits for the response.

Unfortunately, an oob service type is only shipped with Sonic 8.0 (Dispatch service). For prior version you would want to have a (generic) custom service that performs the callout, e.g.:

XQAddress replyToAddr = envelope.getMessage().getReplyTo();
endpoint = // get REST endpoint address;
XQMessage response = endpoint.cal(envelope.getMessage(), timeout * 1000); // call and wait timout seconds
response.setReplyTo(replyToAddr); // restore orgininal replyTo
envelope.setMessage(response); // populate outgoing envelope
context.addOutgoing(envelope);

Thomas

Posted by sk185050 on 15-Sep-2010 04:18

Hi Césa,

you cannot use JMSReplyTo with the xslt wih the HeaderExtension of sonic API.  I got the issue as well.

There is a Enrichment Service available at psdn, that you can use for that, try that out. I am not sure if you can use that or not. we use that and it works well for us.

I have the same scenarion, but in my case i did not use the WS, instead of we have Custom service, we are able to process the response.

This thread is closed