Riccardo Cohen wrote:
> Did you found a "magic" way to have webservicecontext in this case ? :)
Somewhat. I'm adding a WebServiceContextProxy with a ThreadLocal that
grabs the WebServiceContext associated with the servlet.
CXF itself has a WebServiceContextImpl that has its own ThreadLocal, so
we're going to have a ThreadLocal pointing to a second ThreadLocal :)
> Thanks a lot.
> -------- Original Message --------
> Subject: Re: [Resin-interest] getting webservicecontext in a cxf soap
> Date: Thu, 12 Aug 2010 12:12:53 +0200
> From: Riccardo Cohen <r...@architectedulogiciel.fr>
> Reply-To: General Discussion for the Resin application server
> Organization: Architecte du Logiciel
> To: General Discussion for the Resin application server
> References: <4c62a51c.5030...@architectedulogiciel.fr>
> I did as described in the CXF wiki (http://wiki.caucho.com/CXF), except
> that I ran the code generator (wsdl2java) tool to start from an existing
> wsdl. Here is the config:
> <servlet-mapping url-pattern="/CarteMusique/*"
> <protocol uri="cxf:"/>
> Here is the full code of a small sample :
> Scott Ferguson wrote:
>> Riccardo Cohen wrote:
>>> I successfully wrote a soap web service with cxf (in resin 4.0.9) and I
>>> need to check the IP of the caller. I need the servlet context, and
>>> found some thread about this.
>>> I tried to add :
>>> @Resource public WebServiceContext wscontext;
>>> in the servlet, but have the error message :
>>> ms.CarteMusiqueWSAction.wscontext @Resource cannot find any matching
>>> resources with type='interface javax.xml.ws.WebServiceContext' in
>>> I suppose that something is missing but what ?
>> How are you configuring the service in Resin?
>> It looks like we'll need to do a little bit of magic to make it work,
>> but I need to make sure I'm looking at it the same way you're using it.
>> -- Scott
>>> Thanks for any suggestion.
>> resin-interest mailing list
resin-interest mailing list