aspose file tools*
The moose likes Web Services and the fly likes Creating Web Service for Apache Http Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Creating Web Service for Apache Http Client" Watch "Creating Web Service for Apache Http Client" New topic
Author

Creating Web Service for Apache Http Client

H S Kumar
Greenhorn

Joined: Jun 08, 2011
Posts: 10
I am using Tomcat 5.5 and Axis2 and Ecliple 3.3 IDE. I have made an Apache Http client that is calling a Servlet deployed on my Tomcat server. That is working fine as standalone application. Here is the code :


But When I try to create a web Service for this Apache HttpCleint file and create .aar file and try to deploy the .aar file on Axis-2, I got error as "Faulty Service"

I am copying the error trace that comes on Axis-2 admin console :

Error: java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchemaGenerator.java:136) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:499) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:386) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:659) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:337) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:331) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:90) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: Class Not found : org.apache.http.client.methods.HttpUriRequest at org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:86) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 19 more


Please help me in Creating a Web Service for Apache HTTP Client java program.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
Are all the jar files that are needed for HttpClient in the WEB-INF/lib directory of Axis?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Web Service for Apache Http Client