Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Different methods to create A webservice client

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone please help me out on how many different techniques are there to create web service Clients.As far as i know the below the below are the two techniques:-
1)Traditional wsimport approach.
2)Using Apache CXF with spring that is <jaxws:client> .

Please suggest me on other ways on how to create web service Client.


Help me out...

Thanks,
D.Srikanth
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most straightforward way is to use the implementation of JAX that is bundled with the JDK. That implementation supports most of the basic web service related functions. You need Apache CXF only if you need features not provided by the JDK implementation. The way I've done it is use the Maven Jaxws-plugin to generate the client stubs, and then use Spring's JaxWsPortProxyFactoryBean to create an instance of the client

Like this



You can inject this anywhere you want and call it. Apache CXF claims to have "better" spring integration, but I'm not sure what it adds wrt Spring integration. JaxWsPortProxyFactoryBean works well enough
 
srikanth darbha
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Lalwani,

I have one more query can we get the service provider stubs without using ws import,can i use the below to get the stubs,

<jaxws:client id="" serviceClass=" " address=" " />,

if i use the above there will be no need of ws-import i feel.

Kindly correct me if i am wrong.

Thanks,
D.Srikanth
 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that tag is provided by Apache CXF, and will work only when you use CXF
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic