You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by James Carman <ja...@carmanconsulting.com> on 2003/01/02 20:07:41 UTC

Packaging Axis...

I would like to package the AxisServlet in my webapp along with other pieces
of my distributed application (Java WebStart servlet, etc.).  How do I "war
up" my files so that when I place my WAR file in the webapps directory of a
server, it will already have my service deployed?  I've tried supplying my
own /WEB-INF/server-config.wsdd file containing only my service, but that
didn't seem to work.  When I tried to view the WSDL file, it returned a 404
error.  I don't want to have to run the AdminClient.  I want this thing to
work "out of the box."  Any thoughts/ideas?

James Carman, President
Carman Consulting, Inc.
1218 Bob White Ct.
Edgewood, KY 41018
(513) 325-7977

Re: Packaging Axis...

Posted by James Carman <ja...@carmanconsulting.com>.
Maybe there should be a standardized web services deployment file rather
than muddying up the servlet specification with web services-specific
information.

----- Original Message -----
From: "Steve Loughran" <st...@iseran.com>
To: <ax...@xml.apache.org>
Sent: Friday, January 03, 2003 1:04 PM
Subject: Re: Packaging Axis...


>
> ----- Original Message -----
> From: "Gene Chuang" <ge...@yahoo.com>
> To: <ax...@xml.apache.org>
> Sent: Thursday, January 02, 2003 23:34
> Subject: Re: Packaging Axis...
>
>
> >
> > I will eventually be packing axis in my webapp as well for
> transportability across servlet containers, so thanks for the pointers!
>
> > This does bring up an issue that perhaps has been addressed on this
board
> before: I'm assuming that most J2EE vendor implementation of Web services
is
> done using the Servlet container as a "host", I'm wondering if there are
> talks or actions to integrate Java Web Services into the Web-app specs so
> that:
>
> > 1)  a Web service can be deployed in web.xml just like a Servlet
>
> That would need changes to the servlet specs. Better to have a standard
> cross-implementation XML file for declaring soap services; web.xml is not
> the be-all and and end-all of XML declarations in an war file; all the
> struts stuff is separate for one, taglibs are (partly) another example.
>
> > 2)  architectures like Axis that use chain of Handlers can reimplement
> this as Servlet Filters
>
> they are similar, but different. That is, they are both a chain, but with
> different messages coming in. Also servlet filters are tied to http, and
> SOAP isnt.
>
> > 3)  Web service impl classes can be hot-redeployed like Servlets
>
> 1. Axis handles hot redeployed .jws files, I think, on a par with .jsp
>
> 2. I have never had a good experience with in-situ updates of live code in
a
> war; it is always safer to restart the webapp.
>
> > Perhaps an intermediate step (since getting JCP specs to change takes
> time) would be for Tomcat to adopt Axis and ship it under one OOB package.
> This would still require vendor-specific deployment process, but at least
> its better than what it is right now, which is also vendor-specific but
> difficult to integrate OOB.
>
> This needs much more version sync than anyone is ready for. But if you
want
> to work on it, feel free. Tomcat 5.0 is likely to have some SOAP support.
>
>
>
>
>


Re: Packaging Axis...

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Gene Chuang" <ge...@yahoo.com>
To: <ax...@xml.apache.org>
Sent: Thursday, January 02, 2003 23:34
Subject: Re: Packaging Axis...


>
> I will eventually be packing axis in my webapp as well for
transportability across servlet containers, so thanks for the pointers!

> This does bring up an issue that perhaps has been addressed on this board
before: I'm assuming that most J2EE vendor implementation of Web services is
done using the Servlet container as a "host", I'm wondering if there are
talks or actions to integrate Java Web Services into the Web-app specs so
that:

> 1)  a Web service can be deployed in web.xml just like a Servlet

That would need changes to the servlet specs. Better to have a standard
cross-implementation XML file for declaring soap services; web.xml is not
the be-all and and end-all of XML declarations in an war file; all the
struts stuff is separate for one, taglibs are (partly) another example.

> 2)  architectures like Axis that use chain of Handlers can reimplement
this as Servlet Filters

they are similar, but different. That is, they are both a chain, but with
different messages coming in. Also servlet filters are tied to http, and
SOAP isnt.

> 3)  Web service impl classes can be hot-redeployed like Servlets

