Variable Picker generates invalid XPath query

This one seems to be a bug:
When declaring a variable of type "element" (not "messageType") and accessing the variable with the Variable Picker from within the assign assistant, i.e. the following line ist generated:
bpws:getVariableData("testVar","","/tns:TaskMgrTestCaseRequest/tns:input")
The BPEL process can be validated and deployed without an error.
At runtime the following exception is generated:
XPath expression failed to execute.
Error while processing xpath expression, the expression is "bpws:getVariableData("testVar", "", "/tns:TaskMgrTestCaseRequest/tns:input")", the reason is XPath expression failed to execute.
Error while processing xpath expression, the expression is "", the reason is Unexpected ''.
Please verify the xpath query.
Please verify the xpath query.
When working with variables of type messageType, there is no problem. (So I declared a messageType to each element type ...)
Wolfgang

Thanks for the heads up. We will try to kill this bug in the 0.97 release. -Edwin

Similar Messages

  • Copying Variables in BPEL using XPath Query

    Hi,
    I am new to BPEL and i want to know if it is possible to copy data from one variable to another using XPath Query in the <from> <to> tags, when the two variables are of different message types.
    I am trying to create a sample BPEL that would receive a String through the receive tag tied to one partner link (WSDl) and then invoke a different webservice using the <invoke> tag tied to another partner link (WSDL) by passing the received variable.
    I have pasted the BPEL File and the two WSDl files involved.
    My Issue is that when I send a soap request to the BPEL, it is passed as null to the webservice invoked.
    Probably because the copy tags don't work.
    Please help.
    BPEL File
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <process name="HelloWorld2"
    targetNamespace="http://ode/bpel/unit-test"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:tns="http://ode/bpel/unit-test"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:test="http://ode/bpel/unit-test.wsdl"
    xmlns:ns0="http://poc.com"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
    <import location="HelloWorld2.wsdl"
    namespace="http://ode/bpel/unit-test.wsdl"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <import location="sayHello.wsdl"
    namespace="http://poc.com"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <partnerLinks>
    <partnerLink name="helloPartnerLink"
    partnerLinkType="test:HelloPartnerLinkType"
    myRole="me" />
    <partnerLink name="sayHelloBPELPL"
    partnerLinkType="ns0:sayHelloPLT"
    partnerRole="you" initializePartnerRole="yes" />
    </partnerLinks>
    <variables>
    <variable name="myVar" messageType="test:HelloMessage"/>
    <variable name="tmpVar" messageType="test:HelloMessage"/>
    <variable name="inVar" messageType="ns0:sayHelloRequest"/>
    <variable name="outVar" messageType="ns0:sayHelloResponse"/>
    </variables>
    <sequence>
    <receive
    name="start"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="myVar"
    createInstance="yes"/>
    <assign name="ass1">
    <copy>
    <from variable = "myVar" part = "TestPart"/>
    <to variable = "inVar"
    part = "parameters"
    query= "/sayHello/ns0:param0" />
    </copy>
    </assign>
    <invoke partnerLink = "sayHelloBPELPL"
    portType = "ns0:sayHelloPortType"
    inputVariable = "inVar"
    operation = "sayHello"
    outputVariable = "outVar">
    </invoke>
    <assign name="ass2">
    <copy>
    <from variable = "outVar"
    part = "parameters"
    query= "/sayHelloResponse/ns0:return" />
    <to variable = "tmpVar" part="TestPart"/>
    </copy>
    </assign>
    <reply name="end"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="tmpVar"/>
    </sequence>
    </process>
    WSDL File1
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <wsdl:definitions
    targetNamespace="http://ode/bpel/unit-test.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ode/bpel/unit-test.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:ns0="http://poc.com">
    <wsdl:message name="HelloMessage">
    <wsdl:part name="TestPart" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="HelloPortType">
    <wsdl:operation name="hello">
    <wsdl:input message="tns:HelloMessage" name="TestIn"/>
    <wsdl:output message="tns:HelloMessage" name="TestOut"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="hello">
    <soap:operation soapAction="" style="rpc"/>
    <wsdl:input>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
    <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
    <soap:address location="http://localhost:8082/ode/processes/helloWorld"/>
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="HelloPartnerLinkType">
    <plnk:role name="me" portType="tns:HelloPortType"/>
    <plnk:role name="you" portType="tns:HelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>
    WSDL File 2
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:ns0="http://poc.com"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns1="http://org.apache.axis2/xsd"
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    targetNamespace="http://poc.com">
    <wsdl:types>
    <xs:schema xmlns:ns="http://poc.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://poc.com">
    <xs:element name="sayHello">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloRequest">
    <wsdl:part name="parameters" element="ns0:sayHello" />
    </wsdl:message>
    <wsdl:message name="sayHelloResponse">
    <wsdl:part name="parameters" element="ns0:sayHelloResponse" />
    </wsdl:message>
    <wsdl:portType name="sayHelloPortType">
    <wsdl:operation name="sayHello">
    <wsdl:input message="ns0:sayHelloRequest" wsaw:Action="urn:sayHello" />
    <wsdl:output message="ns0:sayHelloResponse" wsaw:Action="urn:sayHelloResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="sayHelloSOAP11Binding" type="ns0:sayHelloPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
    <soap:operation soapAction="urn:sayHello" style="document"/>
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="sayHello">
    <wsdl:port name="sayHelloPort" binding="ns0:sayHelloSOAP11Binding">
    <soap:address location="http://localhost:8082/ode/processes/sayHello" />
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="sayHelloPLT">
    <plnk:role name="me" portType="ns0:sayHelloPortType"/>
    <plnk:role name="you" portType="ns0:sayHelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>

    Hi,
    Yes, it very much is possible.
    Xpath query provides a lot many data type conversion functions(string to int, string to date etc), which can be used in copying variables.
    thanks
    Saurabh

  • Invalid XPath ?

    I have a process that gets a date (format YYYY-MM-DD; forced by Console), which has to be delivered to a Webservice, that requests dates in format 'dd MMM yyyy' (24 aug 2005).
    I've tried the following options (in an Assign):
    <copy>
      <from variable="inputVariable" part="payload" query="ora:formatDate('/client:bpAanvraagProcessRequest/client:DatumBemonstering', 'dd MMM yyyy')"/>
      <to variable="addAanvraag_addaanvraag_InputVariable" part="pDbg"/>
    </copy>And:
    <copy>
      <from variable="inputVariable" part="payload" query="xp20:format-dateTime(/client:bpAanvraagProcessRequest/client:DatumBemonstering,'[dd] [MMM] [YYYY]')"/>
       <to variable="addAanvraag_addaanvraag_InputVariable" part="pDbg"/>
    </copy>Both fail with the following message:
    [Error ORABPEL-10076]: invalid xpath query string 
    [Description]: in line 68 of "L:\workspaces\BPEL\bpAanvraag\bpAanvraag.bpel", According to BPEL4WS spec 1.1, section 14.3,
    the xpath query "ora:formatDate('/client:bpAanvraagProcessRequest/client:DatumBemonstering', 'dd MMM yyyy')" is invalid,
    query should be an absolute location path and it must start from the root element prefixed with "/".. 
    [Potential fix]: Please make sure that your xpath query starts with "/" which is the root..Anyone has any ideas how to fix this?

    Okey, found it:
    The format-string is an XSLT 2.0 picture string, see syntax explained at http://www.w3.org/TR/xslt20/#date-picture-string
    By the way:
    a) w3.org publishes the function xslt:format-date(), and format it by picture. This is not offered by Oracle BPEL it seems (at least not through the Expression builder, ver 10.1.2.0.0 ).
    Oracle-BPEL offers:
    b) ora:formatDate(), and format it by java.text.SimpleDateFormat.
    c) xp20:format-dateTime(), and format it by picture.
    So I took it away by code like:
    <copy>
    <from expression="xp20:current-dateTime()"/>
    <to variable="myDateTime"/>
    </copy>
    <copy>
    <from expression="'P21D'"/>
    <my-xml-comment>The Xpath syntax (like P21D) is for specifying an xdt:dayTimeDuration of 21 days ahead, see http://www.w3.org/TR/xpath-functions/#lexical-dayTimeDuration</my-xml-comment>
    <to variable="myDuration"/>
    </copy>
    <copy>
    <from expression="xp20:add-dayTimeDuration-to-dateTime( bpws:getVariableData('myDateTime'), bpws:getVariableData('myDuration') )"/>
    <to variable="myResultTime"/>
    </copy>
    <copy>
    <from expression="xp20:format-dateTime( bpws:getVariableData('myResultTime'), '[Y0001][M01][D01]' )"/>
    <to variable="myResultTimeNOARK"/>
    </copy>

  • Xpath query on initiateTaskResponse variable fails

    I have a small BPEL process which has a human task , in that when I try to access taskid from initiateTaskResponse message, it throws xpath query is invalid error.
    Thanks

    Thanks for your Reply,
    I can able to browse the variable in JDeveloper at design time. When I try to deploy the process, the server throws error on that assign activity(Selection Failure). So I have changed the assign activity to JavaEmbeeding, but now it throws 'Selection Failure' error at runtime.
    I can able to use anyother variables in assign activity.
    Thanks in advance,
    Murugavel Mahadevan

  • [Error ORABPEL-10039]: invalid xpath expression  - array processing

    hi,
    I am trying to process multiple xml elements
    <assign name="setinsideattributes">
    <copy>
    <from expression="ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')"/>
    <to variable="ssn"/>
    </copy>
    </assign>
    where iterator is a index variable .
    I am getting into this error .
    Error(48):
    [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 48 of "D:\OraBPELPM_1\integration\jdev\jdev\mywork\may10-workspace\multixm-catch\multixm-catch.bpel", xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')", at position "77" the exception is Expected: ).
    Please verify the xpath query "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" which is defined in BPEL process.
    [Potential fix]: Please make sure the expression is valid.
    any information on how to fix this .
    thanks in advance

    check out this note here
    http://clemensblog.blogspot.com/2006/03/bpel-looping-over-arrays-collections.html
    hth clemens

  • Retrieve xml attribute value of nth xml node using xpath query

    I have an xml with following stucture...
    <xml>
    <header>
     <DocumentReference OrderId="order001">
     <DocumentReference OrderId="order002">
     <DocumentReference OrderId="order003">
    I have to loop through this xml and retrieve the orderId values inside Biztalk orchestration.
    In the expression shape, I get the count of 'DocumentReference' nodes using an xpath query and then
    Added a loopshape to make sure it loops thru all nodes
    Loop condition:   n<=nodeCount     (where n is an integer variable, n=0 to begin with, incremented by 1 thru each loop, nodeCount is # of DocumentReference nodes)
     I try retrieve to the orderId in the following expression shape using the below xpath query
      xpathQuery = System.String.Format("//*[local-name()='OrderReference'][{0}]/@orderID)",n);
      sOrderId = xpath(MsgSingleInvoice,xpathQuery);
    And I get the following exception:
    Inner exception: '//*[local-name()='OrderReference'][1]/@orderID)' has an invalid token.
    Exception type: XPathException
    Appreciate any help!   thanks!

    Thanks for the quick response. I got rid of it.
    And I see a different error:
    Inner exception: Specified cast is not valid. Exception type: InvalidCastException
    Source: Microsoft.XLANGs.Engine  
    Target Site: System.Object XPathLoad(Microsoft.XLANGs.Core.Part, System.String, System.Type)
    Since variable 'n' is of integer type, I suspected it and changed it to n.ToString() and tested again and still see the same error.

  • Error in giving variable in ora:readFile() Xpath function

    Hi,
    I have a requirement like i need to give a variable name in ora:readFile() Xpath function. Below is the method in which i am trying. but i am getting error
    ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')
    Error iam getting while compiling is:
    Error(80):
    [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 80 of "C:\Softwares\JDev10.1.3.4\jdevstudio10134\jdev\mywork\Test\bpel\Test.bpel", xpath expression "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')", at position "71" the exception is Expected: ).
    Please verify the xpath query "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')" which is defined in BPEL process.
    [Potential fix]: Please make sure the expression is valid.
    Am i missing anything. Please guide me
    Thanks in advance.

    Try this. And I guess one forward slash after "file:" suffices.
    ora:readFile(concat('file:/home/casdevro/tbm/archive/', bpws:getVariableData('inputFile')'))

  • ORABPEL-09503 Invalid xpath expression in a CASE expression

    Hi I have the following case statement in my BPEL process -
    <switch name="checkAuthenticateResult">
    <case condition="upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'">
    <bpelx:annotation>
    <bpelx:pattern>authenticatePass
    </bpelx:pattern>
    </bpelx:annotation>
    <assign name="assignTktOutput">
    <copy>
    <from expression="boolean(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')='T')"/>
    <to variable="outputVariable" part="payload" query="/client:WshSendTxnToOtmServiceProcessResponse/client:result/ns2:authenticated"/>
    </copy>
    </assign>
    </case>
    <otherwise>
    <throw name="throwAuthenticateFail" faultVariable="g_faultVariable" faultName="faultError"/>
    </otherwise>
    </switch>
    When I run my process in 10.1.2, it works fine, but when I run it in 10.1.3.1, it errors out with the following error -
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'", the reason is Unknown expression at EOF: upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'..
    Please verify the xpath query "upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'" which is defined in BPEL process.
    </faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    Do you think there was a bug in the expression that has surfaced due to some additional validations in 10.1.3.1 or am I missing something here?
    Thanks a lot for your help.
    Thanks.
    RV

    AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'"
    what is this bold part about? this looks wrong to me..
    /clemens

  • Concat Operation failing.[Error ORABPEL-10039]: invalid xpath expression

    Hi ,
    I am trying to concat two values which are as mentioned below
    concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber'))
    to /ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value (which is same as first parameter of concat operation)
    the error is [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 681 of "C:\Users\varsha.tm\Desktop\InitiateMaintainContractRolesEmail\bpel\InitiateMaintainContractRolesEmail.bpel", xpath expression "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('Ac
    cumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber'))" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTyp
    eCount]/ns1:ContractNumber'))", at position "76" the exception is Expected: ).
    Please verify the xpath query "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:Co.....
    I also tried converting both the variables of concat to string and then giving to concat operation. please let me know what could be the possible way to do this

    Hi,
    try storing the values of the below into a separate variables var1,var2 and then use concat(bpws:getVariableData('var1'),bpws:getVariableData(var2))....also try using the predicate[] without
    bpws:getVariableData for the below variables...for this in the assign activity create copy operation window....u see the xpath text box and u can mention the predicate values there...some
    thing like */ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value* , *ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType
    [$ContractInfoTypeCount]/ns1:ContractNumber* instead of the below values
    bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value')
    bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber')

  • XPath query error - xml extension in schema

    Hi,
    I am getting following error when i try to assign values to input xml payload before
    invoke process.
    "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    <selectionFailure>
    <part name="summary" >
    <summary>XPath query string returns multiple nodes. According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /child::parameter/child::param1 should not return multipe nodes. Please check the BPEL source at line number "40" and verify the part and xpath query /child::parameter/child::param1. </summary>
    </part>
    </selectionFailure>
    The generated XPath resolves to a single node only (tested using XMLSpy). The only reason i can think of is that the xml schema in wsdl is extending a base xml type to a new type.
    It works fine if the extending xml type is merged with it's base type, and used as one single complex type.
    ------------------WSDL START
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://justdoit.ws.sunflower2.pageone.com" targetNamespace="http://justdoit.ws.sunflower2.pageone.com">
         <types>
              <xs:schema targetNamespace="http://justdoit.ws.sunflower2.pageone.com">
                   <xs:complexType abstract="true" name="BaseObject">
                        <xs:sequence>
                             <xs:element name="param1" nillable="true" type="xs:string"/>
                             <xs:element name="param2" nillable="true" type="xs:string"/>
                        </xs:sequence>
                   </xs:complexType>
                   <xs:complexType name="FooBar">
                        <xs:complexContent>
                             <xs:extension base="tns:BaseObject">
                                  <xs:sequence>
                                       <xs:element name="param3" nillable="true" type="xs:string"/>
                                       <xs:element name="param4" nillable="true" type="xs:string"/>
                                       <xs:element name="param5" nillable="true" type="xs:string"/>
                                       <xs:element name="param6" nillable="true" type="xs:string"/>
                                  </xs:sequence>
                             </xs:extension>
                        </xs:complexContent>
                   </xs:complexType>
              </xs:schema>
         </types>
         <message name="justDoItRequest">
              <part name="parameter" type="tns:FooBar"/>
         </message>
         <message name="justDoItResponse">
              <part name="parameter" type="tns:FooBar"/>
         </message>
         <portType name="justDoItPort">
              <operation name="justDoIt">
                   <input message="tns:justDoItRequest"/>
                   <output message="tns:justDoItResponse"/>
              </operation>
         </portType>
         <binding name="justDoItBinding" type="tns:justDoItPort">
              <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="justDoIt">
                   <soap:operation soapAction="tns:justDoIt"/>
                   <input>
                        <soap:body use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
              </operation>
         </binding>
         <service name="justDoItService">
              <port name="NewPort" binding="tns:justDoItBinding">
                   <soap:address location="http://127.0.0.1:8080/axis/services/justDoIt"/>
              </port>
         </service>
    </definitions>
    ------------------WSDL END
    ------------------BPEL START
              <assign name="assign-1">
                   <copy>
                        <from variable="input" part="payload" query="/tns:justDoItRequest/tns:input1"></from>
                        <to variable="req" part="parameter" query="/parameter/param1"/>
                   </copy>
              </assign>
              <invoke name="invoke-1" partnerLink="justDoIt" portType="tns:justDoItPort" operation="justDoIt" inputVariable="req" outputVariable="res"/>
    ------------------BPEL END
    reg,
    Amitoj.

    I am also having the xml extension issue and since we are dealing with large WSDL files (exceed 40,000 lines) it would be ridiculous to move all extension classes to the base type (parent class). Has this bugged been looked at and when can it be resolved since it seems to be a major issue in JDeveloper.
    Chris

  • Getting Invalid XPath expression

    Hi,
    I am parsing a XML document and reading a node with <xtags:valueOf .. select="product_name"/>. The value of product_name is :
    <product_name>SJE6 2004Q1, 1 RTU ESD, All platforms, 1 Year</product_name> , but I am getting the following exception :
    org.dom4j.InvalidXPathException: Invalid XPath expression: SJE6 2004Q1, 1 RTU ESD, All platforms, 1 Year Unexpected '2004'
    at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:316)
    at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:63)
    at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:182)
    at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:198)
    at org.apache.taglibs.xtags.xpath.AbstractTag.createXPath(AbstractTag.java:195)
    at org.apache.taglibs.xtags.xpath.VariableTag.setSelect(VariableTag.java:143)
    I tried with <xtags:copyOf select=.../node() and text()/> but still getting the same exception. Not sure why its failing on 2004? Help!
    Thanks,
    -Ashish

    The problem was not in the <xtags:valueOf> but in the following expression :
    <xtags:variable id="lName" select="<%= product_name %>"/>
    where I wasassigning the value of <product_name> to a String (java) variable defined. But this will be another question : why is <xtags:variable> failing?

  • Ojdeploy sometimes generates invalid JARs

    We've encountered the following problem: sometimes ojdeploy (called via ant task) generates invalid JARs for some projects in the workspace. Invalid means they have a size less the 1KB, there may be only META-INF\manifest.mf and no classes at all inside that JAR, or there may be some (not all) classes. And consequently the whole build fails because of "package blah-blah-blah does not exist" etc.
    Here's the bit of example from the failed build (some parts of the log are obscured and skipped):
         [exec] 13.04.2011 17:31:48 oracle.ide.boot.Launcher throttleLocale
         [exec] INFO: Locale ru_RU is not supported by this product. Forcing locale to en_US.
         [exec] ----build file----
         [exec] <?xml version = '1.0' standalone = 'yes'?>
         [exec] <ojdeploy-build>
         [exec]     <deploy>
         [exec]         <parameter name="workspace" value="${workspace}\"/>
         [exec]         <parameter name="project" value="${project}"/>
         [exec]     </deploy>
         [exec]   <defaults>
         [exec]     <variable name="workspace" value="our workspace"/>
         [exec]     <variable name="project" value="BlahBlahBlah"/>
         [exec]     <parameter name="buildfile" value="our buildfile"/>
         [exec]     <parameter name="profile" value="*"/>
         [exec]     <parameter name="clean"/>
         [exec]   </defaults>
         [exec] </ojdeploy-build>
         [exec] ------------------
    ... skipped ...
         [exec] [5:32:00 PM] Clean completed.
         [exec] Compiling...
         [exec] Context: selection=BlahBlahBlah.jpr application=BlahBlahBlah.jws project=BlahBlahBlah.jpr node=BlahBlahBlah.jpr
         [exec]
         [exec] C:\Oracle\Middleware\jdk160_14_R27.6.5-32\bin\javac
         [exec] -g
         [exec] -Xlint:all
    ... skipped ...    
         [exec] Compiling 4 sources
         [exec]   Compiling ...Logger.java
         [exec]   Compiling ...SystemOutHandler.java
         [exec]   Compiling ...LogFormatter.java
         [exec]   Compiling ...LoggerFactory.java
         [exec]   Writing ...Logger$CSIntFormatter.class
         [exec]   Writing ...Logger.class
         [exec] Apr 13, 2011 5:32:02 PM oracle.jdevimpl.deploy.common.ModulePackagerImpl deployProfiles
         [exec] INFO: Deploying profile...
         [exec]
         [exec] Apr 13, 2011 5:32:02 PM oracle.jdeveloper.deploy.jar.ArchiveDeployer logFileWritten
         [exec] INFO: Wrote Archive Module to file:/...Logging.jar
         [exec] Apr 13, 2011 5:32:02 PM oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl$DeployConsoleLogger finished
         [exec] INFO: Elapsed time for deployment:  2 seconds
         [exec]
         [exec] Apr 13, 2011 5:32:02 PM oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl$DeployConsoleLogger finished
         [exec] INFO: ----  Deployment finished.  ----
         [exec]
         [exec]   Writing ...SystemOutHandler.class
         [exec]   Writing ...LogFormatter.class
         [exec]   Writing ...LoggerFactory.class
         [exec] [5:32:02 PM] Successful compilation: 0 errors, 0 warnings.BTW, I've noticed one strange thing while writing this. I see that ojdeploy says " Deploying profile... Wrote Archive Module to file:/...Logging.jar..." and <b>AFTER having created the JAR</b> it says "Writing ...SystemOutHandler.class Writing ...LogFormatter.class Writing ...LoggerFactory.class"
    Has anyone encountered such strange behavior of ojdeploy?

    (kinda bump)
    I haven't mentioned that we use JDeveloper 11.1.1.2

  • Human Workflow Task XPath query string returns multiple nodes.

    I am looking for trouble shooting help for this error. I am no sure if it is a server or jdev issue.
    I am running JDev version 10.1.3.3 and console version 10.1.3.1.0 locally.
    General information on the BPEL process:
    I have a temporary table in Oracle lite that I created items to be review by the user. I created a synchronous BPEL process. The first step in developing this process, I created the straight forward invoke the table to get the records, transform the records with a change the approve flag = "Y", and invoke the table to update the records. Works like a charm. I followed the online tutorial by dropping a human task after the transform, configured the parameters, setup the assignments, and moved the invoke to update table under the approved condition. If the table has only one record, the process runs great but if there are two records I get the following error message.
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr should not return multipe nodes.
    Please check the BPEL source at line number "178" and verify the part and xpath query /ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr.
    </summary>
    </part></selectionFailure>
    =================
    The error occurs in the first assign of the Human task after the assign copies the fields for the title. I underlined line number 178.
    <correlationSets>
    <correlationSet name="WorkflowTaskIdCor"
    properties="taskservice:taskId"/>
    </correlationSets>
    <sequence>
    <assign name="HumanTask1_1_AssignTaskAttributes">
    <copy>
    <from expression="concat(ora:getProcessURL(), string('/HumanTask1/HumanTask1.task'))"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:taskDefinitionURI"/>
    </copy>
    <copy>
    <from expression="number(3)"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:priority"/>
    </copy>
    <copy>
    <from>
    <payload xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <Case xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <CourtDate xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ErrorMessage xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ItemName xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <Payment xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <Zip xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProcessFlag xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <LastUpdated xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <AddedDate xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <CityAttnyAmount xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ApprovalFlag xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProlawKey xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProcessKey xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    </payload>
    </from>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:payload"/>
    </copy>
    <copy>
    <from expression="concat(string('Item Fee Approval '), bpws:getVariableData('Invoke_1_Select_RecordsSelect_OutputVariable','TempItemCollection','/ns3:TempItemCollection/ns3:TempItem/ns3:ItemName'))"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:title"/>
    </copy>
    <copy>
    <from variable="Invoke_1_Select_RecordsSelect_OutputVariable"
    part="TempItemCollection"
    query="/ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:payload/task:Item"/>
    </copy>
    <copy>
    Thank you for any help you can give me.

    Here is how I solved this problem: I was told by the metalink folks that I should use the same verion of SOA console as jdev. So I went back to jdev 10.1.3.1. Rather than reading from the Oracle lite table, I dumped the table into a flat file. I read flat file and populated the workflow. Remember to set the 'messages in batch' flag in the file adapter to 1 and the number of records to skip to zero in the format builder for the flat file. The process now reads each record and creates an instance for that each record. In other words, if I have 8 records in my flat file, I will have 8 instances of the process running on the console. Thanks Jeremy for your help figuring this out.
    Edited by: user7725126 on Nov 19, 2009 3:56 PM

  • Error: XPath query string returns multiple nodes

    Hi all,
    I am facing issue with the assign activity.
    Error message:
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} parts: {{ summary=&lt;summary>*XPath query string returns multiple nodes. The assign activity part and query are returning multiple nodes. The assign activity part and query named in the error message returned multiple nodes. It should return single node. According to BPEL4WS specification 1.1 section 14.3, the assign activity part and query named in the error message should not return multiple nodes. Verify the part and xpath query named in the error message at line number 2005 in the BPEL source*.
    BPEL code:
    <copy>
    <from variable="Invoice_Tax_loopCounter"/>
    <to variable="Var_Invoice_Tax_Contacts" part="payload" query="/ns30:Invoice_Tax_Contacts/ns30:Invoice/ns29:Get_InvoiceOutput[bpws:getVariableData'Invoice_Tax_loopCounter')]/ns29:ADDR_ATTRIBUTE2"/>
    </copy>
    We are using SOA 11.1.1.3 version.
    Any pointers on this?
    Thanks in advance

    Hi-
    This is because you are have multiple nodes either in source or target XML.
    My guess is some nodes of your XML might be repeating (means a single element/node has multiple values). Can you please check that or please post your XML here.
    Edited by: 145678 on Mar 7, 2011 6:28 PM

  • XPath query with out namespace is possible ?

    Hi,
    our system reciving xml data using the datatype xsd[b] &lt;any/&gt; . am sure the system will receive the data in same format[node hierarchical] but the namespace of the root element may be differ..
    i want write xpath which should not be parse based on the namespace of element.
    like the method setNameSpaceAware(false) in java;
    will it be possible in bpel. if so how ?
    i would be appreciate any help.
    Thanks,
    Bogi

    Ahhhh - thank you for the clarification.
    Regarding the expansion of variable, is there anything further needed? Reason I ask is, when I use the variable which contains the same string as when I hard code the string in the XPATH query, I do not receive the desired results - I only receive the
    'VENDOR_ADVISORY' results.

Maybe you are looking for