This discussion is archived
1 Reply Latest reply: Apr 29, 2012 4:02 AM by Swapnil Kharwadkar RSS

OSB: How to get stored in sbconsole xml document in message flow

Swapnil Kharwadkar Newbie
Currently Being Moderated
Hi

I created a xml document (say ram.xml) as a XML document utility resource in OSB sbconsole.
I want to refer this in message flow with fn:doc. Unlike xquery i can't assign ram.xml to a variable.
I tried fn:doc("/home/osbuser/user_projects/domains/domain_name/osb/config/core/ram.xml") and fn:doc("file:////home/osbuser/user_projects/domains/domain_name/osb/config/core/ram.xml") it didn't work!

I know if i store this xml as a xquery, it will get assigned to a variable. But i am just curious to see how fn:doc works!

Any light !
  • 1. Re: OSB: How to get stored in sbconsole xml document in message flow
    Swapnil Kharwadkar Newbie
    Currently Being Moderated
    The reason for this is to eliminitate each assign action for each of XMLs that I use. Each assign gets converted into a xml bean and thats overhead.
    If this fn:doc() works, what i am planning is to use fn:doc() inside my xquery transformations directly, without using assign action to load XML.
    Also message flow will become somewhat cleaner.

    fn:doc() has to be used in a way that it uses relative path to access xml and not complete path (starting from /home/user_doamains/..) because development and production environment domain names are different. Using relative path, code can migrate without any change across environments.

Legend

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