axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alain Drolet" <>
Subject Needs help with ServiceLifeCycle
Date Wed, 01 Apr 2009 21:35:11 GMT
Hi Everyone

I work in a team that is creating a new web service using jax-ws.
Our SOAP interface is defined using a wsdl file.
We generate code from our wsdl using wsimport under maven.

Initial attempt failed at using the aar archive format, so we got 
success packaging our web service as a jar file.
This file is deployed in the WEB-INF/servicejars directory of axis2.
Axis2 1.4.1, runs inside tomcat 5.5. We are using Java 1.5.
These versions are dictated by the deployment environment.

The deployment under servicejars does not require a services.xml.

I did some searching and found out I could get initialization code 
called by specifying
a class that implement ServiceLifeCycle in the services.xml file.
(The LifeCycle interface does not seem adequate for our need)
Something like:
<service name="MyService" class="x.y.MyInitializer">...

Initial testing seems to indicate that the services.xml is ignored if 
the service is deployed in servicejars directory.
The entry class for our service is properly annotated with @WebService...

Is there a way to get x.y.MyInitializer called at deployment time, for a 
web service deployed in servicejars?

- - - - - -
Alternatively I'm currently trying to use the aar format and deploy 
under WEB-INF/services

I found a few things.
- The wsdl file that we specify in our service class implementation using:
 @WebService(...wsdlLocation = "META-INF/wsdl/myWSDL.wsdl"
 is ignored. I suspect that the wsdlLocation attribute is not used when 
deployed as a aar file.

- I renamed my wsdl file service.wsdl and moved it to META-INF/service.wsdl
 Now axis2 is reading it.
 I was surprised to see that the wsdl name was hard-coded, but a page 
found on the web indicated this constraint.

- My next fight is defining the messageReceivers in the services.xml
 I'm only starting to explore this area, I need to do more homework.
 What I know although is that when I made a small web service prototype 
and used axis2 wsdl2java,
 I ended up with files like xxxServiceMessageReceiverInOut that could be 
used as messageReceivers.
 wsimport does not generate these files.

Question 2:
Is there some predefined messageReceivers that I should use when 
deploying a jaxws-based web service?

Thank you for your help


Alain Drolet

View raw message