Forum Stats

  • 3,851,532 Users
  • 2,263,994 Discussions
  • 7,904,770 Comments

Discussions

Using external Variables between proxies in OSB

734350
734350 Member Posts: 5
edited Dec 8, 2009 9:05AM in SOA Suite Discusssions
Hello there,

Im trying to figure out if it is possible, to store some kind of message (could be payload, XML, or just a string) to an external variable so it could be reused among different proxies. Anyone knows if this is possible, and if yes, how can it be implemented? I have seen in "The Definitive Guide to SOA: Oracle Service Bus, Second Edition" an approach with xquery, but im not sure if that is helpful: +"OSB has the ability to store XQuery, WSDL, XML Schema, XSLT, WS-Policy files, and more as reusable resources. The ability to store these resources (sometimes referred to as assets or artifacts) along with proxy services makes OSB a lightweight service repository. It's certainly a best practice to reuse these resources whenever possible."+

Thank you in advance
Tagged:

Answers

  • 739013
    739013 Member Posts: 13
    I don't think it is possible to share a variable between proxies. All you can do is to call one proxy from another.

    As for the reusable resources described in the book ... You can definitely reuse them without any problem, but you can hardly put any value into them from proxy service (in runtime).

    Try to describe your case. Maybe someone will help you to find an easy solution.
  • 734350
    734350 Member Posts: 5
    edited Dec 4, 2009 8:23AM
    As I said in my previous post, my case is this: I would like to be able, to have a common variable that I would be able to assign inside one proxy, and used from another proxy. I don't know if it can be implemented. Calling from one proxy to another in order to pass the variable is not my case. One scenario is that one proxy will be able to save in runtime a value in an external variable and another proxy would be able to use it. By saying :+"You can definitely reuse them without any problem, but you can hardly put any value into them from proxy service (in runtime)."+ you mean that I can have an external variable pre-assigned, but I will not be able to update in runtime? Is this 100% sure?

    Thank you for your quick answer.

    Edited by: nkod on Dec 4, 2009 5:23 AM
  • 675693
    675693 Member Posts: 160
    OSB is stateless, it doesn't store any data between invocations, so it's not possible to do this. You would have to implement the persistence mechanism yourself. For example you could store data in a database and use the fn:execute-sql() xquery function to read the data from your proxy services. Or maybe use Oracle Coherence to store your data in memory and use java callouts to read and write from it.
  • 680075
    680075 Member Posts: 463
    >
    By saying :"You can definitely reuse them without any problem, but you can hardly put any value into them from proxy service (in runtime)." you mean that I can have an external variable pre-assigned, but I will not be able to update in runtime? Is this 100% sure?
    >

    Yes, I'm sure about it.

    As Eduardo suggested, you can save your data out of OSB. However, I would encourage you to rearrange your use case because there is probably a sort of relation between your services that should be handled elsewhere and not in OSB.
  • 705706
    705706 Member Posts: 11
    I'm not sure if this is exactly what you want to do but you could easily pass the variable between the proxies as a custom transport header.
This discussion has been closed.