axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kedar, Shahar" <>
Subject RE: [Axis2]How to deploy/undeploy service programmatically?
Date Mon, 28 Aug 2006 08:19:57 GMT

Hi Eran,

Is there any way of getting the Axis2 configuration without implementing
a service class or handler? The reason I'm asking is that according to
my understanding, both handlers and service implementations are only
invoked when sending a request to an already deployed service. But what
if I want to programmatically deploy\undeploy a web service without
invoking an already existing service?

Shahar Kedar
Software AG Israel

-----Original Message-----
From: Santoso Nugroho [] 
Sent: Monday, August 28, 2006 8:45 AM
Subject: Re: [Axis2]How to deploy/undeploy service programmatically?


Thanks for the answer, however how do I specify my wsdl so that axis2 
can use my wsdl instead of using the generated wsdl?



Eran Chinthaka wrote:
> Santoso Nugroho wrote:
>> Hi,
>> How to deploy a service programmatically given that I have the
>> class, services.xml and the WSDL?
>> The problem I have is that I must be able to create and deploy the
>> service during runtime and the information (i.e. service name and the
>> WSDL) only availables at runtime.
> AxisService myService =
> org.apache.axis2.util.Utils.createSimpleService(serviceName,
>                 new RawXMLINOutMessageReceiver(),
>                 MyService.class.getName(),
>                 operationName);
> // The above is to deploy a service with an IN-OUT operation. Change
> // message receiver accordingly.
> getConfigurationContext().getAxisConfiguration().addService(
>                 service);
> BTW, from where do you wanna do this? Inside a handler, service.
> If (insideHandler)
> 	// get access to the config context thru the message context
passed in
> else if (insideServiceImplClass)
>  	// get access to config context through the message context
passed in
> thru message context injection (refer or
> implement Service interface to your service class )
> -- Chinthaka

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message