• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ivan,

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

 
reply
    Bookmark Topic Watch Topic
  • New Topic