Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem creating Web Service Client

 
Monoj Roy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Searching for "download apache httpclient" should take you straight to it.
 
Monoj Roy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you provide some more information on what is the object contains that is being returned by the web service.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic