Axis2 Client Generation

Güçlü Akkaya <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <CAFMp1vptBfimaCaH4T2A+S7AqAsNxsO18bzEA29hmxqgJ4N9Zw@mail.gmail.com>
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Axis2WsClientHelper.java (application/octet-stream, 14.9 KB) - not displayed
MainTest.java (application/octet-stream, 2 KB) - not displayed
WorkerThreadTest.java (application/octet-stream, 2.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.