Retrieve message context variables in xquery

Hi All
I would like to know if there is any way to retrive ALSB's message context variables ($header/$body/$inbound/etc) inside an external xquery resource
for instance, I would like to declare a variable $envelope wich joins $header and $body variables, no matter which proxy service this xquery resource will be placed.
is it possible?
thanks in advance
Edited by vitor.hirota at 12/21/2007 10:41 AM

If by external XQuery resource you mean an XQuery stored in AquaLogic Service Bus rather than defined inline in the flow then the solution is to pass the details you need to the XQuery as parameters, in the same way as you would pass parameters to a method in another class if you were using Java.

Similar Messages

  • How to use one Assign action to create multiple context variables

    Hello, everyone.
    I read some tips from Oracle documentation that said:
    Avoid creating many OSB context variables that are used just once within another XQuery
    Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple "Assign" actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using "let" statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables.
    Oracle® Fusion Middleware Performance and Tuning Guide
    +11g Release 1 (11.1.1)+
    Part Number E10108-03
    But I don't know how to do that. Can you show me ?
    Thank in advance
    Edited by: Doubt_Man on Aug 17, 2011 3:30 PM

    if you return sequences, you can declare the return type of your xquery as xs:double*
    (notice the asterix at the end)
    but I have the impression that in the assign action only the first element will be assigned to the context variable
    (correct me if I am wrong)
    So in fact you might indeed have to transform the sequence into a element()*, or concatenate it into a CVS string - for instance using string-join
    http://www.xqueryfunctions.com/xq/fn_string-join.html

  • Message Context properties in Biztalk database Tables

    Hello,
    I want to retrieve messase, and status of msg and receive file Name using stored procedure
    can anybody knows where these  Message Context properties got stored in BizTalk databases.
    Thanks.

    I'll just warn again that querying the MessageBox like this is not supportable and this query has the
    potential for some undesirable side-effects.
    The correct way to accomplish what you appear to be trying is through WMI and there are many examples of prebuild queries that give you exactly what you need, including the Message Context.
    Here are some examples:
    http://blogs.msdn.com/b/biztalknotes/archive/2013/05/22/saving-suspended-messages-using-wmi-powershell-and-the-microsoft-biztalk-operations-assembly-part-i.aspx
    http://blogs.msdn.com/b/biztalknotes/archive/2013/10/02/saving-suspended-messages-using-wmi-powershell-and-the-microsoft-biztalk-operations-assembly-part-ii.aspx
    You can also create a listener for Suspended Message event using WMI:
    https://msdn.microsoft.com/en-us/library/aa577357.aspx?f=255&MSPPError=-2147217396
    Basically, do not try to query the MessageBox directly.

  • Accessing OSB variables in  XQuery Transformation

    Hi All,
    I have a requirement to access OSB variable in XQuery context.
    Anybody has any idea on how to get this?
    Thanks,
    Praveen

    the xquery doesn't know anything on runtime about the variables like $body, $header, etc
    so like Prabu said, you will need to pass all that data to your xquery as parameter to be able to query them

  • Context variables

    Maybe I'm just missing something obvious here, but ...
    I have a JSP page that works fine under Tomcat, but it doesn't work under WebSphere.
    The JSP includes a couple of lines that retrieve context variables, as in:
    foobar=application.getInitParameter("foo.bar");In my web.xml file, there's a block that says:
    <context-param>
    <param-name>foo.bar</param-name>
    <param-value>plugh</param-value>
    </context-param>As I say, in Tomcat this works great. In WebSphere it looks like it just turns up null. Is there a differerent way to do this in WebSphere, or am I missing some subtlety?

    This functionality is detailed as part of the Servlet Specification, and as such should be implemented correctly by all J2EE containers.
    ie: It should work exactly the same under WebSphere.
    Maybe try the application.getInitParameterNames() method to see what websphere returns you?

  • Context variable DRIXMD (namespace DR$APPCTX) shows up in v$context

    We have recently upgraded our database to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
    Now we occasionally get the error in one of our APEX applications
    ORA-01031: insufficiënt privileges
    The apex application is using a user connection pool.
    When an Apex page is submitted we clear the context variables so the user won’t use each other’s settings.
    The context variables to be cleared are selected from V$CONTEXT.
    For some reason the context variable DRIXMD (namespace DR$APPCTX) is now (since the upgrade to 11.2) also shown in v$context.
    The package used in our code is not allowed to set variables in namespace DR$APPCTX and is raising the error.
    My question is:
    Is it a normal feature to see these context variables in V$CONTEX and if not is there a fix available?
    And if yes, can anyone clarify this?
    Thanks in advance.

    Success!!!
    I had to grant this permissions:
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
    As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
    voytec001

  • How to Parse XML data directly from context variables in webdynpro

    Hello,
       I have two requirements:
    1) I have a context variable which has string value.
       I want to write the this value into a flat file.
       How do I do this in WebDynpro.
       Any sample code for this.
    2) In Webdynpro, I want to parse and process the XML data directly from a string context variable which
       has the value in XML format.
       How do I achieve this. Any pointers or sample codes for this.
    Thanks and Regards,
    Anupama.

    Anupama,
    Here is some link which talks about unpacking xml and converting to HTML.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm</a>
    I have done something like this in portal development and not in webdynpro.But in principle it should work very where.

  • Setting de-batched message specific message context properties in custom disassembler

    I have recently created a custom disassemble component which can handle a message batch. The message batch can contain multiple messages and the custom component during de-batching recognizes this and does appropriate disassembly. All this is working fine.
    The issue I have is that in the disassembler in the disassembled message part I copy the base message context, then assign additional properties. This is resulting in the context of the base message getting modified and as a result, all messages come into
    BizTalk with the same context (which is wrong) but the correct message data.
    So I could trace it to the statement debatchedMessage.Context = pInMsg.Context. It is not the copy but the reference which is being passed which is causing an overwrite and causing me grief.
    Anybody else noticed this behavior? or perhaps knows of a fix? or perhaps knows of a method which will allow me to
    COPY the message context?
    Regards.

    What you are seeing is the expected behavior.  You are correct:
    debatchedMessage.Context = pInMsg.Context
    merely assigns the context as a reference.
    There is no shortcut to copying the context properties as there is in an Orchestration so you have to copy them one by one:
    for (int i = 0; i < pInMsg.Context.CountProperties; i++)
    string Name
    string Namespace;
    object PropValue = pInMsg.Context.ReadAt(i, out Name, out Namespace);
    if (pInMsg.Context.IsPromoted(Name, Namespace))
    outMsg.Context.Promote(Name, Namespace, PropValue);
    else
    outMsg.Context.Write(Name, Namespace, PropValue);

  • Modify Application: Error Message:: Object Variable or With Block variable

    Hi Experts,
    We just installed 5.1 on our server and once the application is installed.
    When I try to modify the aplication I get this error at the end
    This is step what the modify app does:
    Check environment information
    Drop Fact table index.
    Modify fact table.
    Update application information.
    Set Fact table index.
    Create stored procedures and comment table.
    Increase application version and make legal consolidation table.
    Make OLAP database and Journal/Audit reports. / Validate dimension formulas.
    Error Message:: Object Variable or With Block variable
    Any one has any any answer ? I will appreciate your help on this.
    Thanks

    Please check if Reporting Services is working properly.
    Just open IE and type http://nameofserver/reports
    If you receive any error then you have to fix that error verifying configuration of RS.
    If RS is working make sure you add the right information into Server Manager Server Option for RS and Report Server virtual directory.
    Also please check the tblappsetinfo to have all the fields completed (regarding servers).
    Regards
    Sorin Radulescu

  • Can I retrieve messages from a blackberry email address in Mail for OS X?

    I'm wondering if I can configure Mac OS X Mail to retrieve messages from a blackberry email address.
    Thanks.

    lte me know if my question doesn't make sense.

  • Context Variables related

    Hello,
    In context file we have context variables rite..so kindly tell me the table in which all these context variables will be stored in database.The table name which stores all the context variables.
    Thanks,
    928714.

    Hi;
    Pelase see:
    Oracle EBS R12 Context Variables [ID 458282.1]
    Explanation of Context Variables for Shared Application File System in R12 and 11i [ID 1070152.1]
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • TS3899 In the past I have been able to retreive all messages not deleted in the inbox of my mailbox.  This week I have not been able to acces messages received prior to 9/10/13.  what can I do to retrieve messages eceived prior to 9/10/13.

    Until recently I have been able to retrieve all messages not deleted i m mailbox "inbox".  Today I can only retrieve messages from 9/10/13 to present.  How can i retreive all previously sent messages that were not deleted?

    Settings > Mail, Contacts, Calendars > Tap the account in question > Mail days to sync - increase the time to sync.

  • Context variable in report configuration

    Hello,
    I try to create a context variable for a select-option  as indicated in the documentation of the customizing.
    I go in img structure Service Consumption Layer Reporting Administration
       then Report settings
       then Manage context variables
    I define a context group
       then a go to the sub screen Manage context variable
    I define a new variable but in field Contr type, I can only select P for parameter and not S for select option.
    I check the data element /IWCNT/CON_VAR_TYPE which is define  with a value range containing only P.
    Did I do something wrong ?
    I suppose that is why when I define the report, in screen parameters and values,  the fields context group and context variable in display and not in input mode .
    Thasnk ina dvance for your help
    jfj

    Hi,
    Easier option is to create a profit center group excluding the dummy profit center and assign it in the report painter instead of the variable.
    Other option is at the time of executing the report, exclude the dummy profit center with out making any changes in the report.
    Regards
    Sudhakar Reddy

  • Accessing user-defined context variables when chaining Proxies

    We have a Proxy Service, A, which routes to a ProxyService B, which does some routing and XML transformation.
    When an error is raised, the error text is assigned to a variable and the Error Handler for Proxy Servce B assigns soap fault XML to the body using this variable then does a Reply with Failure.
    However, Proxy Service A returns a generic BEA fault as below:
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-380000</con:errorCode>
         <con:location>
         <con:node>ESB-DefaultRoute</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>
    We don't appear to be able to access the context variable which we defined in Proxy Service B when we are in the Error Handler of Proxy Service A. How are we able to return a soap fault from Proxy Service A with all of the details set in B.
    Thanks in advance

    Hi,
    Yes we;re using Raise Error. I don't think my post was as clear as it could have been :-)
    In Proxy B when an error is found, then the text we want to appear in the soap fault's faultstring is assigned to a varaible, errorDetail and then Raise Error is invoked.
    We're able to access errorDetail iin the error handlers of Proxy B but not in Proxy A and it's this which is causing us the issue.
    Thanks

  • When and how does the message context get removed from the message when we use pass thru send port

    Friends,
    i have a doubt regarding message context.
    Assume i have used XMLRecieve pipeline in the receive side to receive the message so that the message context is created. I.e properties are promoted/written.
    now if we use pass thru transmit pipe line at send side, how and when does the message context get removed from the message?? Since pass thru does not have any stages/components, how does the message context removed and sent out a pure message to destination???
     i mean what exactly happens here to remove the context??
    Ravindar

    Thanks for the reply.
    "The Context is created by the Adapter, regardless of any Pipeline or Pipeline Component.  It has nothing to do with PassThrough vs. XmlReceive, although XmlReceive will write Promoted Properties to the existing Context,
    as can any other Component."
    yeah yeah, adapter does create some properties in context. You are right, i am aware of it. I just missed to explain it clearly. what i meant is addition of context properties will not happen if pass thru used. Thanks its clear.
    "No.  The Context already exists on the Message when it comes from the MessageBox and
    is equally available to any Component in any Stage.  The Context that hits the Pipeline is whatever was last Persisted, either by a Receive Port or Orchestration.  It is not created by the XmlAssembler (XmlTransmit)"
    You are right , the context already exists on the message while it leaves the receive port, and once it persists
    to message box the context and message context gets stored in messages in relative tables.
    Now as you said the components get the message from the last persistence, assume i have a send port(with passthru)
    subscriber and a orchestration subsrciber for this message.
    Orchestration gets the message with context right!!
    if the send sendport(with passthru) also gets message along with context, then where is this context removed/demoted
    while sending it out?.  i guess as per SAAkhlaq said,
    here sendport(with passthru) should get a pure message without context as passthru used. 
    or is it that ultimately send adapter removes the context completely?
    or is it something like biztalk run time load the context from database into cache and both orchestration and send port gets pure message, and if needed they use context from cache???
    sorry i may be troubling you, but i am confused. i hope i am not creating any nuisance with this
    post.
    Ravindar

Maybe you are looking for

  • How to transfer an iphone's libraries from one pc to another one?

    Hi all, I used to synch my 3gs iphone using my laptop (xp window). However, this laptop currently had started having problem with its hard drive so I decided to use another laptop (window 7) for synching my iphone in the future. I really do not want

  • Cant do anything

    just got my daughter 8gb nano pluged it in and the set up assistant doesnt come up. downloaded itunes assistant still wont come up and itunes wont open {error every time i click the icon} my computer reconizer the ipod but media player doesnt. i cant

  • CreateSparseDisk error using Convert-WindowsImage.ps1 to create VHD for Windows 10 Preview

    I have been trying to use convert-windowsimage.ps1 to create a Windows 10 .VHD under Windows 8.1 (inside VirtualBox) .\convert-windowsimage.ps1 -Sourcepath .\install.wim -Edition Professional -VHDFormat VHD -DiskType Fixed -SizeBytes 40GB -VHDPath .\

  • WD Crashes

    Hi, while starting my WD the following error message appears: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Error while obtaining JCO connection.      at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker$1.fillSldConnection(D

  • Writing to the spool the ouput

    Hi All,    The alv which i have displayed as output should be sent to the spool in the same program of report. Reagrds kumar