Skip to content
Browse files
Added some initial documentation for the UDP transport.
  • Loading branch information
veithen committed May 24, 2010
1 parent 2e83d16 commit 579f9c134e0992f167635e9ebb41289d5519bc5a
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
@@ -0,0 +1,81 @@
~~ 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
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

JMS Transport

* {Content}


* {Transport listener}

** {Listener configuration}

The UDP transport listener is configured in <<<axis2.xml>>> using the following declaration:

<transportReceiver name="udp" class="org.apache.axis2.transport.udp.UDPListener"/>

Depending on how the UDP transport is set up, additional parameters may be required inside the
<<<transportReceiver>>> element (see next section).

** {Endpoint configuration}

Endpoints can be configured both at the transport level and at the service level. Each endpoint
opens a local UDP port for listening. UDP packets received on a port that is configured on a
service will be pre-dispatched to that service. Packets received by a port that is configured
at the transport level need to be dispatched using WS-Addressing or some other mechanism
implemented by a dispatcher configured in Axis2.

Endpoints are configured by adding <<<parameter>>> elements to the <<<transportReceiver>>>
element in <<<axis2.xml>>> or to a <<<service>>> element in an <<<services.xml>>> file. The
set of parameters is the same for both scenarios:

[<<<transport.udp.port>>> (required)]
Specifies the UDP port to bind to.

[<<<transport.udp.contentType>>> (required)]
Specifies the content type of the messages received on the endpoint. This parameter is
necessary because in contrast to HTTP, the content type information is not part of the
information exchanged on the wire.

[<<<transport.udp.maxPacketSize>>> (optional, defaults to 1024)]
The maximum UDP packet size.

** {Examples}

*** {Enabling SOAP over UDP at the transport level}

The following declaration in <<<axis2.xml>>> enables SOAP over UDP on port 3333 and
allows all services (for which UDP is in the list of exposed transports) to receive
messages over that port:

<transportReceiver name="udp" class="org.apache.axis2.transport.udp.UDPListener">
<parameter name="transport.udp.port">3333</parameter>
<parameter name="transport.udp.contentType">text/xml</parameter>
<parameter name="transport.udp.maxPacketSize">4096</parameter>

For this to work, WS-Addressing must be enabled, and messages sent to port 3333 must
have the relevant WS-Addressing headers.

<module ref="addressing"/>
@@ -56,6 +56,7 @@
<item name="JMS" href="jms.html"/>
<item name="Mail" href="mail.html"/>
<item name="TCP" href="tcp-transport.html"/>
<item name="UDP" href="udp.html"/>
<item name="XMPP" href="xmpp.html"/>
<item name="SMS" href="sms.html"/>

0 comments on commit 579f9c1

Please sign in to comment.