Search code examples
jmsweblogicosb

How to call a OSB Proxy Service(JMS Transport) from a java client?


Hi I have a proxy service of transport type (JMS). It listens to a queue and when a message is posted in IN queue, it will route to a business service which would put the message in an OUT queue.

Now, I have a requirement where, from a java client I want to call the proxy service and pass the message content that it can route to business service which will put the message in out queue.

Is it possible? Is yes, how?

P.S: I searched in the internet about this and found we can call a proxy service just as a web service. Is it possible with JMS transport proxy service ?


Solution

  • A proxy cannot accept both HTTP and JMS at the same time - they are bound to a particular type of transport.

    However, you can create a proxy chain like so:

    • A local-transport proxy (Let's call it MyService-local.proxy) that does the business logic and routes to the business service.
    • A small proxy that exposes a SOAP or REST endpoint (Let's call it MyService-http.proxy) and routes to MyService-local
    • Another proxy that reads from a JMS queue (call it MyService-jms.proxy) and routes to MyService-local.

    Alternatively, if you dont want to change the OSB service, I suppose you could also write Java code to create a JMS message and put it on the original queue.