...
Code Block | ||
---|---|---|
| ||
<definitions xmlns="http://ws.apache.org/ns/synapse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ws.apache.org/ns/synapse http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd"> <proxy name="StockQuoteProxy" transports="udp"> <target> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> <inSequence> <log level="full"/> <property name="OUT_ONLY" value="true"/> </inSequence> </target> <parameter name="transport.udp.port">9999</parameter> <parameter name="transport.udp.contentType">text/xml</parameter> <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> </proxy> </definitions> |
Prerequisites:
- Configure Synapse to use the UDP transport. The sample Axis2 client should also be setup to send UDP requests.
- Start Synapse:
synapse -sample 267
- Start Axis2 server with SimpleStockService deployed
This sample is similar to Sample 266. Only difference is instead of the TCP transport we will be using the UDP transport to receive messages. Invoke the stockquote client using the following command. Note the TCP URL in the command.
...