tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From COURTAULT Francois <Francois.Courta...@gemalto.com>
Subject RE: Injecting WebserviceContext returns null
Date Thu, 23 Nov 2017 15:25:55 GMT
Romain,

My interceptor is linked to an annotation and is declared in the beans.xml  in order to work
so I guess it is a cdi interceptor and, according to what you have said, a new proxy is created
and so the injection is not done on the right proxy, right ?
But, in this case,  is it a bug ?

The other solution is to use @Interceptor or @Interceptors annotations but we lose the beauty
of using an annotation for interceptor, right ?

Best Regards.

-----Original Message-----
From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
Sent: jeudi 23 novembre 2017 15:57
To: users@tomee.apache.org
Subject: Re: Injecting WebserviceContext returns null

annotation = cdi interceptor? if so it leads to a proxy and the injection happens on the wrong
instance I think

Romain Manni-Bucau
@rmannibucau |  Blog | Old Blog | Github | LinkedIn


2017-11-23 15:50 GMT+01:00 COURTAULT Francois <Francois.Courtault@gemalto.com>:
> Hello Romain,
>
> I think I have found the issue.
> In fact, we used a custom annotation for a logging interceptor which targets METHOD and
TYPE.
>
> If we remove this annotation  on our WS endpoint (eg TYPE target) , then the injection
is resolved.
>
> Do you know why we have this side effect  ? Is it a bug ?
> I have a  test case if you want.
>
> Best Regards.
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: jeudi 23 novembre 2017 14:25
> To: users@tomee.apache.org
> Subject: Re: Injecting WebserviceContext returns null
>
> Looks close to
> https://github.com/apache/tomee/blob/master/server/openejb-cxf/src/tes
> t/java/org/apache/openejb/server/cxf/PojoWebServiceContextTest.java
> , what can be the difference?
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>
>
> 2017-11-23 13:49 GMT+01:00 COURTAULT Francois <Francois.Courtault@gemalto.com>:
>> Hello,
>>
>> No it's not an EJB webservice, just a POJO webservice annotated with @WebService(name
= "MyManager", targetNamespace = "http://xxx.yyy.test..com/", serviceName = "MyManager", wsdlLocation
=  "wsdl/MyManager.wsdl") like in the sample of my first email.
>> It looks quite similar to the sample provided in the JAX-WS 2.3 specification (maintenance
release 5), page 82, §5.3 (javax.xml.ws.WebServiceContext)  except that the annotation, in
our development,  uses  attributes like name, ...
>>
>> Best Regards.
>>
>> -----Original Message-----
>> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>> Sent: jeudi 23 novembre 2017 13:34
>> To: users@tomee.apache.org
>> Subject: Re: Injecting WebserviceContext returns null
>>
>> Hi François,
>>
>> did you test with an EJB webservice?
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>>
>>
>> 2017-11-23 12:11 GMT+01:00 COURTAULT Francois <Francois.Courtault@gemalto.com>:
>>> Hello,
>>>
>>> I have the following :
>>>
>>> @WebService(name = "MyManager", targetNamespace =
>>> "http://xxx.yyy.test..com/", serviceName = "MyManager", wsdlLocation
>>> =
>>> "wsdl/MyManager.wsdl") public class MyManagerService implements
>>> MyManager {
>>>
>>>     @Resource
>>>     WebServiceContext webServiceContext; ....
>>> }
>>>
>>> And the webServiceContet is always null ! Any clue ?
>>>
>>> Best Regards.
>>> ________________________________
>>> This message and any attachments are intended solely for the addressees and may
contain confidential information. Any unauthorized use or disclosure, either whole or partial,
is prohibited.
>>> E-mails are susceptible to alteration. Our company shall not be liable for the
message if altered, changed or falsified. If you are not the intended recipient of this message,
please delete it and notify the sender.
>>> Although all reasonable efforts have been made to keep this transmission free
from viruses, the sender will not be liable for damages caused by a transmitted virus.
>> ________________________________
>>  This message and any attachments are intended solely for the addressees and may
contain confidential information. Any unauthorized use or disclosure, either whole or partial,
is prohibited.
>> E-mails are susceptible to alteration. Our company shall not be liable for the message
if altered, changed or falsified. If you are not the intended recipient of this message, please
delete it and notify the sender.
>> Although all reasonable efforts have been made to keep this transmission free from
viruses, the sender will not be liable for damages caused by a transmitted virus.
> ________________________________
>  This message and any attachments are intended solely for the addressees and may contain
confidential information. Any unauthorized use or disclosure, either whole or partial, is
prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for the message
if altered, changed or falsified. If you are not the intended recipient of this message, please
delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free from viruses,
the sender will not be liable for damages caused by a transmitted virus.
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential
information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if
altered, changed or falsified. If you are not the intended recipient of this message, please
delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses,
the sender will not be liable for damages caused by a transmitted virus.
Mime
View raw message