• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic