Oracle Service Bus, jms request/response, response doesn't arrive

This week i was trying to make my proxyservice working in osb which was based on a jms transport, nothing fancy.
Just a normal request/response messageflow and the response needed to be published on a different queue.proxyservice

After testing the flow from the console all worked fine, request pipeline completed, response pipeline completed, but no messages in the response queue.
Looking at the definition of the proxyservice, we will notice the correlation pattern will make use of the JMSCorrelationID.
Since i use the easy way of testing (and this proved this isn’t the best way) by using the testconsole of the proxyservice, the jms properties will never be set.
To check this look in the invocation trace for ‘receiving request > $inbound’. In here we should see the values. Since they won’t be set the osb can’t correlate the response back and so the response will never be published to the queue.

From now on we will add a ‘publish’ folder to every osb project to fill our resources in a ‘real scenario’ way. It’s folder for all the testing resources.
In my case i just needed a simple business service with jms transport which would add a test-message on ‘queue_to_listen_on’.
Like this i can just trigger the process in the way it should happen, and others can re-use the testingtools.

Lets test with the businessservice, send a message to the queue. In the proxyservice i will log the inbound to see if the jms properties are set.

<bea-000000> < [Pipeline_Request, Pipeline_Request_request, stage1, REQUEST] !!! debug, logging inbound variable !!!:
<con:endpoint name="ProxyService$your_project$services$proxy$your_proxyservice" xmlns:con="http://www.bea.com/wli/sb/context">
  <con:service/>
  <con:transport>
    <con:uri>jms://queue_to_listen_on</con:uri>
    <con:mode>request-response</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="jms:JmsRequestMetaData" xmlns:jms="http://www.bea.com/wli/sb/transports/jms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tran:headers xsi:type="jms:JmsRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
        <tran:user-header name="JMS_OracleDelay" value="0"/>
        <tran:user-header name="JMS_OracleDeliveryMode" value="2"/>
        <tran:user-header name="JMSXState" value="0"/>
        <tran:user-header name="JMSXRecvTimestamp" value="1249544253835"/>
        <tran:user-header name="JMS_OracleTimestamp" value="1249544242855"/>
        <jms:JMSDeliveryMode>2</jms:JMSDeliveryMode>
        <jms:JMSExpiration>0</jms:JMSExpiration>
        <jms:JMSMessageID>ID:707430ACF0811C4CE044000000000000</jms:JMSMessageID>
        <jms:JMSPriority>4</jms:JMSPriority>
        <jms:JMSRedelivered>false</jms:JMSRedelivered>
        <jms:JMSTimestamp>1249544242855</jms:JMSTimestamp>
        <jms:JMSXDeliveryCount>1</jms:JMSXDeliveryCount>
        <jms:JMSXUserID>mdsplus</jms:JMSXUserID>
      </tran:headers>

Now we see the jms properties are set.

Lessons learned
Either put messages on the queue by use of the wls console, hermes or by using a dedicated business service. In these cases jms properties will be set and the correlation will succeed.

Original blog

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

One Response to “Oracle Service Bus, jms request/response, response doesn't arrive”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>