1. Axis handles hot redeployed .jws files, I think, on a par with .jsp

2. I have never had a good experience with in-situ updates of live code in a
war; it is always safer to restart the webapp.

> Perhaps an intermediate step (since getting JCP specs to change takes
time) would be for Tomcat to adopt Axis and ship it under one OOB package.
This would still require vendor-specific deployment process, but at least
its better than what it is right now, which is also vendor-specific but
difficult to integrate OOB.

This needs much more version sync than anyone is ready for. But if you want
to work on it, feel free. Tomcat 5.0 is likely to have some SOAP support.



Re: Packaging Axis...

Posted by James Carman <ja...@carmanconsulting.com>.
I finally got my implementation working.  What I did, since I wasn't familiar with the server-config.wsdd file, was to deploy my web service using the axis webapp.  Then, I took a copy of its server-config.wsdd file and ripped out the stuff I didn't want, like the admin service.  I used that in my webapp with the AxisServlet defined in my web.xml file and presto!  It worked like a charm.  There were some other constructs in the server-config.wsdd file that I neglected to set up (ignorace is bliss).  As far as using an initialization servlet, let's remember that the servlet specification has changed so that we no longer need initialization servlets.  We can use javax.servlet.ServletContextListeners (I think that's the name of the interface) to initialize our web applications.  No more forgetting to put the load-on-startup element in our web.xml file.  That's the preferred method of web application initialization now.
  ----- Original Message ----- 
  From: Gene Chuang 
  To: axis-user@xml.apache.org 
  Sent: Friday, January 03, 2003 2:34 AM
  Subject: Re: Packaging Axis...


  I will eventually be packing axis in my webapp as well for transportability across servlet containers, so thanks for the pointers! 

  This does bring up an issue that perhaps has been addressed on this board before: I'm assuming that most J2EE vendor implementation of Web services is done using the Servlet container as a "host", I'm wondering if there are talks or actions to integrate Java Web Services into the Web-app specs so that: 

  1)  a Web service can be deployed in web.xml just like a Servlet
  2)  architectures like Axis that use chain of Handlers can reimplement this as Servlet Filters
  3)  Web service impl classes can be hot-redeployed like Servlets 

  Perhaps an intermediate step (since getting JCP specs to change takes time) would be for Tomcat to adopt Axis and ship it under one OOB package.  This would still require vendor-specific deployment process, but at least its better than what it is right now, which is also vendor-specific but difficult to integrate OOB.  

  Gene 

   Mir Shafiqul Islam <mi...@mindspring.com> wrote: 

    All you would need to is have axis.jar and other axis related jar files 
    in your WEB-INF/lib directory before "war"ing your web application. In 
    the web.xml file you need to define what the service location will be 
    and add proper entry for the servlet. You can take al the entries in 
    web.xml file which was shipped with the axis distribution and add those 
    in your own web.xml file.

    Also if you want axis to automatically deploy your service when the war 
    is deployed, then you need to do the following:
    1) Create your own Initialization servlet which will use the 
    AdminServlet to do the deployment
    2) Supply the deploy.wsdd file in the war file or put it in a location 
    that your servlet can read from.
    3) put entries in the web.xml file so that your init servlet gets 
    initialized at the deploy time.

    Here is a sample entry for init servlet in web.xml

    initServlet
    Initialize Servlet

    com.earthlink.pfe.servlets.InitializationServlet
    1


    not sure if it clears up for you, you may need to readup a bit on the 
    user guide as well and experiement before things will start to work.

    Mir

    James Carman wrote:

    >I would like to package the AxisServlet in my webapp along with other pieces
    >of my distributed application (Java WebStart servlet, etc.). How do I "war
    >up" my files so that when I place my WAR file in the webapps directory of a
    >server, it will already have my service deployed? I've tried supplying my
    >own /WEB-INF/server-config.wsdd file containing only my service, but that
    >didn't seem to work. When I tried to view the WSDL file, it returned a 404
    >error. I don't want to have to run the AdminClient. I want this thing to
    >work "out of the box." Any thoughts/ideas?
    >
    >James Carman, President
    >Carman Consulting, Inc.
    >1218 Bob White Ct.
    >Edgewood, KY 41018
    >(513) 325-7977
    > 
    >


Re: Packaging Axis...

