Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • 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




 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic