• 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

What is the difference between static and dynamic clients of Webservices?

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I was under an impression that static clients need portable artifacts generated by wsimport, in order to communicate with webservices. Since these artifacts are generated upfront, these may be static and Dynamic clients does not require any artifacts to be generated for communicating. It makes use of Dispatch<Object> for dynamically calling the service. Is my understanding correct? Please clarify and correct my understanding.


Also, please confirm, if the below steps are correct in generating the client application, if the service is written by implementing Provider<T> interface.

Static Client
1) From wsdl, generate the required artifacts
2) Say, the service class is StringProcessorService, then
StringProcessorService service=new StringProcessorService();
StringProcessorServicePort port=service.getStringProcesorServicePort();
3) Now since my actual service implementation does not have any method which is exposed and instead having "invoke" method, I took the help of classes generated by XJC tool and did some thing like below




 
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!

Kumar Raja wrote:I was under an impression that static clients need portable artifacts generated by wsimport, in order to communicate with webservices. Since these artifacts are generated upfront, these may be static and Dynamic clients does not require any artifacts to be generated for communicating. It makes use of Dispatch<Object> for dynamically calling the service. Is my understanding correct?


This is correct!

Also, please confirm, if the below steps are correct in generating the client application, if the service is written by implementing Provider<T> interface.


The steps for generating a client application are the same, regardless of whether the service is written to implement the Provider<T> interface.
After all, it still publishes a WSDL, so clients should not know, or care, about the implementation details "behind the scenes".
Best wishes!
 
reply
    Bookmark Topic Watch Topic
  • New Topic