Hi, In the attachment i tried to implement a generic axis2 web service client, which can handle concurrent request by multiple thread. In the attachment you can find my implementation. While i tried to test my code for a number of requests client does not seem to have a problem (request count under 100). However afte making more than 100 requests i some instances i get the following exception.
com.ardic.arcsp.ws.WsClientException: Error in the web servis method: + http://localhost:9763/services/ ServiceName: PerfTest Operation Name: getResult Payload: <dat:getResult xmlns:dat=' http://test.performance.ardic.com'><sleep>1000</sleep></dat:getResult> Exception message: null at com.ardic.arcsp.ws.impl.Axis2WsClientHelper.executeAxis2Request(Axis2WsClientHelper.java:363) at com.ardic.arcsp.ws.impl.Axis2WsClientHelper.executeRequest(Axis2WsClientHelper.java:171) at WorkerThreadTest.sendMessageToDevice(WorkerThreadTest.java:31) at WorkerThreadTest.run(WorkerThreadTest.java:18) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at org.apache.axis2.client.ServiceClient.cleanupTransport(ServiceClient.java:861) at org.apache.axis2.client.ServiceClient.createClient(ServiceClient.java:666) at com.ardic.arcsp.ws.impl.Axis2WsClientHelper.executeAxis2Request(Axis2WsClientHelper.java:333) at com.ardic.arcsp.ws.impl.Axis2WsClientHelper.executeRequest(Axis2WsClientHelper.java:171) at WorkerThreadTest.sendMessageToDevice(WorkerThreadTest.java:31) at WorkerThreadTest.run(WorkerThreadTest.java:18) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) The point is i get this exception on the client side while generating the OperationClient instance. This code is inspired by the generated Stub code by the wsdl2java tool and is only for development purposes. As a result what i want to know is whether the client implementation is correct and if there is a better solution for generating a client which can handle concurrent and multi user requests. Thank you PS: Axis2WsClientHelper is the client code, MainTest is my test code for testing the client.
Axis2WsClientHelper.java
Description: Binary data
MainTest.java
Description: Binary data
WorkerThreadTest.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org