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
[email protected]
http://dankulp.com/blog

Reply via email to