Author: veithen
Date: Tue Sep 18 06:46:34 2012
New Revision: 1387004
URL: http://svn.apache.org/viewvc?rev=1387004&view=rev
Log:
Fixed sample 390.
Modified:
synapse/branches/SYNAPSE-905/modules/documentation/src/site/xdoc/userguide/samples/sample390.xml
synapse/branches/SYNAPSE-905/repository/conf/sample/synapse_sample_390.xml
Modified:
synapse/branches/SYNAPSE-905/modules/documentation/src/site/xdoc/userguide/samples/sample390.xml
URL:
http://svn.apache.org/viewvc/synapse/branches/SYNAPSE-905/modules/documentation/src/site/xdoc/userguide/samples/sample390.xml?rev=1387004&r1=1387003&r2=1387004&view=diff
==============================================================================
---
synapse/branches/SYNAPSE-905/modules/documentation/src/site/xdoc/userguide/samples/sample390.xml
(original)
+++
synapse/branches/SYNAPSE-905/modules/documentation/src/site/xdoc/userguide/samples/sample390.xml
Tue Sep 18 06:46:34 2012
@@ -24,52 +24,51 @@
</properties>
<body>
<section name="Sample 390: Introduction to the XQuery Mediator">
- <div class="xmlConf"><definitions
xmlns="http://ws.apache.org/ns/synapse">
+ <div class="xmlConf"><![CDATA[<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.apache.synapse.registry.url.SimpleURLRegistry">
- <!-- the root property of the simple URL registry helps resolve a
resource URL as root + key -->
- <parameter
name="root">file:repository/conf/sample/resources/</parameter>
- <!-- all resources loaded from the URL registry would be cached for
this number of milli seconds -->
- <parameter name="cachableDuration">15000</parameter>
- </registry>
+ <!-- the SimpleURLRegistry allows access to a URL based registry (e.g.
file:/// or http://) -->
+ <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
+ <!-- the root property of the simple URL registry helps resolve a
resource URL as root + key -->
+ <parameter
name="root">file:repository/conf/sample/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/conf/sample/resources/xquery/xquery_req.xq"/>
+ <localEntry key="xquery-key-req"
+
src="file:repository/conf/sample/resources/xquery/xquery_req.xq"/>
- <proxy name="StockQuoteProxy">
- <target>
- <inSequence>
- <property name="body"
expression="$body/child::*[position()=1]"/>
- <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 xmlns:m0="http://services.samples"
- xmlns:ax21="http://services.samples/xsd"
name="code" type="STRING"
-
expression="self::node()//m0:return/ax21:symbol/child::text()"/>
- <variable xmlns:m0="http://services.samples"
- xmlns:ax21="http://services.samples/xsd"
name="price"
- type="DOUBLE"
-
expression="self::node()//m0:return/ax21:last/child::text()"/>
- </xquery>
- <send/>
- </out>
- </outSequence>
- </target>
- <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
- </proxy>
+ <proxy name="StockQuoteProxy">
+ <target>
+ <inSequence>
+ <property name="body"
expression="$body/child::*[position()=1]"/>
+ <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 xmlns:m0="http://services.samples"
+ name="code" type="STRING"
+
expression="self::node()//m0:return/m0:symbol/child::text()"/>
+ <variable xmlns:m0="http://services.samples"
+ name="price" type="DOUBLE"
+
expression="self::node()//m0:return/m0:last/child::text()"/>
+ </xquery>
+ <send/>
+ </out>
+ </outSequence>
+ </target>
+ <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
+ </proxy>
-</definitions></div>
+</definitions>]]></div>
<subsection name="Objective">
<p>
Demonstrate how to use the XQuery mediator for message
content transformations
Modified:
synapse/branches/SYNAPSE-905/repository/conf/sample/synapse_sample_390.xml
URL:
http://svn.apache.org/viewvc/synapse/branches/SYNAPSE-905/repository/conf/sample/synapse_sample_390.xml?rev=1387004&r1=1387003&r2=1387004&view=diff
==============================================================================
--- synapse/branches/SYNAPSE-905/repository/conf/sample/synapse_sample_390.xml
(original)
+++ synapse/branches/SYNAPSE-905/repository/conf/sample/synapse_sample_390.xml
Tue Sep 18 06:46:34 2012
@@ -50,12 +50,11 @@
<xquery key="xquery/xquery_res.xq">
<variable name="payload" type="ELEMENT"/>
<variable xmlns:m0="http://services.samples"
- xmlns:ax21="http://services.samples/xsd"
name="code" type="STRING"
-
expression="self::node()//m0:return/ax21:symbol/child::text()"/>
+ name="code" type="STRING"
+
expression="self::node()//m0:return/m0:symbol/child::text()"/>
<variable xmlns:m0="http://services.samples"
- xmlns:ax21="http://services.samples/xsd"
name="price"
- type="DOUBLE"
-
expression="self::node()//m0:return/ax21:last/child::text()"/>
+ name="price" type="DOUBLE"
+
expression="self::node()//m0:return/m0:last/child::text()"/>
</xquery>
<send/>
</out>