aspose file tools*
The moose likes Web Services and the fly likes websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working" Watch "websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working" New topic
Author

websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Narahari Lakshminarayana
Greenhorn

Joined: Sep 18, 2011
Posts: 2
Friends:

I have a JAXWS webservice developed in WebSphere 7.0. It is working there. The stack in Websphere is Axis2.0

I wrote a POJO Java class, annotated with the @WebService annotation and then I did a wsgen to generate the necessary artifacts and created the war file.

The imp thing is that web.xml does NOT have any servlets in it or listeners defined.


However when I deploy that war file to Tomcat 6.0.32 and then copy the axis2 jars to the WEB-INF\lib folder.

When I restart Tomcat, the WebService does not work.

What I am curious is, how come Websphere7, deploys the WebService on startup without any entires in web.xml but Tomcat refuses to do so ?

What am I missing ?

-Narahari
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 409
    
    3
1. I did 1 experiment with Glassfish instead of WebSphere 7.0 and got the same issue when deployed exported war file from GlassFish onto Tomcat.

2. I found this explanation:

http://glassfish.java.net/javaee5/webservices/dispatch_process.html

Annotation Processing
The classes that process Web Services annotations at deployment time are found in appserv-commons/src/java/com/sun/enterprise/deployment/annotation/handlers. For example, the WebServiceHandler class processes the @WebService annotation.

During deployment of a service, all deployment descriptors (if any) are loaded and then the annotations are processed. On seeing an @WebService, for example, the annotation framework calls WebServiceHandler which processes the annotation. While processing the annotation, we check if there a deployment descriptor entry already available (e.g., from webservices.xml) and if so, the annotation values will not override the equivalent defined in the descriptor. At the end of the annotation processing phase, we have all the information required with which we generate WSDLs and other portable artifacts (if not packaged).

3. Does Tomcat has such WebServiceHandler?
Narahari Lakshminarayana
Greenhorn

Joined: Sep 18, 2011
Posts: 2
Thank You. What you say makes sense.

I have done research about Tomcat7. By itself, Tomcat7 does not have WebServiceHandler.

However AXIS2 or Metro or Apache CXF should have these capabilities I believe.

But should those jars be in the <catalina_home>\lib or the applications web-inf\lib folder ?

Has anyone tried to run JAXWS Webservices inside of TOMCAT without web.xml entries ?

-Narahari
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
The following webpage contains instructions on how to install Metro in a Tomcat instance: http://metro.java.net/2.1.1/
Having installed Metro in Tomcat, you can deploy JAX-WS web services in the same manner as with GlassFish, without using special attention to the web.xml deployment descriptor.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working