aspose file tools*
The moose likes Web Services and the fly likes Problem creating Web Service Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem creating Web Service Client" Watch "Problem creating Web Service Client" New topic
Author

Problem creating Web Service Client

Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
I am using Axix2 -1.5 and Jboss 4.0 ,I have written a service and created the WSDL for the service .From another machine when
I am trying to call the WebService ,I am getting the following error .Can anybody please help.

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.setParams(Lorg/apache/commons/httpclient/params/HttpClientParams;)V
at org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:500)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:163)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at cts.pfizer.poc.AddressStub.getAddressID(AddressStub.java:1991)
at cts.pfizer.poc.ConverterClient.main(ConverterClient.java:16)

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42916
    
  68
Looks like you're using a version of the Apache HttpClient library that is not compatible with the Axis version you're using. Axis2 1.5 comes with HttpClient 3.1; make sure that that is the version you have in the classpath when you're calling the WS, and that it's the only one.
Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
Thanks a lot to respond .

I went through the following site

http://archive.apache.org/dist/httpcomponents/httpclient

But only version 4 are available there ,As you told I need 3.1 ,I need a help to find it out .Can you please send me the same or share the URL.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42916
    
  68
Searching for "download apache httpclient" should take you straight to it.
Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
Thanks . I resolved the issue ,The problem was two same jar of different version in the classpath.
By the way I got another problem when I am sending primitive data from the server I can get it in the client console ,There is no issue but if I am creating a serializable object in the server and return it ,I am getting the following error,Please help

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any type element type has not been given
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at cts.poc.SIFServiceCallStub.fromOM(SIFServiceCallStub.java:9875)
at cts.poc.SIFServiceCallStub.service(SIFServiceCallStub.java:466)
at cts.poc.TestWSClient.main(TestWSClient.java:28)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Any type element type has not been given
at cts.poc.SIFServiceCallStub$RespServBO$Factory.parse(SIFServiceCallStub.java:9760)
at cts.poc.SIFServiceCallStub$ServiceResponse$Factory.parse(SIFServiceCallStub.java:3803)
at cts.poc.SIFServiceCallStub.fromOM(SIFServiceCallStub.java:9869)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Any type element type has not been given
at org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(ConverterUtil.java:1617)
at cts.poc.SIFServiceCallStub$RespServBO$Factory.parse(SIFServiceCallStub.java:9738)
... 4 more
Srikanth Kumar
Ranch Hand

Joined: Jun 04, 2008
Posts: 36
Could you provide some more information on what is the object contains that is being returned by the web service.


Srikanth Kumar
SCJP 5, SCWCD 5, SCDJWS 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem creating Web Service Client