ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Rusin <ra...@intalio.com>
Subject Re: Changing the IP dynamically using XPath changes < to &lt;
Date Tue, 10 Aug 2010 09:07:42 GMT
I did sample test case for saxon parse. It works.
Please try out small example first.
Then if it doesn't work, please attach process so we could add it to
integration tests.

+++ bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel	(kopia
robocza)
@@ -276,6 +276,30 @@
               </copy>
             </assign>
         </scope>
+        <scope>
+          <variables>
+            <variable name="nodeVar" type="xsd:anyType"/>
+            <variable name="textVar" type="xsd:string"/>
+          </variables>
+          <sequence>
+            <assign>
+              <copy>
+                <from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+                <![CDATA[ '<a><b>some-b-text</b></a>' ]]>
+                </from>
+                <to>$textVar</to>
+              </copy>
+              <copy>
+                <from xmlns:saxon="http://saxon.sf.net/"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0">saxon:parse(xsd:string($textVar))</from>
+                <to variable="nodeVar"/>
+              </copy>
+            </assign>
+            <if>
+              <condition>$nodeVar/b/text() != 'some-b-text'</condition>
+              <throw faultName="error"/>
+            </if>
+          </sequence>
+        </scope>
         <reply name="end"




On Tue, Aug 10, 2010 at 10:22 AM, Christian Bruckhoff
<Christian.Bruckhoff@gmx.de> wrote:
> Hi.
>
> Am 10.08.2010 08:57, schrieb Rafal Rusin:
>> Hello,
>>
>> you need to convert string into node using saxon:parse. Please check out
>> this:
>> http://markmail.org/thread/zzcugme3c7z6l4zt
>
> If I use saxon with the following copy element, which I put between the
> other two, I get an error. But I don't know, where the problem in this
> assignment is. Can you help me pls?
>
> TIA
> Christian
>
> ------
>
> <bpel:copy>
>  <bpel:from xmlns:saxon="http://saxon.sf.net/"
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0">saxon:parse(string($getTimeSeriesEndpoint))</bpel:from>
>  <bpel:to>$getTimeSeriesEndpoint</bpel:to>
> </bpel:copy>
>
> ------
>
> ERROR - GeronimoLog.error(104) | Assignment Fault:
> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault,lineNo=289,faultExplanation={http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault:
> One or more static errors were reported during query analysis
>
>
>> On Tue, Aug 10, 2010 at 1:10 AM, Christian Bruckhoff
>> <Christian.Bruckhoff@gmx.de>  wrote:
>>>
>>> Hi.
>>>
>>> I want to create a dynamic invoke of a web service. For this i need to
>>> copy
>>> the IPAddress from a variable to the service-ref variable. My approach
>>> for
>>> solving this problem was the one shown below. This assign will make the<
>>> occur as&lt; in the SOAP message of the invoke. How can i solve this
>>> problem?
>>>
>>> TIA
>>> Christian
>>>
>>> -------
>>>
>>> <bpel:assign validate="no" name="assignGetTimeSeriesEndpoint">
>>>  <bpel:copy>
>>>    <bpel:from>
>>>      <![CDATA[concat('<sref:service-ref
>>>
>>> xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><EndpointReference
>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>',concat('http://',
>>> $waterGauge/wg:ipAddress, $waterGauge/wg:getTimeSeriesPath)
>>> ,'</Address></EndpointReference></sref:service-ref>')]]>
>>>    </bpel:from>
>>>    <bpel:to variable="getTimeSeriesEndpoint"></bpel:to>
>>>  </bpel:copy>
>>>  <bpel:copy>
>>>    <bpel:from>$getTimeSeriesEndpoint</bpel:from>
>>>    <bpel:to partnerLink="getTimeSeriesPL"></bpel:to>
>>>  </bpel:copy>
>>> </bpel:assign>
>>> <bpel:invoke name="getTimeSeries" partnerLink="getTimeSeriesPL"
>>> operation="getTimeSeries" portType="xhydrotns:getTimeSeries_WebService"
>>> inputVariable="getTimeSeriesRequest"
>>> outputVariable="getTimeSeriesResponse"
>>> />
>

-- 
Regards,
Rafał Rusin
http://rrusin.blogspot.com

Mime
View raw message