[
https://issues.apache.org/jira/browse/CXF-3723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082100#comment-13082100
]
Xilai Dai commented on CXF-3723:
--------------------------------
if any Bean which has a ref property to jaxws:client, then clientCreated()
works well;
if you comment:
<bean id="greeterTest"
class="org.talend.runtime.testlifecycle.GreeterTest">
<property name="greeter" ref="test_client"/>
</bean>
then clientCreated() will not be got invoked.
For a war application which deployed into Tomcat, we can add this wrapped bean
in the beans.xml; but for a OSGI application, like this:
<jaxws:client id="CRMServiceClient">
...
</jaxws:client>
<osgi:service ref="CRMServiceClient"
interface="org.talend.services.crmservice.CRMService"/>
jaxws:client will be init as a osgi service, then if added a wrapped bean:
<bean id="crmTest" class="....GreeterTest">
<property name="crmClient" ref="CRMServiceClient"/>
</bean>
the clientCreated() will not be got invoked.
> clientCreated() of ClientLifeCycleListener can't be invoked on Spring created
> clients
> -------------------------------------------------------------------------------------
>
> Key: CXF-3723
> URL: https://issues.apache.org/jira/browse/CXF-3723
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.5
> Reporter: Xilai Dai
> Labels: ClientLifeCycleListener
> Fix For: NeedMoreInfo
>
> Attachments: testlifecycle.zip
>
>
> when create client with spring bean like this:
> <jaxws:client id="test_client"
> address="http://localhost:8080/testlifecycle/services/GreeterService"
> serviceClass="org.talend.esb.examples.sam.lifecycle.Greeter">
> </jaxws:client>
> clientCreated() of ClientLifeCycleListener can't be invoked;
> if using java codes:
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> factory.setServiceClass(org.talend.esb.examples.sam.lifecycle.Greeter.class);
> factory.setAddress("http://localhost:8080/testlifecycle/services/GreeterService");
> client = (Greeter)factory.create();
> ...
> clientCreated() of ClientLifeCycleListener has been invokded successful!
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira