Author: veithen Date: Wed Aug 15 19:21:08 2012 New Revision: 1373590 URL: http://svn.apache.org/viewvc?rev=1373590&view=rev Log: SYNAPSE-906: Fixed sample 158 so that it actually sends SOAP (not POX) to the target service.
Modified: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample158.xml synapse/trunk/java/repository/conf/sample/synapse_sample_158.xml Modified: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample158.xml URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample158.xml?rev=1373590&r1=1373589&r2=1373590&view=diff ============================================================================== --- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample158.xml (original) +++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample158.xml Wed Aug 15 19:21:08 2012 @@ -24,53 +24,51 @@ </properties> <body> <section name="Sample 158: Exposing a SOAP service over JSON"> - <div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + <div class="xmlConf"><![CDATA[<definitions xmlns="http://ws.apache.org/ns/synapse"> - <proxy name="JSONProxy" transports="http https"> - <target> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - <inSequence> - <log level="full"/> - <xslt key="in_transform"/> - <property name="messageType" scope="axis2" value="text/xml"/> - </inSequence> - <outSequence> - <log level="full"/> - <xslt key="out_transform"/> - <property name="messageType" scope="axis2" value="application/json"/> - <send/> - </outSequence> - </target> - </proxy> + <proxy name="JSONProxy" transports="http https"> + <target> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/> + </endpoint> + <inSequence> + <log level="full"/> + <xslt key="in_transform"/> + </inSequence> + <outSequence> + <log level="full"/> + <xslt key="out_transform"/> + <send/> + </outSequence> + </target> + </proxy> - <localEntry key="in_transform"> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + <localEntry key="in_transform"> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" - xmlns:m0="http://services.samples" version="2.0" exclude-result-prefixes="m0 fn"> - <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> - <xsl:template match="*"> - <xsl:element name="{local-name()}" namespace="http://services.samples"> - <xsl:copy-of select="attribute::*"/> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - </xsl:stylesheet> - </localEntry> - - <localEntry key="out_transform"> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - <xsl:output method="xml" version="1.0" encoding="UTF-8"/> - <xsl:template match="*"> - <xsl:element name="{local-name()}"> - <xsl:apply-templates/> - </xsl:element> - </xsl:template> - </xsl:stylesheet> - </localEntry> + xmlns:m0="http://services.samples" version="2.0" exclude-result-prefixes="m0 fn"> + <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> + <xsl:template match="*"> + <xsl:element name="{local-name()}" namespace="http://services.samples"> + <xsl:copy-of select="attribute::*"/> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + </xsl:stylesheet> + </localEntry> + + <localEntry key="out_transform"> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" version="1.0" encoding="UTF-8"/> + <xsl:template match="*"> + <xsl:element name="{local-name()}"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + </xsl:stylesheet> + </localEntry> -</definitions></div> +</definitions>]]></div> <subsection name="Objective"> <p> Demonstrate the ability to switch between JSON and XML/SOAP content interchange formats Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_158.xml URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_158.xml?rev=1373590&r1=1373589&r2=1373590&view=diff ============================================================================== --- synapse/trunk/java/repository/conf/sample/synapse_sample_158.xml (original) +++ synapse/trunk/java/repository/conf/sample/synapse_sample_158.xml Wed Aug 15 19:21:08 2012 @@ -23,17 +23,15 @@ <proxy name="JSONProxy" transports="http https"> <target> <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/> </endpoint> <inSequence> <log level="full"/> <xslt key="in_transform"/> - <property name="messageType" scope="axis2" value="text/xml"/> </inSequence> <outSequence> <log level="full"/> <xslt key="out_transform"/> - <property name="messageType" scope="axis2" value="application/json"/> <send/> </outSequence> </target>