You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2013/12/13 15:31:07 UTC

[jira] [Commented] (CXF-5457) Provide access to BindingProvider in case of using Blueprint proxy injection

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

Daniel Kulp commented on CXF-5457:
----------------------------------

Either way, this would require some support from the blueprint implementation.   The injected proxy's "Handler" object would be blueprint implementation specific and we'd have to somehow dig into that to determine the service reference, then from there, re-look up the service object somehow, then dig into there to get the CXF handler.   None of that would be easy at all.

I think the best "starting" point would be to change the service definition to:
{code:xml}
 <service ref="crmClient">
    <interfaces>
       <value>org.talend.services.crmservice.CRMService</value>
       <value>javax.xml.ws.BindingProvider</value>
    </interfaces>
    <service-properties>
       <entry><key>type</key><value>org.talend.services.crmservice.CRMService</value></entry>
    </service-properties>
</service>   
{code}

that would get the proxy registered in the service registry under both interfaces.   It also adds a service property that would allow us to restrict which reference is retrieved if we do a lookup for BindingProvider.  Thus, you would need to inject two service references, one for the CRMService and another for the BindingProvider that goes with it, with the appropriate service-property restriction.

That said, I'd be OK with an enhancement to Aries blueprint that would add a custom namespaced set of attributes to the reference element to support additional interfaces for the references.   Would be Aries specific though.  Let me think more on that.

> Provide access to BindingProvider in case of using Blueprint proxy injection
> ----------------------------------------------------------------------------
>
>                 Key: CXF-5457
>                 URL: https://issues.apache.org/jira/browse/CXF-5457
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-WS Runtime
>    Affects Versions: 2.7.8
>            Reporter: Andrei Shakirin
>
> The issue is described in [ARIES-1140 | https://issues.apache.org/jira/browse/ARIES-1140].
> Problem is that in case if generated service interface is injected as jax-ws client proxy using Blueprint, this proxy object implements only business interface and not BindingProvider interface.
> Because of this it is necessary to implement custom code to propagate context values (for example using ThreadLocal) instead using of specified jax-ws way. Strongly saying, injected proxy is not jax-ws compatible, because spec requires to implement BindingProvider for all proxies:
> 4.2 javax.xml.ws.BindingProvider
> The BindingProvider interface represents a component that provides a protocol binding for use by clients, it is implemented by proxies and is extended by the Dispatch interface.
> From the other side, Blueprint spec requires that proxy implements one and only one interface declared in the service.
> Perhaps we can provide kind of proprietary API in CXF that retrieves BindingProvider for given proxy. Suggestions, ideas and comments are welcome. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)