Reuse a variable in OSB XPATH expression editor

I have a problem with replacing activity in Oracle Service Bus.
I created a variable with the follow content
<response>
<operationResponse name="OPERATION1" result=""/>
<operationResponse name="OPERATION2" result=""/>
<operationResponse name="OPERATION3" result=""/>
<operationResponse name="OPERATION4" result=""/>
</response>
For each operationResponse I call a businessProxy that invokes an external webservice. If this call is made with success, I replace `result=""` with `result="1"`.
I have created a replace activity like this:
<con3:replace contents-only="true" varName="responseElement"> <!-- var responseElement = <response>.*</response> -->
<con2:id>_ActionId-3886365367816551561--27a55993.13f0a38ab8f.-7c95</con2:id>
<con3:location>
<con2:xpathText>./operationResponse/@result</con2:xpathText>
</con3:location>
<con3:expr>
<con2:xqueryText>"1"</con2:xqueryText>
</con3:expr>
</con3:replace>
After running this program, all the attributes "results" are replaced by "1", if the businessService is called successfully.
The problems is that I need to replace the attribute "result" only for the element operationResponse that have the attribute "name" equal to the operationResponse that invokes the businessService.
I have created a variable called operationName that contains the current response/operationResponse. I used ./operationResponse[@name=$operationName]/@result.
The OSB XPATH expression editor is throwing the follow error:
Variable "$operationName" used but not declared for expression
Can anyone help with this?

Hi, XPath and XQuery are conceptually different. XPath expression can not have variables while an XQuery expression can have a variable inside the XPath when the expression is bound to a variable.
To work around the issue, instead of using the condition in XPath expression inside replace you should write the XQuery expression of REplace in such a way that it results in what you need.
For ex. if I take the example above:
say the content of $body is as below:
<soap-env:Body>
<aaa>
<bbb>
<ccc>A</ccc>
<key>1</key>
</bbb>
<bbb>
<ccc>B</ccc>
<key>2</key>
</bbb>
</aaa>
</soap-env:Body>
and you wanted to replace values of ccc to X for any bbb elements which have key=1(and you have saved a variable called keyCheck with value '1' earlier in the flow), then you could do the following:
Replace contents of  . in body with
<aaa>
for $bbb in $body/aaa/bbb
if ($bbb/key/text() = $keyCheck)
then
<bbb>
<ccc>X</ccc>
<key>{$bbb/key/text()}</key>
</bbb>
else
$bbb
</aaa>

