The XPath expression  problem

Hi everyone,
I developed a workflow. I builded and deployed successfully.
And I assing this workflow to a policy.
I create a request, but this request gave a fail.
Error in <assign> expression: <to> value is empty at line "181". The XPath expression : "" returns zero node, when applied to document shown below:
Line 181 :
<copy>
<from variable="inputVariable" part="payload"
query="/ns3:process/ns4:RequestID"/>
<to variable="initiateTaskInput" part="payload"
query="/ns2:initiateTask/task:task/task:payload/task:RequestID"/>
</copy>
It seems that I could not take requestID.
Do you have any idea ?
Thanks for your help.
Regards

How did you resolve the issue?  We're facing the same problem.

Similar Messages

  • The result is empty for the XPath expression

    Hi friends
    Please, could anyone help-me with this issue? My BPEL process was working yesterday and stoped today...
    I think I´m facing a namespace problem.
    If I start my process using BPEL Console, filling the "HTML form" option, all works ok.
    If my process is started by a call from another bpel process, my XPath query gives me an error, but the 2 received messages are "almost" egual:
    Using BPEL Console:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage ns1:BatchId="" ns1:PrimaryKey="" ns1:RejectionId="invalid_msg_processName_token1_token2_token3" ns1:BatchInfo="" >
    <MessageHeader/>
    <MessagePayload/>
    <RejectionReason/>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    Started by another BPEL Process:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage RejectionId="INVALID_MSG_BatchTest_Read_20060418_101233_0463" BatchId="" BatchInfo="" PrimaryKey="" >
    <MessageHeader/>
    <MessagePayload> AgICAgICAgICAgICAgICAgIE1aIEpBSVJPUyAg MDYwMzA4MTAwMQ0K </MessagePayload>
    <RejectionReason> ORABPEL-11008</RejectionReason>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    XPath Query:
    bpws:getVariableData('RejectionMessage','message','/ns2:RejectedMessage/@ns2:RejectionId')
    In the first case, it works.
    In the second case, it raises a "The result is empty for the XPath expression" error.
    As you can see, this process is used as a "Rejection Handler" process: It implements the interface defined in RejectionMessage.wsdl
    Could you help me?
    Thanks in advance

    Hi All
    I find a workaround to the problem. I´m almost sure it is a bug in BPEL.
    As you can see on my previous post, the diferences between the two messages is that the attributes have qualified names on one message and unqualified names on the other: ns1:BatchId, ns1:PrimaryKey...
    The schema definition for this message (JCAErrorHandling.xsd) define that attribute names MUST be qualified (attributeFormDefault="qualified"). The problem is that the File Adapter sends the message with unqualified attribute names!!
    So I edited JCAErrorHandling.xsd (<ORACLE_HOME>\integration\orabpel\system\xmllib\jca) file, changing it to attributeFormDefault="unqualified".
    The correct solution is to fix File Adapter to send the message with qualified names, so I´m opening a Service Request at Oracle Metalink.
    Thanks.

  • Receiver determination - Xpath expression problem with count

    I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice.  If it is greater than the number I want to write out a file to be processed by a different process on the receiving end.  I have created the receiver determination condition with the following conditions:
    (/p1:MT_HOG_Data/row[count(row) > 3] EX)
    (/p1:MT_HOG_Data/row[count(row) <= 3] EX)
    The integration is always processing the second condition no matter how many records come in.  I have tried with and without the multiline option.  Can anyone help with this?
    I have searched through the forum and checked the following links without any resolution:
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    I can't find any examples where a count of records is checked in the expression editor.  Thanks in advance for any help.

    You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
    Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
    Example: you want to send to receiver A if count > 3, else to B:
    you set  /rowNumber EQUAL 4 for sender A
    and /rowNumber NOT EQUAL 4 for sender B
    The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
    Problem with that is that the second condition also will be true because nodes for that condition will be found
    better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
    CSY

  • Assigning JMS message in BPEL: The result is empty for the XPath expression

    Hi,
    My project, an Oracle BPEL 11g project, is reading an XML payload from a JMS queue. I would like to transform the message and assign the elements of the messages to other variables. But when I am doing that in the "assign" step, it raises an error: Error in evaluate <from> expression at line "63". The result is empty for the XPath expression : "/ns2:publishProject/payload/Message".
    Even though I can see the message payload in the Audit with all the values.
    To me it looks like a name space issue, but I could not find out how to correct it. Any hint will be a big help. Please let me know if you want to check the .xsd for the message.

    I publish a JMS message to a topic in one BPEL process and have another BPEL process read from the topic and start the flow. The problem I have is that the first process is writing fine to the topic, but the second process seems to be reading twice. I am seeing two instances of the second process in em.
    Can anyone help? I am using JDev 11.1.1.1.0
    Thanks

  • Using the XPATH expression function in Transformation activity

    Hi,
    I have to map the variable value(other than the source variable) to one of the node in the target variable in the transformation activity. For that I am using the XPATH expression function bpws:getVariableData ('variableName') and map it to corrsponding target node. But this mapping is not at all happening. The same prolem occurs while using function ora:getInstanceID() in transformation function. Then I could find a metalink note id: 387381.1,saying it as the bug in 10.1.2.2 BPEL PM, which they are covering in the next release. But our BPEL PM version is 10.1.3.3. But still the same type of problem occurs.
    Please let me know, is there are any solution for using the ora:getInstanceID() , bpws:getVariableData in Transformation activity.

    Hi,
    I dont understand why would you need to use the "bpws:getVariableData" function.
    When you are mapping a source-node to a target-node, it usually assigns the value in the source-node to the target-node, which is as good as using the "bpws:getVariableData" function.
    So, technically speaking you need to use this function explicitly to achieve that ...
    Also, if you want the instance-id, you can use the "ora:getInstanceId()" directly in the BPEL code than using it in the transformation.
    Regards,
    Madhu.

  • 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!

  • Failed to initialize the XPath Expression Builder

    Any idea what causes this and/or how to fix it?
    When I am in the XPath Expression Builder, I pick "Conversion Functions" and start with "string". Inside the "string()" parentheses, I do "bpws:getVariableData()", and select my output variable from an invoke.
    Then it SHOULD allow me to continue picking parts of that variable, down to the node I want, but instead I see in my JDeveloper log that a "Failed to initialize the XPath Expression Builder" error has been thrown.
    Thoughts appreciated...
    Smalls

    Can any of you Oracle guys help with this today?

  • Namespace problem The result is empty for the XPath expression

    I have a problem with BPEL namespaces. The webservice that my BPEL process is using has changed namespaces (i.e. the java code package names changed and therefore the namespaces associated with the packages.)
    Before there was only one namespace associated with this web services; now there are multiple namespaces.
    I have changed the namespaces in my .bpel file; however I get the result is empty for XPath expression:
    /nsxml0:getMailResponse/nsxml0:getMailReturn/nsxml1:mailOut
    Any help appreciated...:(

    hey b-o-s-t-o-n,
    have your verified that the namespace import is correct, and with the right prefix
    you xpath contains 2 namespace prefixes
    /nsxml0:getMailResponse/nsxml0:getMailReturn/nsxml1:mailOut
    so check the bpel file and maybe the wsdl that has been generated (that inclused the plnk extensions for your external service)
    this is the most common issue ..
    hth clemens

  • 1     Unable to retrieve the form values entered by the user from the xpath expression(with or without s

    1.1 Description of the Workflow
    We have designed a Workflow, which has an init form HighLevelQuestionnaire.
    1. The user attempts to start the workflow by submitting this form, which has an XML schema embedded.
    2. When user submits the data, we set workflow variables to fetch data from the init-form and all the values entered by the user are stored in the database.
    3. Based on the values, value of Risk Level is calculated to be either High or Medium, and user is routed to one of the two routes.
    4. The user QPAC is used to show the next form to the user.
    Another form has been designed called AssessRisk in which user is asked to confirm the Risk Level.
    5. At this point, we use Script QPAC to print the values in the log.
    1.2 Problem description
    1. In the Point No. 6 of the workflow, the values are not printed in the log. A blank space is printed instead.
    2. Initially, we embedded the schema in the form. But when values were not printed, we removed the schema. Even then it didnt work.
    1.2.1 User QPAC Specifications
    Properties of user QPAC used in Step 4 of the workflow
    Mappings Tab: -
    Input Variable --- No variable
    Template URL ----- Form11.xdp
    Output Variable ---- myform
    Myform is a form-variable, which has template URL as Form11.xdp
    1.2.2 Script QPAC
    1.2.2.1 With XML Schema embedded
    import com.adobe.workflow.pat.service.*;
    System.out.println("----------- High Level Questions -----------");
    System.out.println("--1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/dataset s/data/RiskLevel/general/Risk_Level") + " @@@@@");
    Note:- Here RiskLevel is the schema root of myform and Risk_Level is the schema variable mapped with textfield on the form
    1.2.2.2 Without XML Schema embedded
    System.out.println("--1.1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/dataset s/data/fields/Risk_Level") + " @@@@@");
    1.2.2.3 Conclusion
    In both the cases, a blank value is printed. In both the cases, we get some output which is when we use
    System.out.println("--1.1- the RiskLevel is: " + patExecContext.getProcessDataStringValue("/process_data/myform/form-data/data/xdp/dataset s/data ") + " @@@@@");
    In this case all the values are printed with space in between.
    This is the basic feature which has to be used while developing workflows.

    Hi
    You might want to try using VariableLogger, at:
    http://www.avoka.com/avoka/qpac_library.shtml
    It's a little more reliable than the script QPAC, especially if one of your xpath expressions is wrong.
    Please note that embedding the schema makes no difference in how the data from the form is stored. What makes the difference is whether your fields are bound to specify schema elements, or whether they use the "normal" binding.
    Howard

  • XPath Expression Problem

    Hi again,
    still a newb and stillsomequestions, but hope dies at last :)
    I want to extract values from a xml file which is stored in a table.
    i have the following code:
    COLUMN div DEFAULT
    SELECT extract(value(x), '//DIV/@ ID = ''FXAC93006ENC.0001.01.00''/text()').getStringVal() AS div
    FROM versuch2 x;
    With this code ive got the following Error Message: ORA:31012: Not supported XPath Statement.
    I tried this XPath statement in SlyXML and got a boolean:true result, so i think its not a xpath problem.
    Isthere a syntax problem?
    Thx for help!

    The correct syntax for fetching attributes is different from what you did.
    Not sure which syntax is the standard, but the Oracle Version seems more intuitive (too me). Why? Because an attribute is on the same hierachy level of the xml tag and therefore should not be queried with an additional /.
    SQL> with versuch2 as (select xmltype('<doc><div id="FXAC93006ENC.0001.01.00">Test</div></doc>') xmlcol from dual)
      2  SELECT extract(xmlcol, '//div[@id="FXAC93006ENC.0001.01.00"]/ text()').getStringVal() AS div
      3  FROM versuch2 x;
    DIV
    Test
    SQL>
    SQL> btw: W3C XPath Syntax stuff: http://www.w3.org/TR/xpath#predicates
    Message was edited by:
    Sven W.

  • 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.

  • Error: The result is empty for XPath expression

    hi gurus
    Following is my input sample data to BPEL process.
    <ItemList>
    <Item>
    <Name>Music System</Name>
    <Id>525</Id>
    <Item>
    <Name>Fog Light</Name>
    <Id>325</Id>
    <Item>
    <Name>Tyres</Name>
    <Id>325</Id>
    <Item>
    <Name>Neon Light Ring</Name>
    <Id>325</Id>
    </Item>
    </Item>
    </Item>
    </Item>
    </ItemList>
    Here <ItemList> contains <Item>.
    And <Item> contains <Name>,<Id> & <Item> element itself.
    i have created proper XSD for this.
    But When i try to fetch any value then using Assign Activityits gives runtime following error.
    Error in evaluate from expression at line "36".The result is empty for the XPATH expression: /ns1:ItemList/ns1:Item/ns1:Name
    Any suggestion..?
    thanks
    /mishit

    Here is my XSD.
    <?xml version="1.0" encoding="windows-1252"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified" >
    <xsd:element name="ItemList" type="ItemListType"/>
    <xsd:element name="Total" type="TotalType"/>
    <xsd:complexType name="ItemListType">
    <xsd:sequence>
    <xsd:element name="Item" type="ItemType"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ItemType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="Id" type="xsd:string"/>
    <xsd:element name="Item" type="ItemType"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="TotalType">
    <xsd:sequence>
    <xsd:element name="TotalPrice" type="xsd:double"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    /mishit

  • What is the cause of the XPath error in concat expression

    Hi,
    In a BPEL process I am working on I am building a list as follows -
    <copy>
    <from expression="concat(bpws:getVariableData('FMSNumbersList'),' | ',bpws:getVariableData('Invoke_1_GetFmsHeadersSelect_OutputVariable','FmsWaveAssignCollection','/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData('FmsHeadersProcessed')]/ns5:fmsNumber'))"/>
    <to variable="FMSNumbersList"/>
    </copy>
    When I compile the project I get the following error -
    Error(195): invalid xpath expression
    xpath expression "concat(bpws:getVariableData(&apos;FMSNumbersList&apos;),&apos; | &apos;,bpws:getVariableData(&apos;Invoke_1_GetFmsHeadersSelect_OutputVariable&apos;,&apos;FmsWaveAssignCollection&apos;,&apos;/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData(&apos;FmsHeadersProcessed&apos;)]/ns5:fmsNumber&apos;))" specified in <from> is not valid, because XPath query syntax error.
    The syntax error occurs while parsing XPath expression concat(bpws:getVariableData('FMSNumbersList'),' | ',bpws:getVariableData('Invoke_1_GetFmsHeadersSelect_OutputVariable','FmsWaveAssignCollection','/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData('FmsHeadersProcessed')]/ns5:fmsNumber')), at position 255.
    The XPath query syntax was wrong; the exception was: Expected: ).
    Check the detailed root cause described in the exception message text and verify that the XPath expression named in the error message is correct. The XPath expression is defined in the BPEL process.
    Make sure the expression is valid
    I am unable to figure out what is wrong with the above expression. Can someone please help.
    Thanks in advance
    Harish

    You have to use two copy statement to fetch values like an Array.
    1. Construct a dynamic xpath expression
    2. Use dynmaic xpath to get the array value
    Eg:
    The below code shows how to use assign to build the dynamic XPath.
    <assign name="Assign_XPath_For_Array">
    <copy>
    <from expression="concat('/ns1:ArrayList/ns2:ArrayElem[',bpws:getVariableData('Variable_Index_Counter'),']') "/>
    <to variable="Variable_Xpath"/>
    </copy>
    </assing>
    Note have used [index] to represent index element here in the array.
    Here Variable_Xpath acts as a temporary string variable that holds the intermediate Xpath as string.
    Now use this XPath string Variable while reading array index elements.
    This would look like
    <assign name="Assign_Read_Array">
    <copy>
    <from expression="bpws:getVariableData('Variable_Array','payload',bpws:getVariableData('Variable_Xpath'))"/>
    <to variable="Variable_Read_Array_Element"
    query="/ns1: ABC"/>
    </copy>
    </assign>
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Nested XPath expressions

    Hello,
    I am using jsp to read an xml file, then build a table from the contents. My xml looks like this:
    <document>
         <first> Text of First tag
                 <second> Text of second tag
                      <inner> Text of inner tag</inner>
                      <inner> Text of inner tag</inner>
                 </second>
         </first>
         <first> Text of First tag
                 <second> Text of second tag
                     <inner> Text of inner tag</inner>
                     <inner> Text of inner tag</inner>
                 </second>
         </first>
    </document>I am using the standard tag library to iterate over the nodes of type <first>. My problem is that when I get to each <first> node, I want to iterate over each <inner> node, but I don't know how to reference them with XPath. Here is a snippet of my jsp:
            <c:import var="xml" url="test2.xml"/>
         <x:parse varDom="dom" xml="${xml}"/>
            <x:forEach var="First" select="$dom/document/first">     // iterates over each <first> tage
              <x:set var="Second"      select="string($First/second)" />     // only one second tag per first tag
              <x:forEach var="inner" select="$Second/inner" >          // now I want to loop over all the <inner> tags
                         // process inner tags here
              </x:forEach>
            </x:forEach>I can't figure out how to access the inner tags with xpath. I can access the "Second" variable, but when I try to go into the second loop, I can't get the text of the <inner> tag. Any suggestions?

    Good question. I looked at the documentation for the x:forEach element, and it says that it sets the context node to each element of the iteration. So, inside your x:forEach element you can assume that the context node is a first element from your document. The XPath expression to find your inner elements relative to that context node is "inner/second". So:<x:forEach var="inner" select="second/inner" >

  • XPath expression to element with xsl: namespace

    Hi,
    I have a problem selecting a node in an XSL document. What I'm trying to do is to load an XSL file and change the 'select' attribute of <xsl:for-each select='//whatever'>
    I tried it something like this:
    Node articleSelect = XPathAPI.selectSingleNode(xslDOM, "//for-each");
    articleSelect.getAttributes().getNamedItem("select").setNodeValue("//article[@ArticleNr='" + articleNumber + "']");However, articleSelect is always null so the second line throws an exception. I also tried "//xsl:for-each" and "//xsl:for-each[@select='//whatever']" and whatnot as the XPath expression, but still no luck... :(
    Any thoughts or ideas will be greatly appreciated :)
    Greetings,
    Erik

    Erik, your code is working fine but you must ensure that the document builder used to create xslDOM has nameSpaceAware = true!
    May I suggest this rewriting - not necessary - but more clear I think:
    Element articleSelect = (Element) XPathAPI.selectSingleNode(xslDOM, "//xsl:for-each");
    articleSelect.setAttribute("select", "//article[@ArticleNr='" + articleNumber + "']");

Maybe you are looking for

  • Little troubles with DVB-S2 via MPlayer

    Hi, I use the MPlayer already for quite a while to stream DVB-S and DVB-S2 with it. But for approximately two weeks something changed while watching HD-channels: the video track lags every few seconds; the audio track is quiet normal. However, the no

  • IPad 3 download limit problem

    Whenever I try to download a standard definition movie, a message comes up telling me that "This item is over 0MB" and continues with the message that I must connect to iTunes.  I have a 5 GB plan from Verizon and want to know why apple won't let me

  • Adjustments missing on imported projects in 3.2.2.

    In 3.2.2, I'm having problems with importing a library from my laptop into my master library on my desktop.  Exporting the project as a library and then importing that library stopped working since the previous release.  I was able to import the enti

  • Safari  no back arrow

    Hopefully someone can help. in safari 1.3.2 i have no back button arrow present on my page when i open safari . back button meaning the arrow button that usually sits up in the left hand corner underneath the 3 circles to close/minimize/shrink window

  • Having issues with display when waking up sometimes

    i just got a new macbook pro about 2 weeks ago and ive noticed when i wake it up sometimes, either by opening the lid or just pressing a key when it sleeps on it own, the display will be all black except for the time in the top right and my wifi conn