This documentation is for WSO2 Enterprise Service Bus version 4.8.0 . View documentation for the latest release.

All docs This doc

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">
    <task class="org.apache.synapse.startup.tasks.MessageInjector" name="CheckPrice">
        <property name="to" value="http://localhost:9000/soapservices/SimpleStockQuoteService"/>
        <property name="soapAction" value="urn:getQuote"/>
        <property name="message">
            <m0:getQuote xmlns:m0="http://services.samples/xsd" xmlns="http://ws.apache.org/ns/synapse">
                <m0:request>
                    <m0:symbol>IBM</m0:symbol>
                </m0:request>
            </m0:getQuote>
        </property>
        <trigger interval="50005"/>
    </task>
    <sequence name="main">
        <in>
            <send/>
        </in>
        <out>
            <log level="custom">
                <property name="Stock _Quote _on" expression="//ns:return/nsax21:lastTradeTimestamp/child::text()"
                          xmlns:nsax21="http://services.samples/xsd" xmlns:ns="http://services.samples"/>
                <property name="For _the _organization" expression="//ns:return/nsax21:name/child::text()"
                          xmlns:nsax21="http://services.samples/xsd" xmlns:ns="http://services.samples"/>
                <property name="Last _Value" expression="//ns:return/nsax21:last/child::text()"
                          xmlns:nsax21="http://services.samples/xsd" xmlns:ns="http://services.samples"/>
            </log>
        </out>
    </sequence>
</definitions>

Objective:

Introduce the concept of tasks and how simple trigger works.

...