Posted by Gene Chuang <ge...@yahoo.com>.
I will eventually be packing axis in my webapp as well for transportability across servlet containers, so thanks for the pointers!
This does bring up an issue that perhaps has been addressed on this board before: I'm assuming that most J2EE vendor implementation of Web services is done using the Servlet container as a "host", I'm wondering if there are talks or actions to integrate Java Web Services into the Web-app specs so that:
1)  a Web service can be deployed in web.xml just like a Servlet
2)  architectures like Axis that use chain of Handlers can reimplement this as Servlet Filters
3)  Web service impl classes can be hot-redeployed like Servlets
Perhaps an intermediate step (since getting JCP specs to change takes time) would be for Tomcat to adopt Axis and ship it under one OOB package.  This would still require vendor-specific deployment process, but at least its better than what it is right now, which is also vendor-specific but difficult to integrate OOB.  
Gene
 Mir Shafiqul Islam <mi...@mindspring.com> wrote:All you would need to is have axis.jar and other axis related jar files 
in your WEB-INF/lib directory before "war"ing your web application. In 
the web.xml file you need to define what the service location will be 
and add proper entry for the servlet. You can take al the entries in 
web.xml file which was shipped with the axis distribution and add those 
in your own web.xml file.

Also if you want axis to automatically deploy your service when the war 
is deployed, then you need to do the following:
1) Create your own Initialization servlet which will use the 
AdminServlet to do the deployment
2) Supply the deploy.wsdd file in the war file or put it in a location 
that your servlet can read from.
3) put entries in the web.xml file so that your init servlet gets 
initialized at the deploy time.

Here is a sample entry for init servlet in web.xml

initServlet
Initialize Servlet

com.earthlink.pfe.servlets.InitializationServlet
1


not sure if it clears up for you, you may need to readup a bit on the 
user guide as well and experiement before things will start to work.

Mir

James Carman wrote:

>I would like to package the AxisServlet in my webapp along with other pieces
>of my distributed application (Java WebStart servlet, etc.). How do I "war
>up" my files so that when I place my WAR file in the webapps directory of a
>server, it will already have my service deployed? I've tried supplying my
>own /WEB-INF/server-config.wsdd file containing only my service, but that
>didn't seem to work. When I tried to view the WSDL file, it returned a 404
>error. I don't want to have to run the AdminClient. I want this thing to
>work "out of the box." Any thoughts/ideas?
>
>James Carman, President
>Carman Consulting, Inc.
>1218 Bob White Ct.
>Edgewood, KY 41018
>(513) 325-7977
> 
>

Re: Packaging Axis...

Posted by Mir Shafiqul Islam <mi...@mindspring.com>.
All you would need to is have axis.jar and other axis related jar files 
in your WEB-INF/lib directory before "war"ing your web application. In 
the web.xml file you need to define what the service location will be 
and add proper entry for the servlet. You can take al the entries in 
web.xml file which was shipped with the axis distribution and add those 
in your own web.xml file.

Also if you want axis to automatically deploy your service when the war 
is deployed, then you need to do the following:
1) Create your own Initialization servlet which will use the 
AdminServlet to do the deployment
2) Supply the deploy.wsdd file in the war file or put it in a location 
that your servlet can read from.
3) put entries in the web.xml file so that your init servlet gets 
initialized at the deploy time.

Here is a sample entry for init servlet in web.xml
<servlet>
       <servlet-name>initServlet</servlet-name>
       <display-name>Initialize Servlet</display-name>
       
<servlet-class>com.earthlink.pfe.servlets.InitializationServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
    </servlet>

not sure if it clears up for you, you may need to readup a bit on the 
user guide as well and experiement before things will start to work.

Mir

James Carman wrote:

>I would like to package the AxisServlet in my webapp along with other pieces
>of my distributed application (Java WebStart servlet, etc.).  How do I "war
>up" my files so that when I place my WAR file in the webapps directory of a
>server, it will already have my service deployed?  I've tried supplying my
>own /WEB-INF/server-config.wsdd file containing only my service, but that
>didn't seem to work.  When I tried to view the WSDL file, it returned a 404
>error.  I don't want to have to run the AdminClient.  I want this thing to
>work "out of the box."  Any thoughts/ideas?
>
>James Carman, President
>Carman Consulting, Inc.
>1218 Bob White Ct.
>Edgewood, KY 41018
>(513) 325-7977
>  
>