TCP Transport
The TCP transport allows you to send and receive SOAP messages over TCP. The TCP transport is included with the WSO2 product distribution but must be enabled before use. To enable the TCP transport, open the <PRODUCT_HOME>/repository/conf/axis2/axis2.xml
file in a text editor and add the following transport receiver configuration and sender configuration:
<!-- Enable TCP message --> <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportListener"> <parameter name="transport.tcp.port">6060</parameter> </transportReceiver> <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
If you want to use the sample Axis2 client to send TCP messages, uncomment the TCP transport sender configuration in the following file:
samples/axis2Client/client_repo/conf/axis2.xml
Transport receiver parameters
Parameter Name | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
port | The port on which the TCP server should listen for incoming messages | No | A positive integer less than 65535 | 8000 |
hostname | The host name of the server to be displayed in WSDLs, etc. | No | A valid host name or an IP address |