You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Narahari 'n' Savitha <sa...@gmail.com> on 2011/09/21 05:15:45 UTC

websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

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.

<?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>     id="WebApp_ID" version="2.5">
>     <display-name>CMSExternalWebServices</display-name>
>
>     <servlet>
>         <servlet-name>Log4JControl</servlet-name>
>
> <servlet-class>it.openutils.log4j.Log4jConfigurationServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Log4JControl</servlet-name>
>         <url-pattern>/Log4JControl/*</url-pattern>
>     </servlet-mapping>
>
>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>         <welcome-file>default.html</welcome-file>
>         <welcome-file>default.htm</welcome-file>
>         <welcome-file>default.jsp</welcome-file>
>     </welcome-file-list>
> </web-app>
>


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

Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Posted by Mark Thomas <ma...@apache.org>.
On 21/09/2011 19:18, Caldarale, Charles R wrote:
>> From: Narahari 'n' Savitha [mailto:savithari@gmail.com] 
>> Subject: Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working
> 
>> Tomcat7 can handle Servlet3 based classes.
> 
> But Tomcat 6 can't, so perhaps you should retry using Tomcat 7.

The OP can try but it isn't going to work. @WebService is not part of
the Servlet 3.0 specification.

I suggest reading this:
http://tomcat.apache.org/tomcat-7.0-doc/extras.html

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Posted by Narahari 'n' Savitha <sa...@gmail.com>.
You are right.  I meant to say Tomcat 7

On Wed, Sep 21, 2011 at 2:18 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Narahari 'n' Savitha [mailto:savithari@gmail.com]
> > Subject: Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not
> working
>
> > Tomcat7 can handle Servlet3 based classes.
>
> But Tomcat 6 can't, so perhaps you should retry using Tomcat 7.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Narahari 'n' Savitha [mailto:savithari@gmail.com] 
> Subject: Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

> Tomcat7 can handle Servlet3 based classes.

But Tomcat 6 can't, so perhaps you should retry using Tomcat 7.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Posted by Narahari 'n' Savitha <sa...@gmail.com>.
Thank You Chris for your time and help.

I understand that I need WebServices Engine like AXIS2 or METRO or Apache
CXF.

Here is the deal.

Websphere7 uses AXIS2 as the WebServices engine.

I have my Webservices class with Annotation of @WebService.   This is then
compiled to WEB-INF\classes folder.  Then the war is built.  Remember uptil
this point I have not made any web.xml changes.

Then I deploy the war file (using ear) to a Websphere7 installation.  Once
the deployment of war happens, something inside of AXIS2 is processing all
the annotation based classes and dynamically generating the web.xml and
processing the WebServices.

What is the equivalent of that in Tomcat7.  Tomcat7 can handle Servlet3
based classes.   So I thought it should have the mechanism to process
Annotated Webservices as well.

-Narahari

On Wed, Sep 21, 2011 at 9:53 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Narahari,
>
> On 9/20/2011 11:15 PM, Narahari 'n' Savitha wrote:
> > 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.
>
> Tomcat only implements the servlet specification, so if you want to
> deploy web services, you're going to have to find a way to get that
> going using a helper library -- like Axis.
>
> > However when I deploy that war file to Tomcat 6.0.32 and then copy
> > the axis2 jars to the WEB-INF\lib folder.
>
> Axis needs a servlet to be mapped in order to serve requests to your
> web services.
>
> > 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 ?
>
> Websphere is a J2EE application server while Tomcat is a servlet
> container "only". Maybe you want to look into using JBoss or Apache
> Geronimo if you need more than servlet-based services.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk557EwACgkQ9CaO5/Lv0PAIZwCeL2Gv2db8XdIoUV8xJdDSKG7T
> tx4AoLcoVshb2HK4gXlVtX4TMF+mmSMy
> =CsWK
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: websphere 7.0 JAXWS webservice deployed in tomcat 6.0.32 not working

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Narahari,

On 9/20/2011 11:15 PM, Narahari 'n' Savitha wrote:
> 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.

Tomcat only implements the servlet specification, so if you want to
deploy web services, you're going to have to find a way to get that
going using a helper library -- like Axis.

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

Axis needs a servlet to be mapped in order to serve requests to your
web services.

> 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 ?

Websphere is a J2EE application server while Tomcat is a servlet
container "only". Maybe you want to look into using JBoss or Apache
Geronimo if you need more than servlet-based services.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk557EwACgkQ9CaO5/Lv0PAIZwCeL2Gv2db8XdIoUV8xJdDSKG7T
tx4AoLcoVshb2HK4gXlVtX4TMF+mmSMy
=CsWK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org