Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webservice not running

 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Members,

I am newbie in Web service. tried to execute this Tutorial from my Eclipse 3.5 , axis2-1.5 and Tomcat 6.0.24. But when I try to execute first it show this error during start up.




and when I execute this service by clicking on Service link i got this error trace.



Please anyone tell me how can I solve this problem? I googled it very deeply but every attempt gone in vain.

Thanks in advance !
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ashish,

You probably figured this out by now. Per your note, you are using Axis 2 1.5. However, the tutorial link states in Section 2.2 that version 1.5 is currently not supported. There is also a link to Axis 2 1.4.1 which is supported. So please try that version and see if it works. Here is another tutorial that refers to 1.4.1. And the Axis 2 Tools page indicates that the tools are supported only for 1.4.

- Srini
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srini,

Thanks a lot for this nice link. Fortunately I tried this link earlier but could not execute even the simplest one. I tried this example again but faced the same problem again. I think this work around would be beneficial for others as well. First I changed the workspace and then I tried with Axis2-1.4.1. It started work magically.


Thanks a lot Srini for your help.
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For those of you interested in this, I think we have a workaround to using Eclipse with Axis 1.5.1.

I tried this Axis tutorial in Eclipse using Axis 2 version 1.5.1. As expected, there were problems. I got the following issues:

1. NoClassDefFoundError errors for HTTPResponseFactory
The class is in httpcore-4.0.jar which is not added to the library path in the tooling. Eclipse tooling currently supports Axis 1.4.1, but not 1.5.1. So the jar had to be copied from C:\axis2-1.5.1\lib (<axis directory>/lib) to C:\apache-tomcat-6.0.26\lib (<tomcat directory>/lib). I got this information here.

2. NoClassDefFoundError errors for AxisAdminServlet
As it turns out, in the version change, AxisAdminServlet was moved from org.apache.axis2.transport.http package to org.apache.axis2.webapp. Got this information here. So I made that change in the web.xml,

And now tomcat starts fine. The axis servlet works. For the above tutorial, I was able to see the service at http://localhost:8080/Axis2WSTest/axis2-web/index.jsp (where the project name is Axis2WSTest, and axis2-web is generated by the tooling with a whole bunch of JSPs).

Just a couple of minor one-time changes, and we should be able to use existing Eclipse tooling with Axis 1.5.1 - of course, until we encounter another problem.

Hope that helps someone.
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
R Srini wrote:
Just a couple of minor one-time changes, and we should be able to use existing Eclipse tooling with Axis 1.5.1 - of course, until we encounter another problem.

Hope that helps someone.


Thanks Srini,

I am new to Web Service. I want to know how can I call my web service . What I understand from various resources is that , Web Service is a way by which we can expose our Interfaces (in this case it is in Java) to the users (say client) of my web service. I still doubt that how can the client will invoke my service?

I gone through with the Web Service FAQ. Here it is mentioned that we can test the web services, we can see the implementation of Free and Commercial Web Services.

What does that really mean?

I executed the Web Service using the above mentioned example. But I am still not aware that how will my client (JSP based project running on different URL) use this service? I know only about this

http://localhost:7001/TempratureWS/services/CelciusFarenhite?wsdl URL.

So please tell me how should I proceed with Web Service?


Thanks in Advance !






 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All major SOAP implementation (like Axis2 and JAX-WS/Metro) come with tools that can create client-side Java code given the WSDL of the WS. For example, Axis' tool is called wsd2ljava. If you work through the examples that come with the SOAP stack you're using, you'll find at least one that describes how to use that tool.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic