This discussion is archived
6 Replies Latest reply: Dec 5, 2012 11:10 PM by Eric Elzinga RSS

Oracle Service Bus Generic Endpoints

robert224810 Explorer
Currently Being Moderated
Hi,
I have been looking into OSB and creating Proxy services. I have seen how a proxy service has a flow and can push messages to a business service. There is powerful routing capabilities in the flow which will be useful to me.
Imagine I have three systems which provide services at endpoints:
http://SOAsysA.ac.uk/*
http://SOAsysB.ac.uk/*
http://SOAsysC.ac.uk/*
I want to configure OSB to have a single end point for each of the services:
http://OSB.ac.uk/SOAsys/*
This should route it to SOAsys A, B or C as defined by some logic.
The routing logic will always be the same irrespective of the service being called. I have worked out how to do this for individual services in OSB, by creating a business service and a proxy service for each one. I can then configure the routing logic into the flows of each of the proxy service.
The problem with this solution is that it involves me implementing exactly the same routing logic for every service endpoint I create. Every time the logic is changes I have to change it in many flows, or come up with some kind of fancy Java solution.
Is it possible to use OSB to create a generic Proxy Service and Business Service pair that are not specific to a particular service, so if made a service call to the url:
http://OSB.ac.uk/SOAsys/service1/test
it would route it to (depending on flow logic)
http://SOAsysA.ac.uk/service1/test
This way the logic can be changed simply by altering a single flow!
Thanks
Robert
  • 1. Re: Oracle Service Bus Generic Endpoints
    Abhinav Journeyer
    Currently Being Moderated
    Robert,
    I have worked out how to do this for individual services in OSB, by creating a business service and a proxy service for each one
    You don't need to have individual proxy services for A, B & C systems to accept the requests, you can have a single proxy service which will fan out to respective Business Services depending upon the routing logic.
    The routing logic will always be the same irrespective of the service being called.
    If message flow is same for all three proxy services, just the Business Services endpoint are changing then handle the incoming request in single message flow of proxy service and route it respective Business Service either using conditional branching or operational branching or routing table.

    What you can do is make a canonical request structure schema which can handle request for All three end systems.

    Hope it helps !!

    Regards,
    Abhinav Gupta

    Edited by: Abhinav on Dec 4, 2012 11:25 PM
  • 2. Re: Oracle Service Bus Generic Endpoints
    vladodias Guru
    Currently Being Moderated
    Hi Robert,

    Did you looked into dynamic publish and dynamic routing actions yet?
    http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/ui_ref.htm#i1290040
    http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/ui_ref.htm#i1290079

    Cheers,
    Vlad
  • 3. Re: Oracle Service Bus Generic Endpoints
    robert224810 Explorer
    Currently Being Moderated
    Hi,
    Thanks for the pointer.
    I just want to check I am using it right.
    I assume that the final version would analysise the recieved url and use that to determine the url to call. I will add this logic later and just get the dynamic route/publish working calling a single service at the moment.

    I have a hello world service installed on my weblogic server and it is accassable from:
    http://127.0.0.1:7001/TIPP_SOA_Tests2-RJMTest_JavaHelloWorld_WS-context-root/HelloWorldPort

    I want to set up a Generic_Proxy service accassable from http://127.0.0.1:7001/RJMTest/Generic_Proxy

    To test how generic rout/publish work I want to simply forward the message from the Generic_Proxy address to the java service.
    I have added one item to the flow, Dynamic Route to Service and I have given the following xml:

    <ctx:route>
    <ctx:service isProxy='false'>http://127.0.0.1:7001/TIPP_SOA_Tests2-RJMTest_JavaHelloWorld_WS-context-root/HelloWorldPort</ctx:service>
    <ctx:operation>{$operation}</ctx:operation>
    </ctx:route>

    When I run it like this I get:
    <con:errorCode>BEA-382612</con:errorCode>
         <con:reason>Error preparing message for dispatch</con:reason>

    I have tried adding a dynamic publish request action with the same xml but this gives me the same error

    I think I am following what the documentation says but it is not clear.
    Do I need to create some kind of generic Business service and connect the generic proxy service to the generic business service. If so can you give me an example of where I need to put the xml in to diticate which URL is actually called?
  • 4. Re: Oracle Service Bus Generic Endpoints
    Abhinav Journeyer
    Currently Being Moderated
    If you want to route to a business service then keep "isProxy=false" and if you want to route to a proxy service then keep "isProxy=true".

    Regards,
    Abhinav Gupta
  • 5. Re: Oracle Service Bus Generic Endpoints
    vladodias Guru
    Currently Being Moderated
    RobertMetcalf wrote:
    I think I am following what the documentation says but it is not clear.
    Do I need to create some kind of generic Business service and connect the generic proxy service to the generic business service. If so can you give me an example of where I need to put the xml in to diticate which URL is actually called?
    Into the ctx:route/ctx:service tag you should pass a reference to a business service (or a proxy service), you are passing the concrete url... The actual url should be the endpoint of your business service and the business service should be configured here...
    <ctx:route>
    <ctx:service isProxy="false">project/folder/businessservicename</ctx:service>
    <ctx:operation>foo</ctx:operation>
    </ctx:route>

    Cheers,
    Vlad
  • 6. Re: Oracle Service Bus Generic Endpoints
    Eric Elzinga Oracle ACE
    Currently Being Moderated
    maybe this one helps a bit

    http://svgonugu.wordpress.com/2011/07/31/using-dynamic-routing-in-osb/

    you could use the same logic to do a lookup of the absolute path of your resource (proxy service in this case)
    which such a lookup you will need little logic in your generic dispatcher proxy service

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points