Author: veithen
Date: Thu May 8 03:57:48 2008
New Revision: 654471
URL: http://svn.apache.org/viewvc?rev=654471&view=rev
Log:
SYNAPSE-282:
* Fixed a minor issue in the UDP listener (incorrect format of UDP packet
dumps).
* Modified UDPListener to make sure that getEPRsForService returns correct
values even if no IP is provided.
* Added a transport sender for UDP.
* Added a unit test for the UDP transport that uses SOAP and WS-Addressing to
achieve two-way asynchronous communication.
* Modified pom.xml for synapse-transports to create an Axis repository
containing the addressing module during the generate-test-resources phase
(required by UDPTest).
* Updated documentation of the org.apache.synapse.transport.udp package.
Since the code is experimental, it will only be committed to the trunk, not to
the 1.2 release branch.
Added:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPOutTransportInfo.java
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPSender.java
synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/
synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/UDPTest.java
synapse/trunk/java/modules/transports/src/test/resources/org/
synapse/trunk/java/modules/transports/src/test/resources/org/apache/
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/axis2.xml
Modified:
synapse/trunk/java/modules/transports/pom.xml
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPListener.java
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/Utils.java
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/package-info.java
Modified: synapse/trunk/java/modules/transports/pom.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/pom.xml?rev=654471&r1=654470&r2=654471&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/pom.xml (original)
+++ synapse/trunk/java/modules/transports/pom.xml Thu May 8 03:57:48 2008
@@ -49,6 +49,34 @@
</excludes>
</configuration>
</plugin>
+
+ <!-- We need a repository with the addressing module for the UDP
transport tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0-alpha-1</version>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>addressing</artifactId>
+ <version>${addressing.version}</version>
+ <type>mar</type>
+ <overWrite>true</overWrite>
+
<outputDirectory>target/test_rep/modules</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPListener.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPListener.java?rev=654471&r1=654470&r2=654471&view=diff
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPListener.java
(original)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPListener.java
Thu May 8 03:57:48 2008
@@ -19,6 +19,7 @@
package org.apache.synapse.transport.udp;
import java.io.IOException;
+import java.net.SocketException;
import java.util.HashMap;
import java.util.Map;
@@ -28,6 +29,7 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.synapse.transport.base.AbstractTransportListener;
import org.apache.synapse.transport.base.ManagementSupport;
@@ -51,6 +53,7 @@
public class UDPListener extends AbstractTransportListener implements
ManagementSupport {
private final Map<String,Endpoint> endpoints = new
HashMap<String,Endpoint>();
+ private String defaultIp;
private IODispatcher dispatcher;
@Override
@@ -62,6 +65,11 @@
} catch (IOException ex) {
throw new AxisFault("Unable to create selector", ex);
}
+ try {
+ defaultIp = HttpUtils.getIpAddress(cfgCtx.getAxisConfiguration());
+ } catch (SocketException ex) {
+ throw new AxisFault("Unable to determine the host's IP address",
ex);
+ }
// Start a new thread for the I/O dispatcher
new Thread(dispatcher, getTransportName() + "-dispatcher").start();
}
@@ -146,7 +154,7 @@
if (endpoint == null) {
return null;
} else {
- return new EndpointReference[] { endpoint.getEndpointReference(ip)
};
+ return new EndpointReference[] { endpoint.getEndpointReference(ip
== null ? defaultIp : ip) };
}
}
}
Added:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPOutTransportInfo.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPOutTransportInfo.java?rev=654471&view=auto
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPOutTransportInfo.java
(added)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPOutTransportInfo.java
Thu May 8 03:57:48 2008
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.synapse.transport.udp;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.transport.OutTransportInfo;
+
+/**
+ * Holder of information to send an outgoing message to a UDP destination.
+ */
+public class UDPOutTransportInfo implements OutTransportInfo {
+ private String host;
+ private int port;
+ private String contentType;
+
+ public UDPOutTransportInfo(String eprString) throws AxisFault {
+ URI epr;
+ try {
+ epr = new URI(eprString);
+ } catch (URISyntaxException ex) {
+ throw new AxisFault("Invalid endpoint reference", ex);
+ }
+
+ // TODO: quick&dirty; need to do this in a proper way
+ String params = epr.getQuery();
+ if (!params.startsWith("contentType=")) {
+ throw new AxisFault("Invalid endpoint reference: no content type");
+ }
+ host = epr.getHost();
+ port = epr.getPort();
+ contentType = params.substring(12);
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getContentType() {
+ return contentType;
+ }
+
+ public void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
+}
Added:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPSender.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPSender.java?rev=654471&view=auto
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPSender.java
(added)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/UDPSender.java
Thu May 8 03:57:48 2008
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.synapse.transport.udp;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.transport.MessageFormatter;
+import org.apache.axis2.transport.OutTransportInfo;
+import org.apache.axis2.transport.TransportUtils;
+import org.apache.commons.logging.LogFactory;
+import org.apache.synapse.transport.base.AbstractTransportSender;
+import org.apache.synapse.transport.base.BaseUtils;
+
+/**
+ * Transport sender for the UDP protocol.
+ *
+ * @see org.apache.synapse.transport.udp
+ */
+public class UDPSender extends AbstractTransportSender {
+ public UDPSender() {
+ log = LogFactory.getLog(UDPSender.class);
+ }
+
+ @Override
+ public void init(ConfigurationContext cfgCtx, TransportOutDescription
transportOut) throws AxisFault {
+ setTransportName(UDPConstants.TRANSPORT_NAME);
+ super.init(cfgCtx, transportOut);
+ }
+
+ @Override
+ public void sendMessage(MessageContext msgContext, String targetEPR,
OutTransportInfo outTransportInfo) throws AxisFault {
+ UDPOutTransportInfo udpOutInfo = new UDPOutTransportInfo(targetEPR);
+ MessageFormatter messageFormatter =
TransportUtils.getMessageFormatter(msgContext);
+ OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext);
+ format.setContentType(udpOutInfo.getContentType());
+ byte[] payload = messageFormatter.getBytes(msgContext, format);
+ try {
+ DatagramSocket socket = new DatagramSocket();
+ try {
+ socket.send(new DatagramPacket(payload, payload.length,
InetAddress.getByName(udpOutInfo.getHost()), udpOutInfo.getPort()));
+ }
+ finally {
+ socket.close();
+ }
+ }
+ catch (IOException ex) {
+ throw new AxisFault("Unable to send packet", ex);
+ }
+ }
+}
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/Utils.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/Utils.java?rev=654471&r1=654470&r2=654471&view=diff
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/Utils.java
(original)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/Utils.java
Thu May 8 03:57:48 2008
@@ -36,7 +36,7 @@
buffer.append(" ");
}
buffer.append(' ');
- if (i == 8) {
+ if (i == 7) {
buffer.append(' ');
}
}
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/package-info.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/package-info.java?rev=654471&r1=654470&r2=654471&view=diff
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/package-info.java
(original)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/udp/package-info.java
Thu May 8 03:57:48 2008
@@ -20,10 +20,10 @@
/**
* Transport implementation for the UDP protocol.
* <p>
- * This package contains a transport listener implementation allowing Axis to
- * receive and process UDP packets. It is an implementation of "raw" UDP in the
+ * This package contains a transport implementation allowing Axis to
+ * send and receive UDP packets. It is an implementation of "raw" UDP in the
* sense that the message is directly extracted from the UDP payload without
- * any intermediate application protocol. This has two important implications:
+ * any intermediate application protocol. This has several important
implications:
* <ul>
* <li>The only way to route the incoming message to the appropriate Axis
service
* is to bind the service a specific UDP port. The port number must be
@@ -34,11 +34,21 @@
* message. Indeed, there is no equivalent to HTTP's
* <tt>Content-Type</tt> header. Again the expected content type must be
* configured explicitly for the service.</li>
+ * <li>Since UDP doesn't provide any mean to correlate responses to requests,
+ * the transport can only be used for asynchronous communication.</li>
* </ul>
* See the documentation of [EMAIL PROTECTED]
org.apache.synapse.transport.udp.UDPListener}
* for more information about how to configure a service to accept UDP packets.
+ * Endpoint references for the UDP transport are assumed to follow the
following
+ * syntax:
+ * <pre>
+ * udp://<em>host</em>:<em>port</em>?contentType=...</pre>
* <p>
- * It should also be noted that given its characteristics, UDP is not a
+ * The UDP transport can be enabled in the Axis configuration as follows:
+ * <pre>
+ * <transportReceiver name="udp"
class="org.apache.synapse.transport.udp.UDPListener"/>
+ * <transportSender name="udp"
class="org.apache.synapse.transport.udp.UDPSender"/></pre>
+ * It should be noted that given its characteristics, UDP is not a
* suitable transport protocol for SOAP, except maybe in very particular
* circumstances. Indeed, UDP is an unreliable protocol:
* <ul>
@@ -46,12 +56,18 @@
* <li>Messages may arrive out of order.</li>
* <li>Messages may be duplicated, i.e. delivered twice.</li>
* </ul>
- * This transport implementation is useful mainly to integrate Axis (and in
+ * However the unit tests show an example of how to use this transport with
SOAP
+ * and WS-Addressing to achieve two-way asynchronous communication.
+ * Note that the transport has not been designed to implement the
+ * <a
href="http://specs.xmlsoap.org/ws/2004/09/soap-over-udp/soap-over-udp.pdf">SOAP
+ * over UDP specification</a> and will probably not be interoperable.
+ * <p>
+ * The main purpose of this transport implementation is to integrate Axis (and
in
* particular Synapse) with existing UDP based protocols. See
* [EMAIL PROTECTED] org.apache.synapse.format.syslog} for an example of this
kind
* of protocol.
*
- * <h4>Known issues</h4>
+ * <h4>Known issues and limitations</h4>
*
* <ul>
* <li>Packets longer than the configured maximum packet size
@@ -60,6 +76,16 @@
* <li>The listener doesn't implement all management operations
* specified by
* [EMAIL PROTECTED]
org.apache.synapse.transport.base.ManagementSupport}.</li>
+ * <li>The listener assumes that services are bound to unique UDP ports
+ * and predispatches incoming requests based on port numbers.
+ * When SOAP with WS-Addressing is used, the packets could be
+ * received on a single port and dispatched based on the <tt>To</tt>
+ * header. This is not supported.</li>
+ * <li>The transport sender uses a randomly chosen UDP source port. Some
+ * UDP based services may check the source port and discard the packet.
+ * Also, in two-way communication scenarios, stateful firewalls will
+ * not be able to correlate the exchanged packets and may drop
+ * some of them.</li>
* </ul>
*/
package org.apache.synapse.transport.udp;
\ No newline at end of file
Added:
synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/UDPTest.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/UDPTest.java?rev=654471&view=auto
==============================================================================
---
synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/UDPTest.java
(added)
+++
synapse/trunk/java/modules/transports/src/test/java/org/apache/synapse/transport/udp/UDPTest.java
Thu May 8 03:57:48 2008
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.synapse.transport.udp;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.InOutAxisOperation;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
+import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.synapse.transport.Echo;
+
+/**
+ * Test case for [EMAIL PROTECTED] UDPListener} and [EMAIL PROTECTED]
UDPSender}.
+ */
+public class UDPTest extends TestCase {
+ public void testSoapOverUdpWithEchoService() throws Exception {
+ // Create the configuration context. The test assumes that the
repository is set up
+ // to contain the addressing module. The UDP transport is enabled in
axis2.xml.
+ ConfigurationContext configurationContext
+ =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test_rep",
+ UDPTest.class.getResource("axis2.xml").getFile());
+
+ //
+ // Set up the echo service
+ //
+ // TODO: copy&paste from UtilsTransportServer#deployEchoService
+
+ AxisService service = new AxisService("EchoService");
+ service.setClassLoader(Thread.currentThread().getContextClassLoader());
+ service.addParameter(new Parameter(Constants.SERVICE_CLASS,
Echo.class.getName()));
+
+ AxisOperation axisOp = new InOutAxisOperation(new
QName("echoOMElement"));
+ axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
+ axisOp.setStyle(WSDLConstants.STYLE_RPC);
+ service.addOperation(axisOp);
+ service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI +
"/echoOMElement", axisOp);
+
+ axisOp = new InOutAxisOperation(new QName("echoOMElementNoResponse"));
+ axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
+ axisOp.setStyle(WSDLConstants.STYLE_RPC);
+ service.addOperation(axisOp);
+ service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI +
"/echoOMElementNoResponse", axisOp);
+
+ service.addParameter(UDPConstants.PORT_KEY, 3333);
+ service.addParameter(UDPConstants.CONTENT_TYPE_KEY, "text/xml+soap");
+
+ configurationContext.getAxisConfiguration().addService(service);
+
+ //
+ // Create echo message to send
+ //
+ // TODO: copy&paste from AbstractTransportTest#createPayload
+
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMNamespace omNs =
fac.createOMNamespace("http://localhost/axis2/services/EchoXMLService", "my");
+ OMElement method = fac.createOMElement("echoOMElement", omNs);
+ OMElement value = fac.createOMElement("myValue", omNs);
+ value.addChild(fac.createOMText(value, "omTextValue"));
+ method.addChild(value);
+
+ //
+ // Call the echo service and check response
+ //
+
+ Options options = new Options();
+ options.setTo(new
EndpointReference("udp://127.0.0.1:3333?contentType=text/xml+soap"));
+ options.setAction(Constants.AXIS2_NAMESPACE_URI + "/echoOMElement");
+ options.setUseSeparateListener(true);
+ options.setTimeOutInMilliSeconds(Long.MAX_VALUE);
+
+ ServiceClient serviceClient = new ServiceClient(configurationContext,
null);
+ serviceClient.setOptions(options);
+ // We need to set up the anonymous service Axis uses to get the
response
+ AxisService clientService =
serviceClient.getServiceContext().getAxisService();
+ clientService.addParameter(UDPConstants.PORT_KEY, 4444);
+ clientService.addParameter(UDPConstants.CONTENT_TYPE_KEY,
"text/xml+soap");
+ OMElement response = serviceClient.sendReceive(method);
+
+ assertEquals(new QName(omNs.getNamespaceURI(),
"echoOMElementResponse"), response.getQName());
+ }
+}
Added:
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/axis2.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/axis2.xml?rev=654471&view=auto
==============================================================================
---
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/axis2.xml
(added)
+++
synapse/trunk/java/modules/transports/src/test/resources/org/apache/synapse/transport/udp/axis2.xml
Thu May 8 03:57:48 2008
@@ -0,0 +1,110 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!-- Axis configuration file for UDPTest -->
+<axisconfig name="AxisJava2.0">
+ <transportReceiver name="udp"
class="org.apache.synapse.transport.udp.UDPListener"/>
+ <transportSender name="udp"
class="org.apache.synapse.transport.udp.UDPSender"/>
+ <module ref="addressing"/>
+ <phaseOrder type="InFlow">
+ <!-- System pre defined phases -->
+ <phase name="Transport">
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ </phase>
+ <phase name="Addressing">
+ <handler name="AddressingBasedDispatcher"
+
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Addressing"/>
+ </handler>
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+ <handler name="RequestURIOperationDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+ <handler name="SOAPMessageBodyBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+ <handler name="HTTPLocationBasedDispatcher"
+
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- System predefined phases -->
+ <!-- After Postdispatch phase module author or service author can
add any phase he want -->
+ <phase name="OperationInPhase"/>
+ <phase name="soapmonitorPhase"/>
+ </phaseOrder>
+ <phaseOrder type="OutFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="soapmonitorPhase"/>
+ <phase name="OperationOutPhase"/>
+ <!--system predefined phase-->
+ <!--these phase will run irrespective of the service-->
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+ <phaseOrder type="InFaultFlow">
+ <phase name="Addressing">
+ <handler name="AddressingBasedDispatcher"
+
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Addressing"/>
+ </handler>
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+ <handler name="RequestURIOperationDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+ <handler name="SOAPMessageBodyBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+ <handler name="HTTPLocationBasedDispatcher"
+
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationInFaultPhase"/>
+ <phase name="soapmonitorPhase"/>
+ </phaseOrder>
+ <phaseOrder type="OutFaultFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="soapmonitorPhase"/>
+ <phase name="OperationOutFaultPhase"/>
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+</axisconfig>