Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Given below is the ESB configuration for simulating the example scenario explained above. 

Anchor
step3
step3

Code Block
languagehtml/xml
linenumberstrue
<definitions xmlns="http://ws.apache.org/ns/synapse">
   <sequence name="fault">
      <log level="full">
         <property name="MESSAGE" value="Executing default &#34;fault&#34; sequence"/>
         <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
         <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
      </log>
      <drop/>
   </sequence>
   <!-- Will trigger when a request is sent to the ESB profile of WSO2 EI --> 
   <sequence name="main">
      <in>
		 <!-- Will transform the incoming message to the format specified below --> 
		 <payloadFactory>
            <format>
               <m:getQuote xmlns:m="http://services.samples">
                  <m:request>
                     <m:symbol>$1</m:symbol>
                  </m:request>
               </m:getQuote>
            </format>
            <args>
               <arg xmlns:m0="http://services.samples" expression="//m0:Code"/>
            </args>
         </payloadFactory>
         <send>
            <endpoint>
               <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
         </send>
      </in>
      <out>      
      	<send/>
	  </out>
   </sequence>
</definitions>

...