Why are you creating a new configuration context?. Thats the fault. Take a
look at org.wso2.wsas.admin.service.AxisConfigAdmin in the admin module. It
takes the configContext as
AxisConfiguration axisConfiguration =
                MessageContext.getCurrentMessageContext()
                        .getConfigurationContext().getAxisConfiguration();

Thanks,
Keith.

On 11/7/07, neo qing <[EMAIL PROTECTED]> wrote:
>
>
> Hi Keith:
>             I read some sources of WSO2 WSAS and I find a class can help
> me,I write down like below:
>
> ConfigurationContext configContext=
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> ("C:\\wso2\\repository","C:\\wso2\\conf\\axis2.xml");
>   AxisService service=configContext.getAxisConfiguration
> ().getService("echo");
>   service.setActive(true);
>
> I run it with JUnit, the result is OK,but I return to the console,I find
> that the status of the service has not been changed!
> who can help me on this?
> thanks!
>
> ------------------------------
> Date: Tue, 6 Nov 2007 14:17:53 +0530
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: How control the service remotely
>
> WSO2 WSAS manages services via deployed admin services. Its an open source
> project so you can take a dip and have a look at it. Please have a look at
> the admin module cause thats what will interest you.
>
> You can see details of the project here http://wso2.org/projects/wsas/java
>
> And also access the source code there.
>
> Thanks,
> Keith.
>
> On 11/6/07, *neo qing* <[EMAIL PROTECTED]> wrote:
>
> Hi everyone:
>              I want to control the service that deployed in the servlet
> container with AXIS2, such as, list the services,stop,start the
> service,currently I take a unstable approache that I post a request like
> 'axis-admin/deactive' to the target server, mostly it is available but I do
> not think it is a good idea.
>              I have read the source of AXIS2, I find a class named "
> org.apache.axis2.transport.http.AdminAgent", it can manage the service,but
> it use a method like below
>
> ConfigurationContext  configContext =
> ConfigurationContextFactory.createConfigurationContext(new
> WarBasedAxisConfigurator(config));
>
> ………………
>
> AxisService service = 
> configContext.getAxisConfiguration().getServiceForActivation(
> serviceName);
>                 service.setActive(true);
>
> the variable 'config' is a instance of ServeletConfig
>
> but I do not want to bind the function to the container because I want to
> expose the function as a web service.
>
> the question is :How can I get the AxisConfiguration instance and not
> depend on the ServerletConfig?
>
> or you can give me another good idea about how to control the services
> remotely?
> thanks !
>
> Any reply is appreciation!
>
>  neo
>
> ------------------------------
> Discover the new Windows Vista Learn 
> more!<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>
>
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>
>
> ------------------------------
> Discover the new Windows Vista Learn 
> more!<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Reply via email to