You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by EL ALAMI <el...@intalio.com> on 2007/11/11 03:08:51 UTC

[axis2]Accessing the AxisServlet or the AxisConfiguration from a web service

Hi everybody,

 

I need to write a webservice that returns the list of the services deployed
on the same axis2.

To do that, I need to access the AxisConfiguration somehow.

One way to do it, would be by having AxisServlet in which the webService is
deployed.

 

If this is possible, the code will be;

 

AxisServlet servlet=//This is what I am looking for, a way to have this
instance

AxisConfiguration config=servlet.configContext;

Map ListOfServices=config.getServices();

 

Since the webService is executed in the context of the AxisServlet, then it
should be possible that he access the 

Does any body know how to do that?

If you have any other way to get the services list or the AxisConfiguration
instance, I would be thankful..

 

Any help is appreciated,

Thanks

 


Re: [axis2]Accessing the AxisServlet or the AxisConfiguration from a web service

Posted by Deepal jayasinghe <de...@gmail.com>.
> Hi everybody,
>
>  
>
> I need to write a webservice that returns the list of the services
> deployed on the same axis2.
>
> To do that, I need to access the AxisConfiguration somehow.
>
> One way to do it, would be by having AxisServlet in which the
> webService is deployed.
>
You can easily do that by using the following code in side your service
class.

public Class MyService {
 
 public list getServiceList(){
    MessageContext msgCtx = MessageContext.getCurrentMessageContext();
AxisConfiguration axisConfig =
msgCtx.getConfigurationContext().getAxisConfiguration();
 }
}

Once you have the AxisConfiguration you can do whatever you want to do.

In the meantime have a look at WSO2 WSAS [1]  , and the SVN [2], it has
implemented this and some more cool stuff , which you will need in the
future.

[1] : http://wso2.org/projects/wsas/java
[2] : https://wso2.org/repos/wso2/trunk/wsas/java
Thanks
Deepal
>
>  
>
> If this is possible, the code will be;
>
>  
>
> AxisServlet servlet=//This is what I am looking for, a way to have
> this instance
>
> AxisConfiguration config=servlet.configContext;
>
> Map ListOfServices=config.getServices();
>
>  
>
> Since the webService is executed in the context of the AxisServlet,
> then it should be possible that he access the
>
> Does any body know how to do that?
>
> If you have any other way to get the services list or the
> AxisConfiguration instance, I would be thankful..
>
>  
>
> Any help is appreciated,
>
> Thanks
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [axis2]Accessing the AxisServlet or the AxisConfiguration from a web service

Posted by keith chapman <ke...@gmail.com>.
The thread found here <http://wso2.org/forum/thread/2785> on wso2.org should
provide you with the answer.

Thanks,
Keith.

On Nov 11, 2007 7:38 AM, EL ALAMI <el...@intalio.com> wrote:
>
>
>
>
> Hi everybody,
>
>
>
> I need to write a webservice that returns the list of the services
deployed
> on the same axis2.
>
> To do that, I need to access the AxisConfiguration somehow.
>
> One way to do it, would be by having AxisServlet in which the webService
is
> deployed.
>
>
>
> If this is possible, the code will be;
>
>
>
> AxisServlet servlet=//This is what I am looking for, a way to have this
> instance
>
> AxisConfiguration config=servlet.configContext;
>
> Map ListOfServices=config.getServices();
>
>
>
> Since the webService is executed in the context of the AxisServlet, then
it
> should be possible that he access the
>
> Does any body know how to do that?
>
> If you have any other way to get the services list or the
AxisConfiguration
> instance, I would be thankful..
>
>
>
> Any help is appreciated,
>
> Thanks
>
>



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