cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: difference between jaxws client vs creating client using @WebService client
Date Wed, 01 Jun 2011 14:45:40 GMT
On Tuesday, May 31, 2011 1:08:45 PM Sonam Nepali wrote:
> Hi
> 
> What's the difference/advantages of using <jaxws:client> element or
> configuring a soap client programmatically using the @WebServiceClient
> annotated java stub from it's associated wsdl?

Using the generated Service object is generally a little less error prone as 
the QNames for the service/port are kind of baked in so matching it up with 
the WSDL generally works better.    However, creating the Service object 
requires downloading and processing the WSDL  a bit to pull the ports out of 
there.   Thus, there is a slight startup performance penalty to using the 
Service objects. 

The jaxws:client stuff really configures the JaxwsProxyFactoryBean directly 
and calls the create on it.   That's pretty much the same thing the Service 
does eventually, but it bypasses the extra startup cost.

HOWEVER, I *THINK* spring may hold onto the JaxwsProxyFactoryBean in the 
context along with the generated bean.  Thus, there may be a memory cost 
involved.  I'm not 100% sure on that.

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

Mime
View raw message