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 Joerg Buchberger <li...@joerg-buchberger.de> on 2003/04/08 19:15:37 UTC

is accessing ServletContext from xxxSoapBindingImpl possible ?

Hi.

I use Java2WSDL and WSDL2Java to create WebServices out of
ordinary interfaces that define what the web service is
supposed to do. Thus I'm actually implementing my web
services in classes like FooSoapBindingImpl.

Now my web service needs access to an object that my
servlet engine can put as an attribute in the servlet
context of the axis-webapp. How can I do that?
Is there any way I can get a hold on the attributes of the
servletcontext from within my SoapBindingSkeleton or
SoapBindingImpl classes ?

Cheers.
Joerg


Re: is accessing ServletContext from xxxSoapBindingImpl possible ?

Posted by Joerg Buchberger <li...@joerg-buchberger.de>.
Done.

By creating a custom servlet that extends AxisServlet, I can put the object
(see first message below) from the ServletContext into the MessageContext.

I also have to create a custom provider that extends RPCProvider; there I have
to override makeNewServiceObject: get the object from MessageContext and put it
into my skeleton object before returning it.

I believe I also need to make a WSDDProvider (as factory) for my custom
provider.

Correct?

Cheers.
Joerg



Joerg Buchberger schrieb am 08.04.2003:
>Hi.
>
>I use Java2WSDL and WSDL2Java to create WebServices out of
>ordinary interfaces that define what the web service is
>supposed to do. Thus I'm actually implementing my web
>services in classes like FooSoapBindingImpl.
>
>Now my web service needs access to an object that my
>servlet engine can put as an attribute in the servlet
>context of the axis-webapp. How can I do that?
>Is there any way I can get a hold on the attributes of the
>servletcontext from within my SoapBindingSkeleton or
>SoapBindingImpl classes ?
>
>Cheers.
>Joerg
>