permaculture playing cards*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes What is the difference between static and dynamic clients of Webservices? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "What is the difference between static and dynamic clients of Webservices?" Watch "What is the difference between static and dynamic clients of Webservices?" New topic
Author

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

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

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






Regards
KumarRaja

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between static and dynamic clients of Webservices?