Sending message to wso2 socket, getting exception

I am trying to send a message over TCP in the wso2 framework. I get this exception in the log:

[2015-08-20 12:21:50,098] ERROR - TCPWorker Error while processing TCP request through the Axis2 engine java.lang.NullPointerException at org.wso2.carbon.tenant.dispatcher.MultitenantDispatcher.findService(MultitenantDispatcher.java:47) at org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:94) at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) at org.apache.axis2.engine.Phase.invoke(Phase.java:313) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) at org.apache.axis2.transport.tcp.TCPWorker.run(TCPWorker.java:68) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 

It follows that axis2 conf starts TCP:

 <transportReceiver name="local" class="org.wso2.carbon.core.transports.local.CarbonLocalTransportReceiver"/> <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportListener"> <parameter name="transport.tcp.port">6060</parameter> </transportReceiver> 

And wso2.xml:

 <definitions xmlns="http://ws.apache.org/ns/synapse"> <sequence name="fault"> <makefault> <code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/> <reason value="Mediation failed."/> </makefault> <send/> </sequence> <proxy xmlns="http://ws.apache.org/ns/synapse" name="TCPProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <log level="full"/> </inSequence> <outSequence> <send/> </outSequence> </target> <parameter name="transport.tcp.port">6060</parameter> <parameter name="transport.tcp.contentType">application/xml</parameter> <description/> </proxy> </definitions> 
+5
source share
1 answer

It seems that no proxy service can be found in the ESB when a message is received on tcp port 6060.

I'm not used to tcp transport in WSO2, but I wonder if the attribute “transports” in the proxy server definition should contain “tcp” instead of “https, http":

 <proxy xmlns="http://ws.apache.org/ns/synapse" name="TCPProxy" transports="tcp" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <log level="full"/> </inSequence> <outSequence> <send/> </outSequence> </target> <parameter name="transport.tcp.port">6060</parameter> <parameter name="transport.tcp.contentType">application/xml</parameter> <description/> </proxy> 
+1
source

All Articles