You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Auke Noppe (JIRA)" <ji...@apache.org> on 2010/02/17 10:59:28 UTC

[jira] Issue Comment Edited: (CXF-2674) @Resource not injecting WebServiceContext in jaxws intereceptor

    [ https://issues.apache.org/jira/browse/CXF-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834704#action_12834704 ] 

Auke Noppe edited comment on CXF-2674 at 2/17/10 9:58 AM:
----------------------------------------------------------

A small Eclipse testproject demonstrating the @resource injection that is not working.
the logging output is also attached.
I didn't attach any libs because of the upload-filesize.

      was (Author: anoppe):
    small Eclipse testproject demonstrating the @resource injection that is not working.
logging output also attached.
  
> @Resource not injecting WebServiceContext in jaxws intereceptor
> ---------------------------------------------------------------
>
>                 Key: CXF-2674
>                 URL: https://issues.apache.org/jira/browse/CXF-2674
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.5
>         Environment: tomcat 6.0.18, Spring 2.5, Spring Security 2.0.5, cxf-2.2.5 with wss4j-1.5.8
>            Reporter: Auke Noppe
>         Attachments: logging.log, webservicecontext_test.zip
>
>
> If you want to inject the WebServiceContext into a In/Out-Interceptor configured with xml (e.g. <jaxws:ininterceptors><bean id="someInterceptor" class="test.SomeInterceptor"/></jaxws:ininterceptors />) with the @resource annotation, the WebServiceContext is null. (Even with component-scan enabled and annotation-config defined)
> If you inject the WebServiceContext into the interceptor with a property-setter in the xml (e.g. <property name="ctx" value="javax.xml.ws.WebServiceContext" />) the instance is not empty, but holding nothing (like MessageContext )
> The documentation suggest the way with the @Resource annotation, so this is rather confusing.
> The work-around I found, is to set the properties I wanted to set on the message in the handleMessage method of the interceptor (e.g. message.put("someKey", someValue); )
> I would rather see the @Resource injection working.
> Regards,
> Auke Noppe
> Developer @ Ymor (.nl)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.