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