Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagehtml/xml
linenumberstrue
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do *not* want to keep the artifacts in several files -->
  <api name="StockQuoteAPI" context="/stockquote">
     <resource uri-template="/view/{symbol}" methods="GET">
        <inSequence>
           <payloadFactory>
             <format>
                <m0:getQuote xmlns:m0="http://services.samples">
                   <m0:request>
                     <m0:symbol>$1</m0:symbol>
                   </m0:request>
               </m0:getQuote>
             </format>  
              <args>
                <arg expression="get-property('uri.var.symbol')"/>
              </args>
           </payloadFactory>
           <header name="Action" value="urn:getQuote"/>
           <send>
             <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>
             </endpoint>
           </send>
        </inSequence>
        <outSequence>
           <send/>
        </outSequence>
     </resource>
     <resource methods="POST" url-mapping="/order/*">
        <inSequence>
           <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
           <property name="OUT_ONLY" value="true"/>
		   <header name="Action" value="urn:placeOrder"/>
           <send>
              <endpoint>
                  <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>
              </endpoint>
           </send>
        </inSequence>      
     </resource>
  </api>
</definitions>

...