wood burning stoves 2.0*
The moose likes Web Services and the fly likes Apache CXF generic client - JAX-WS or wsdl2java stubs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Apache CXF generic client - JAX-WS or wsdl2java stubs?" Watch "Apache CXF generic client - JAX-WS or wsdl2java stubs?" New topic
Author

Apache CXF generic client - JAX-WS or wsdl2java stubs?

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Dear friends,

I am developing an Apache CXF client code and I see there are two options,
1. JAX-WS client
2. wsdl2java stub related client

can anyone guide me which approach is better to make client generic?

I have wsdl file which I need to consume, but if tomorrow if new methods are added then
I have to re generate stub classes?

Does JAX-WS require stub classes too?

Thanks for any help.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
As far as I know, wsdl2java generates JAX-WS annotated code, so it will be much the same as using wsimport.
Both approaches will generate artifacts that are quite static, that is, if you for instance add an operation in the WSDL exposed by the service, then this operation will not be available in clients unless you re-generate the artifacts.
If you want to make a truly generic client, then you may want to consider using the SAAJ API to dynamically assemble SOAP messages. The question still remains to how your client is made aware about new functionality offered by the service. I am not only talking about, for instance, a new operation being available in the service, but how the client learns about the semantics of the operation.

To be able to better advise you, knowing more details about what you are trying to accomplish would be beneficial.
Best wishes!
Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Thanks Ivan,

I SAAJ client looks like we don't need to generate client side stubs... that's what I was looking for !!

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache CXF generic client - JAX-WS or wsdl2java stubs?
 
Similar Threads
how can i create java classes from given wsdl
call .net webservice from java
JAX Custom Exception Mapping to SOAP Fault
webservice which one is more used ?
Apache CXf stub class generation - JAXBElement datatype