You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Glen Mazza <gl...@verizon.net> on 2008/05/07 16:34:09 UTC

Configuring clients using Spring and JaxWsProxyFactoryBean

Hello, I have a question about configuring CXF SOAP Clients using
Spring[1].  

Lumidant's Blog[2] had an example of this when he was configuring
WS-Security on the service and client.  At the very end of his blog
entry he created an AuthServiceFactory that generated the SOAP client
based on information in the Spring config file.  My question is how did
CXF know to go to the AuthServiceFactory class in particular to generate
the SOAP client?  The JaxWsProxyFactoryBean configuration in the Spring
file does not mention the AuthServiceFactory:

<bean id="proxyFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
    <property name="serviceClass"
value="com.company.auth.service.AuthService"/>
    <property name="address"
value="http://localhost:7001/authManager/services/corporateAuth"/>
    ...
</bean>

Is it the case that CXF automatically knows to add "Factory" to the end
of the declared serviceClass above in order to determine that
AuthServiceFactory is the class for generating SOAPClients?  Or, is
there some other configuration that ties this proxyFactory to
AuthServiceFactory that the blogger had possibly forgotten to include?

Thanks,
Glen

[1]
http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html#JAX-WSConfiguration-ConfiguringaClientProxy

[2]
http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/