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.
Developer @ Ymor (.nl)
|Workflow||jira [ 12499040 ]||Default workflow, editable Closed status [ 12605371 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Assignee||Daniel Kulp [ dkulp ]|
|Fix Version/s||Invalid [ 12312706 ]|
|Resolution||Not A Problem [ 8 ]|
|Field||Original Value||New Value|
|Labels||IoC cxf interceptors resource spring|