You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by "Jackson, Douglas" <do...@siemens.com> on 2009/02/05 01:30:34 UTC
xpath question
Hi!
I am not sure if this is a bug or not, but when I have code similar to the following:
$p-response-msg.response-part/x:e-response/xfer:r-info[$r-number]/x:l-ticket[1]
or
$p-response-msg.response-part/x:e-response/xfer:r-info[position()=$r-number]/x:l-ticket[1]
I get a null (see below). But when I replace the $r-number with a constant '1' it works. The value of $r-number is 1 as shown in the debug output. $r-number is declared as <variable name="r-number" type="xsd:int" />
I am using a war file built from the trunk sometime last week.
I am using xpath 2.0 as query language and expression language. The BPEL 2.0 spec talks about using multiple variable references in xpath expressions, so it would seem alright.
Thanks!
-Doug.
BPEL:
<from>dbg:debugString(ode:dom-to-string($p-response-msg.response-part/x:e-response), 'e-response')</from>
<to>$debug-output</to>
</copy>
<copy>
<from>dbg:debugString(xsd:string($r-number), 'r-number')</from>
<to>$debug-output2</to>
</copy>
<!-- constants ... works -->
<copy>
<from>dbg:debugString($p-response-msg.response-part/x:e-response/x:r-info[1]/x:l-ticket[1], 'l-ticket')</from>
<to>$debug-output1</to>
</copy>
<!-- variable reference fails (with or without position()= -->
<copy>
<from>dbg:debugString($p-response-msg.response-part/x:e-response/x:r-info[$r-number]/x:l-ticket[1], 'l-ticket')</from>
<to>$debug-output3</to>
</copy>
Log output:
e-response -> <?xml version="1.0" encoding="UTF-8"?>
<e-response xmlns="http://xxx/yyy" xmlns:ns1="http://xxx/yyy">
<r-info>
<r-id>111</r-id>
<e-ticket>1233792023564-69</e-ticket>
<l-ticket>1233792023564-70</l-ticket>
<l-ticket>1233792023564-70</l-ticket>
</r-info>
</e-response>
r-number -> 1
l-ticket -> 1233792023564-70
ERROR - GeronimoLog.error(104) | Assignment Fault: {http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault,lineNo=1210,faultExplanation={http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault: null
DEBUG - GeronimoLog.debug(66) | schedulingRunnable for process {http://teamcenter.com/globalservices/process/bpel/webservice/2007-06}data-transfer-36: org.apache.ode.bpel.engine.UnreliableMyRoleMessageExchangeImpl$2@7a547b
DEBUG - GeronimoLog.debug(66) | ProcessImpl completed with fault '{http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault'