You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by fachhoch <fa...@gmail.com> on 2010/03/25 13:40:09 UTC

spring cxf client

CXF documentation tells  client creation

<jaxws:client id="findGrantsClient"
serviceClass="service.GrantsSearchService" 
address="http://mycompany:7001/artms/cxf/findGrants">	</jaxws:client>	
and 

 cxf samples 

shows



    <bean id="client" class="demo.spring.HelloWorld" 
      factory-bean="clientFactory" factory-method="create"/>
    
	<bean id="clientFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
	  <property name="serviceClass" value="demo.spring.HelloWorld"/>
	  <property name="address" value="http://localhost:9002/HelloWorld"/>
	</bean>
	  

which one should I follow and I will use this client in my  web application
so   are they thread safe ?

and can I set the address property at runtime ?


-- 
View this message in context: http://old.nabble.com/spring-cxf-client-tp28028273p28028273.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: spring cxf client

Posted by Daniel Kulp <dk...@apache.org>.
The two are pretty much equivalent.  The jaxws:client thing is just a 
namespace handler that configures a JaxWsProxyFactoryBean in pretty much the 
same way as the second form you have.    The advantage of the jaxws:client is 
that some parts of it can be schema validated at parse time and such and is 
generally a bit more self describing.   Either should work.

See 
http://cxf.apache.org/faq.html
for the second question.

Dan


On Thursday 25 March 2010 8:40:09 am fachhoch wrote:
> CXF documentation tells  client creation
> 
> <jaxws:client id="findGrantsClient"
> serviceClass="service.GrantsSearchService"
> address="http://mycompany:7001/artms/cxf/findGrants">	</jaxws:client>
> and
> 
>  cxf samples
> 
> shows
> 
> 
> 
>     <bean id="client" class="demo.spring.HelloWorld"
>       factory-bean="clientFactory" factory-method="create"/>
> 
> 	<bean id="clientFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> 	  <property name="serviceClass" value="demo.spring.HelloWorld"/>
> 	  <property name="address" value="http://localhost:9002/HelloWorld"/>
> 	</bean>
> 
> 
> which one should I follow and I will use this client in my  web application
> so   are they thread safe ?
> 
> and can I set the address property at runtime ?

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog