6 Replies Latest reply: Dec 3, 2012 9:36 PM by vladodias RSS

    Parameters in OSB End-point URL

    RK..
      Hi:

      I have a OSB end-point URL say

      https://XXX.XX.XX.XX:7002/Sample/Books

      which is exposed as proxy service with ServiceType as "Any XML Service", and this routes to a business service whose protocol is "jms" and ServiceType is also "Any XML Service".

      I have shared across the proxy end--point URL to other application. Now they have two kind of books available in other application, they want to send across the same as parameters in the same end-point URL like

      https://XXX.XX.XX.XX:7002/Sample/Books?Type=Fiction

      https://XXX.XX.XX.XX:7002/Sample/Books?Type=WarBased

      Now my question is will my OSB service able to pick-up the above case and based on the parameters will we be able to route it to the Business service along with the parametes. For doing that do i need to maintain any schema for Business Service?

      Regards,
      RK
        • 1. Re: Parameters in OSB End-point URL
          Abhinav
          RK,

          Use the *$inbound/ctx:transport/ctx:request/http:query-string* element to get all the arguments in the URL.

          http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/httppollertransport/transports.html#wp1083292.

          After that You can have conditional routing to Route it specific BS either Fiction BS or WarBased BS or you can try using Routing Table.

          For doing that do i need to maintain any schema for Business Service?
          No , I think if you just need to route the request to JMS BS coming from Other Application,
          But if You want to validate the request which you would be sending to BS then use schema to validate your incoming request.

          Regards,
          Abhinav
          • 2. Re: Parameters in OSB End-point URL
            RK..
            Thanks Abhinav. But i need to have only one Business Service rather than two. At that case i need to get the parameter and send across the same in payload to Business service. So i need to have a schema for it right?

            Regards,
            RK
            • 3. Re: Parameters in OSB End-point URL
              Abhinav
              At that case i need to get the parameter and send across the same in payload to Business service
              Elements in the outbound you should be populating if you want to send query strings to BS.

              *$outbound/ctx:transport/ctx:request/http:query-string*
              *$outbound/ctx:transport/ctx:request/http:relative-URI*
              • 4. Re: Parameters in OSB End-point URL
                RK..
                Hi Abhinav:


                Quickly went through the link, in my proxy service i have created a branch and inside it i have this

                $inbound/transport/request/http:query-string

                Now how do i look for Type=Fiction inside the Branch?

                Basically how to use this? Is only the above query alone is enough?

                Regards,
                RK

                Edited by: RK.. on 3/12/2012 19:32
                • 5. Re: Parameters in OSB End-point URL
                  vladodias
                  RK.. wrote:
                  send across the same in payload to Business service. So i need to have a schema for it right?
                  It's not strictly needed as you can send any xml "untyped" to BS as well, but would recommend having a schema as it will help on designing transformations...
                  • 6. Re: Parameters in OSB End-point URL
                    Abhinav
                    use the below code in assign action to assign it to a user defined variable let $c before conditional branching and use the same in conditional branching

                    <query-params>
                    {
                    <param name="{fn:substring-after($c,"=")}">
                    </param>
                    }
                    </query-params>

                    Hope it helps !!