Author: indika Date: Tue Jun 16 00:19:47 2009 New Revision: 39071 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=39071
Log: fix xquery samples Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_commisson.xq trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_res.xq trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_390.xml Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_commisson.xq URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_commisson.xq?rev=39071&r1=39070&r2=39071&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_commisson.xq (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_commisson.xq Tue Jun 16 00:19:47 2009 @@ -1,9 +1,9 @@ -<x><![CDATA[ - declare namespace m0="http://services.samples"; - declare variable $payload as document-node() external; - declare variable $commission as document-node() external; - <m0:return xmlns:m0="http://services.samples"> - <m0:symbol>{$payload//m0:return/m0:symbol/child::text()}</m0:symbol> - <m0:last>{$payload//m0:return/m0:last/child::text()+ $commission//commission/vend...@symbol=$payload//m0:return/m0:symbol/child::text()]}</m0:last> - </m0:return> +<x><![CDATA[ + declare namespace m0="http://services.samples"; + declare variable $payload as document-node() external; + declare variable $commission as document-node() external; + <m0:return xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd"> + <m1:symbol>{$payload//m0:return/m1:symbol/child::text()}</m1:symbol> + <m1:last>{$payload//m0:return/m1:last/child::text()+ $commission//commission/vend...@symbol=$payload//m0:return/m1:symbol/child::text()]}</m1:last> + </m0:return> ]]></x> \ No newline at end of file Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_res.xq URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_res.xq?rev=39071&r1=39070&r2=39071&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_res.xq (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/xquery/xquery_res.xq Tue Jun 16 00:19:47 2009 @@ -1,10 +1,10 @@ -<x><![CDATA[ - declare namespace m0="http://services.samples"; - declare variable $payload as document-node() external; - declare variable $code as xs:string external; - declare variable $price as xs:double external; - <m:CheckPriceResponse xmlns:m="http://services.samples"> - <m:Code>{$code}</m:Code> - <m:Price>{$price}</m:Price> - </m:CheckPriceResponse> +<x><![CDATA[ + declare namespace m0="http://services.samples"; + declare variable $payload as document-node() external; + declare variable $code as xs:string external; + declare variable $price as xs:double external; + <m:CheckPriceResponse xmlns:m="http://services.samples" xmlns:m1="http://services.samples/xsd"> + <m1:Code>{$code}</m1:Code> + <m1:Price>{$price}</m1:Price> + </m:CheckPriceResponse> ]]></x> \ No newline at end of file Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_390.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_390.xml?rev=39071&r1=39070&r2=39071&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_390.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_390.xml Tue Jun 16 00:19:47 2009 @@ -1,62 +1,64 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Introduction to the XQuery mediator --> -<definitions xmlns="http://ws.apache.org/ns/synapse"> - - <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --> - <registry provider="org.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/resources/</parameter> - <!-- all resources loaded from the URL registry would be cached for this number of milli seconds --> - <parameter name="cachableDuration">15000</parameter> - </registry> - - <localEntry key="xquery-key-req" - src="file:repository/samples/resources/xquery/xquery_req.xq"/> - <proxy name="StockQuoteProxy"> - <target> - <inSequence> - <xquery key="xquery-key-req"> - <variable name="payload" type="ELEMENT"/> - </xquery> - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - </inSequence> - <outSequence> - <out> - <xquery key="xquery/xquery_res.xq"> - <variable name="payload" type="ELEMENT"/> - <variable name="code" type="STRING" - expression="self::node()//m0:return/m0:symbol/child::text()" - xmlns:m0="http://services.samples"/> - <variable name="price" type="DOUBLE" - expression="self::node()//m0:return/m0:last/child::text()" - xmlns:m0="http://services.samples"/> - </xquery> - <send/> - </out> - </outSequence> - </target> - <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/> - </proxy> +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Introduction to the XQuery mediator --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --> + <registry provider="org.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milli seconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + <localEntry key="xquery-key-req" + src="file:repository/samples/resources/xquery/xquery_req.xq"/> + <proxy name="StockQuoteProxy"> + <target> + <inSequence> + <xquery key="xquery-key-req"> + <variable name="payload" type="ELEMENT"/> + </xquery> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + </inSequence> + <outSequence> + <out> + <xquery key="xquery/xquery_res.xq"> + <variable name="payload" type="ELEMENT"/> + <variable name="code" type="STRING" + expression="self::node()//m0:return/m1:symbol/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + <variable name="price" type="DOUBLE" + expression="self::node()//m0:return/m1:last/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + </xquery> + <send/> + </out> + </outSequence> + </target> + <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> </definitions> \ No newline at end of file _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