Similar Messages

  • Extracting node value from XPath Expression in OSB Conditional Branch

    HI All
    While using conditional branch in OSB,i only get an XPath Expression editor to set a variable used to test a condition.
    Now let's say my request is
    <Body>
    <exam:PersonSearchReq xmlns:exam="http://www.example.org">
    <exam:RequestorSSO>James</exam:RequestorSSO>
    </exam:PersonSearchReq>
    </Body>
    I write my XPath expression as :
    ./exam:PersonSearchReq/exam:RequestorSSO/text()
    Now if I test this using the tester application , insted of getting node value 'James' ,i get the entire node element ,i.e
    <exam:RequestorSSO xmlns:exam="http://www.example.org">James</exam:RequestorSSO>
    Please suggest how can i extract the text value.
    Regards,
    Chinmay

    Hi Guys
    Actually it turns out that you need to populate In-Variable to function is correctly.As soon as i entere 'body' in it,it worked fine.
    Thanks
    Chinmay

  • Using substring in the XPATH expression for Receiver Determination

    Hello, I need a little help please.  In my receiver determination, I have a condition and I need to do a "not like" check.   Basically, if the first three positions of the source field does not start with a specific code, then I need to execute the condition.   The condition editor does not support a "not like" operand, so I went to the XPATH expression editor.  I tried to used the XPATH substring function to get the first three characters and then do a "not equal" operand, but it doesn't appear to work.  There are not any runtime errors, but the condition is not executing.  Any ideas on this?  Does the XPATH expression support the substring function?

    Hi Jesse,
    Can you please explain what is the meaning of http:// in the statement
    /p1:PRODUCT/MATNRhttp://not(substring(.,string-length(.) - 2) = '123')
    Please explein, I am having same issue. It is not working here.In My case it is
    /p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,\"D\"))]
    also tried with
    /p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,'D'))]
    Thanks in advance!

  • In XSLT, make XPath expression to retrieve attribute nodes

    I have a problem fetching attribute nodes in an Xpath expression.
    SOAP Request:
    <Create ID=5/>
    <Name>Per</Name>
    I want to fetch the value of ID and put it into another variable with an XPath expression in a XSLT transformation.
    If you look at http://www.w3schools.com/xpath/xpath_syntax.asp
    You should be able to do this with "//Create[@ID]" according to the examples, but this is not working at all in JDev.
    Any thoughts?
    /Per

    Thanks, that worked!
    Just thought about it. How do you do the other way around.
    <Create>
    <ID>7</ID>
    to
    <Create ID=7>
    .

  • Using the variable placeholder ? in an XPath expression

    I'm trying to using the variable operator (?) in an Oracle prepared statement used in a query where clause. Here is the query:
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where existsNode(E.XML_EVENT_CONTENT, '/xae:auditable-event[xae:event-type=?]','xmlns:xae="http://gov/va/med/datasharing/audit/endpoint/audit"') = 1This code works when the ? is replaced with "aValue". I need to use the ? so that my Java client can pass a variable value into the query.
    Is this a supportable feature or am I doing something wrong?
    I didn't see any examples in the Oracle XML DB Developers Guide where there was a ? in an XPath expression.
    I also tried "?" with the same issue...
    Here is the version info:
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 10 18:41:55 2012
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAny assistance would be greatly appreciated.
    Thanks in advance...
    Edited by: flyeagle5683 on Sep 10, 2012 5:49 PM

    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where XMLEXISTS(
                           'declarre namespace xae ="http://gov/va/med/datasharing/audit/endpoint/audit"; (: :)
                            $XML/xae:auditable-event[xae:event-type=$VALUE]'
                            passing e.xml_event_content as "XML",
                                      :1 as "VALUE"
                ) or you can do
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
          WHERE EVENT_TYPE = :1Edited by: mdrake on Sep 10, 2012 7:23 PM
    Edited by: mdrake on Sep 10, 2012 7:24 PM

  • Using the variable ? operator in an XPath Expression

    I'm trying to using the variable operator (?) in an Oracle prepared statement used in a query where clause. Here is the query:
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where existsNode(E.XML_EVENT_CONTENT, '/xae:auditable-event[xae:event-type=?]','xmlns:xae="http://gov/va/med/datasharing/audit/endpoint/audit"') = 1This code works when the ? is replaced with "aValue". I need to use the ? so that my Java client can pass a variable value into the query.
    Is this a supportable feature or am I doing something wrong?
    I didn't see any examples in the Oracle XML DB Developers Guide where there was a ? in an XPath expression.
    I also tried "?" with the same issue...
    Here is the version info:
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 10 18:41:55 2012
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAny assistance would be greatly appreciated.
    Thanks in advance...

    I incorporated this suggestion and it worked very well. Thanks!
    Now I have converted my solution to use a structured index. As such, I want to write the where clauses in terms of column names rather than XPath expressions.
    I hoped it was as simple as changing the code that generates the XPath expression to generate a SQL expression. After making that change, I'm now getting this error:
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00920: invalid relational operator
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:686)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:617)
         at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:559)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1077)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490)
         at gov.va.med.datasharing.audit.dao.jdbc.runner.MapQueryRunner.run(MapQueryRunner.java:47)
         at gov.va.med.datasharing.audit.web.dao.jdbc.AuditableEventsQueryDAOImpl.getAuditableEventsByDate(AuditableEventsQueryDAOImpl.java:150)It seemed to me that if it worked for the XPath expression that it should also work for the SQL expression.
    The static SQL is:
    SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
      (SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
         (SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
            FROM AUDITABLE_EVENT_XML aet,
              XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                '/xae:auditable-event'
                PASSING aet.xml_event_content
                COLUMNS
                EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                SENDING_SITE     VARCHAR2(255) PATH 'xae:sending-site',
                RECEIVING_SITE   VARCHAR2(255) PATH 'xae:receiving-site',
                EVENT_ID         VARCHAR2(255) PATH 'xae:event-id',
                PATIENT_ID           VARCHAR2(255) PATH 'xae:patient-id',
                OUTCOME                VARCHAR2(255) PATH 'xae:outcome') xt
            WHERE aet.CREATED_TIME BETWEEN ? AND ?
                 AND ?
          ) ORDER BY CREATED_TIME desc
        ) WHERE rn &gt; ? and rn &lt;= ?So I'm thinking that Oracle must perform strong checking in SQL, not allowing the '=' operator to be substituted. If I run this query in Toad, replacing the ? with the SQL, it runs fine...
    Can someone tell me whether or not this is a legal substitution?
    The SQL that runs in Toad is:
    SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
      (SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
         (SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
            FROM AUDITABLE_EVENT_XML aet,
              XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                '/xae:auditable-event'
                PASSING aet.xml_event_content
                COLUMNS
                EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                SENDING_SITE     VARCHAR2(255) PATH 'xae:sending-site',
                RECEIVING_SITE   VARCHAR2(255) PATH 'xae:receiving-site',
                EVENT_ID         VARCHAR2(255) PATH 'xae:event-id',
                PATIENT_ID         VARCHAR2(255) PATH 'xae:patient-id',
                OUTCOME             VARCHAR2(255) PATH 'xae:outcome') xt
            WHERE aet.CREATED_TIME BETWEEN TO_DATE ('9/19/2011 12:00:01 AM','MM/DD/YYYY HH:MI:SS PM')
                                         AND TO_DATE ('12/20/2012 12:00:00 AM','MM/DD/YYYY HH:MI:SS PM')
                AND (OUTCOME=0 or OUTCOME=1)
          ) ORDER BY CREATED_TIME desc
        ) WHERE rn > 0 and rn <= 5;Any assistance will be appreciated,
    Thanks in advance.

  • Including customized xquery functions in XQuery/XSLT expression Editor-OSB

    Hi,
    I have written a customized xquery function. I want this to be included in the List of Xquery Functions which is displayed by Oracle Service Bus in the XQuery/XSLT
    Expression Editor. OSB displays the built in xquery functions in the XSLT/Xquey Expression Editor. Is there any way to add the customised xquery to this list, so that it can be dragged and dropped later?
    Thanks,
    Balaji.

    I doubt if that is exposed out side of Oracle Engineering (Not public/documented). Please raise a support ticket for enhancement. If PM should concur you might get the steps that need to be performed for this feature.
    Thanks
    Manoj
    Edited by: Manoj Neelapu on Jun 8, 2010 8:37 AM

  • Using a xpath expression stored in a variable

    Hi All,
    I have an xpath expression which is stored in the database which I need to use against the request XML. I am able to retrieve this Xpath expression from the database, but not able to use it against the request XML.
    Xpath expression got from the database is: /request/param//name.
    I have tried $body/$XpathVariable, this does not work. I can not hard code this expression during my design time, so the details of the expression has to be fetched at run time.
    Any ideas to get the value would helpful.
    Thanks

    try to assign this value to a temp variable and then in the XqueryExpression try to retrieve it starting with "//"

  • Xpath expression in condition editor

    Hi Expert Forum !
    I have an xml structure like this :
    <aaa>
      <bbb>
        <ccc>
        </ccc>
      </bbb>
    </aaa>
    In my condition editor (receiver determination) I want to refer to an element which is a child of node <ccc>. However, node ccc is not defined in my data type.
    I can without any problems type my xpath expression manually but it doesn't seem to work though. As if it doesn't recognize node ccc if it's not in the data type. I know for 100% sure that node ccc will be in my inbound message.
    Is it possible to reference an element in the condition editor - knowing that it will be present in the inbound message - even though it's not defined in the underlying data type ??
    So why not just change the data type if I know <ccc> will be there? Well, data type is an external definition and I don't wanna edit it only to support an xpath expression in my rec. determination. If I can avoid it...
    Message was edited by:
            Hans Hougaard
    Message was edited by:
            Hans Hougaard

    Managed to make xpath expression work. It is possible to reference an element which is not defined in the data type. My problem turned out to be a namespace issue..

  • XPath Expression at Condition Editor in Receiver Determination

    Hi,
      I have a fixed length flat file coming in into which I have to look at the first line's 4th to 7th positions. Based on that if it is "1234" then I need to route it to the receiver else I will ignore in the receiver determination.
    Example input file -
    M 0123456789ABCDEFGHIJKL
    PR0123456789JIDFJDIFJD0244
    PA0123456789JFDJF9384384K
    We have module configuration where we are converting this to a line value pair something like this -
    <?xml version="1.0" encoding="utf-8"?>
    <ns:GMTLog xmlns:ns="http://sap.com/xi/GMStoreConnectivity">
        <Line>
            <Value>M 0123456789ABCDEFGHIJKL
            </Value>
         </Line>
          <Line>
            <Value>PR0123456789JIDFJDIFJD0244
            </Value>
          </Line>
           <Line>
            <Value>PA0123456789JFDJF9384384K
            </Value>
          </Line>
    </ns:GMTLog>
    When I tried to test my xpath in xpath tester it is working fine with the below xpath expressions -
    1. /ns:GMTLog/Line[Value][1] --> This returned the first record completely
    2. substring(/ns:GMTLog/Line[Value][1], 4, 4) --> This returned exactly what I am expecting "1234"
    But the above 2 are not working in condition editor.
    May I know the exact xpath expression to be used in this case to route the message to receiver when 4th to 7th position is "1234".
    Thanks a lot in advance.
    Regards,
    Sarat

    Good day. Can I please have some clarity on what I need to correct on my Receiver expression test.
    For the number of instances of the Summary segment, I am required to identify and test the Summary amount of SUMME if this is more than 5.00 (a currency amount). SUMME is a string so I thought I should convert this to a "number" value to test it.
    Also ensuring that SUMME is checked when the SUMID is equal to 011.
    Now I hope part of my solution below is correct, but the test of the field value is not being done.
    Please help.

  • Include variable into xpath expression of transformation activity

    Are we able to include variable from the BPEL process into the xpath expression of the transformation activity?
    I tried it but I received error saying it does not recognize the function bpws:getVariableData('loopCounter') when I included it into the xpath expression inside the transformation.
    Thanks.
    Kenny

    Maybe I am giving a bad example. Instead of bpws:getVariableData('loopCounter'), I need something like bpws:getVariableData('accountName') which is being used in the filter like /root/accounts/account[name=bpws:getVariableData('accountName')]
    The assign will not work in this xpath expression because it return multiple nodes in source.

  • UCCX 8.5.1 - Expression editor and a variable string value error

    I receive the followng error when trying to create a varialbe string value using the expression editor. The string value that I am trying to create is used with the Create URL Document Object. The popup error states 'Unable to parse expression: Couldn't repair and continue the parsing on token #ID 'FindCaseByCaseNumber' (line 1, col:24)'  The string value is "<Message MessageType="FindCaseByCaseNumber" Source="APIMessage" ReferenceNumber="1" NodeID="1" UserID="1"><CaseNumber>"05-CP-001842"</CaseNumber></Message>". The editor will not let me save the string value with quotation marks being used in the string value, exampe "FindCaseByCaseNumber". When I remove the quotation marks from the string value the editor will save the value but then the variable will not work.
    Has anyone encountered this same problem or know what to replace the "" to terminate the string value? I have tried brackets, but this does not work. Any suggestions are greatly appreciated!

    I found my answer. It appears that ${}, #{}, and ' will let you add a sub-variable to a variable string value.

  • XPath expression for Native Schema (Opaque)

    Hi people,
    I have a BPEL process that dequeues a message using AQ Adapter, and we are using a Native (Opaque) schema for that, since we do not have the XSD available for this message. The XML Message generated is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <input_Dequeue_InputVariable>
    - <part>
    - <ns1:XXOD_IN_PERI_MWDProcessRequest xmlns:ns1="http://xmlns.oracle.com/XXOD_IN_PERI_MWD">
    <ns1:UE>3704</ns1:UE>
    <ns1:MATRICULA>00003953-0</ns1:MATRICULA>
    <ns1:CODIGOVERBA>PE</ns1:CODIGOVERBA>
    <ns1:TIPOVALOR>PCT</ns1:TIPOVALOR>
    <ns1:DATAINICIO>2009-09-15</ns1:DATAINICIO>
    <ns1:DATAFIM />
    <ns1:VALOR>30,0000000</ns1:VALOR>
    <ns1:ACAO>I</ns1:ACAO>
    </ns1:XXOD_IN_PERI_MWDProcessRequest>
    </part>
    </input_Dequeue_InputVariable>
    When i dequeue this, i use the following expression to get the value of tag ns1:ACAO in a copy operation:
    bpws:getVariableData('input_Dequeue_InputVariable','opaque', '//ns1:ACAO')
    However, this expression seems to be evaluating to NULL on the assign activity. I believe i am not using the correct Xpath expression to extract that... Do you know what is the correct XPath expression to extract this tag in this case?
    I am using SOA Suite 10.1.3.5.
    Best Regards
    Thiago
    Edited by: Thiago on Jan 28, 2010 5:08 PM

    Hi Eric,
    Unfortunately not. When the schema is Opaque, the variable in BPEL editor shows as "opaque", when i open it on the variable editor i see only the root element named "ns4:opaqueElement", and not the structure of the actual XML. I think it happens because this variable is not bound to any XSD...
    Thanks and Regards
    Thiago

  • Global Constants / Variable in OSB

    I want to define global Constants / Variable in OSB and I want to access them in XSLT when I am tranforming the requests...
    Any idea how can I do that?
    I want to use these variables and constants for server name and ports (in different environment) and some other stuff.

    We have done a similar implementation for the same scenario. We have created a Xquery where we put in the configuration information as an XML and then in the pipeline stages we use the Assign the Xquery to a a temporary variable and then use the values of the xml using relative xpath expressions.
    This way any time we need to make any changes to the confguration we know once place we can change and it gets reflected in the complete code base.
    Below is how we have done it:
    - create a Xquery with xml configurations (say commonconfig.xq)
    - then using the Assign action get the output of this xquery into a temp var (say commonConfig)
    - then use the configurable values using the relative xpath in the Assign action (say Assign $commonConfig/param1/text() to param1Value
    Let me know if you need further information.
    Thanks,
    Patrick

  • OSB: xpath as result of Xquery output ?

    Hi
    I have a non-schema bound XML as input. It will have "KEYWORD" as value of one of the tags.
    I want dynamic text "hello" in place of KEYWORD.
    As of now I convert XML in string with fn-bea:serialize() and then do a fn:replace.
    viz:
    let $received_input :=<C><D>KEYWORD</D></C>
    let $convertedXML:= fn-serialize($received_input)
    let $temp_string:= fn:replace($convertedXML,"KEYWORD","hello")
    let $final_output:=fn-bea:inlinedXML($temp_string)
    return $final_output
    Now note that input xml will always vary, like *<Z>KEYWORD</Z>* or <B><C><D>KEYWORD</D><E>KEYWORD</E></C></B> or anything, only "KEYWORD" will be present for sure.
    Since input xml varies, i don't have a schema. What if I want to use replace action with node contents in variable received_input? I would need to compute xpath of node which has value=KEYWORD. This is dynamic calculation of xpath.
    I wonder if there is a xquery function that I could use in OSB for this? Basically idea is to give input a value and function returns xpath of the node which conntains the value.
    Thanks and Regards
    Swapnil Kharwadkar

    Hi Swapnil Kharwadkar,
    You can do what you want using plain xpath...
    $input =
    <a>
    <b>b</b>
    <c>keyword</c>
    <d>d</d>
    <e>keyword</e>
    </a>$value = 'hello'
    Replace Xpath = //*[. = 'keyword'] in variable = $input expression = $value (replace node contents) will give you...
    <a>
    <b>b</b>
    <c>hello</c>
    <d>d</d>
    <e>hello</e>
    </a>This will work for any schema as the xpath expression is searching by content only...
    Hope this helps...
    Cheers,
    Vlad

Maybe you are looking for

  • Voice navigation not working on iOS 6 maps 4S

    Voice navigation is not working, no voice Coming out of maps  on iPhone 4S maps on iOS 6/6.0.1 I have tried everything . Help needed!

  • BPM : too many alerts in a process step - how to remove older alerts ?

    Hello One question about Business Process Monitoring : We have too much alerts in a process step, so it takes 20 minutes to display them. How can we reduce the number of alerts in this process step ? Thanks in advance. Regards Fred

  • To search for Who(USER) who maintained value for a Condition Type(Pr00)

    Hi Team, Do we have a table where in i can search for the Userwho maintained Pricing record for base value of a material.. I have the Material and i want to check who created this Condition Base Value Record ..And ask him to maintain it correctly aga

  • HT201210 Restore mode

    problem while trying to update my iphone 4 said would go to restore mode does that mean i loose all my music, texts and photos?

  • FSRM and Quota's showing incorrect values

    Hi, I have set up folder quota's, and on one folder I have set it to 100GB.  This Quota shows as 99% used, but the actual folder in Explorer shows only as 28GB used.  What am I missing, or set up wrong, or is there a fix that needs to be applied? (I