This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes Error on changing server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error on changing server" Watch "Error on changing server" New topic
Author

Error on changing server

somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44

Hi
I have developed a web service from wsdl (my own generated wsdl from a schema) and deployed on Glassfish server. Now i changed the server i.e. Apache Tomcat and tried to deploy that web service but i found this error message
"E:\Programs\simple_ws\nbproject\jaxws-build.xml:11: taskdef class com.sun.tools.ws.ant.WsImport cannot be found"
Can anybody help me to resolve this error.

Best Wishes
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
First a question to establish that the basic prerequisite is fulfilled:
Have you installed Metro in the Tomcat server to which you try to deploy the service?
Best wishes!
somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
Ivan Krizsan wrote:Hi!
First a question to establish that the basic prerequisite is fulfilled:
Have you installed Metro in the Tomcat server to which you try to deploy the service?
Best wishes!



Hi
I have not installed Metro in the Tomcat server. Can you tell me about a useful link which will help me to do this task. I am using Tomcat server 6.0.

Best Wishes and thanks
somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
somia razzaq wrote:
Ivan Krizsan wrote:Hi!
First a question to establish that the basic prerequisite is fulfilled:
Have you installed Metro in the Tomcat server to which you try to deploy the service?
Best wishes!



Hi
I have not installed Metro in the Tomcat server. Can you tell me about a useful link which will help me to do this task. I am using Tomcat server 6.0.

Best Wishes and thanks


Hi
I tried to install Metro in Tomcat server by using the link "http://hydrogen.informatik.tu-cottbus.de/wiki/index.php/Installing_JAX-WS_RI_on_Tomcat" but still i am facing the same error i.e. "E:\ws-programs\3rdaug-clientTakingObjReplyingString\Student\nbproject\jaxws-build.xml:11: taskdef class com.sun.tools.ws.ant.WsImport cannot be found". Please give me a suggestion to resolve this error.

Best Wishes
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Perhaps they are correct, but the instructions on the webpage you referred to differs from those given at the Metro webpage, concerning how to install Metro in Tomcat.
Here is the link to the Metro webpage that describes installation on Tomcat: https://metro.dev.java.net/2.0/
Additionally, which most likely is the cause of your problems, you must include the Metro libraries (in which the wsimport task is found) in the classpath used by your Ant script.
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error on changing server