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

Webservice client

 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

As I am new to webservice, can someone tell me what are the various ways to access webservice. I would like to write a client to access the methods in the webservice.

Also, Can you please let me know when should we go for JNDI and when should we go for invocation thro' stub?

Thanks and Regards,
Geetha.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj,
can someone tell me what are the various ways to access webservice

There are mainly three ways to call a web service.
1. Generated Stubs:
This is the most commonly used method You generate stubs of your web service by using WSDL2Java tool and make calls on client side stub classes. The stub classes abstract underlying web service invocation mechanism like Marshalling, Serializing and Endpoint Invocation.

2. Dynamic Proxies:
These are created dynamically at runtime rather than generated statically at deployment time. These are not used much unless I think if WSDL is very dynamic!

3. DII (Dynamic Invocation Interface):
It provides an API to invoke web service calls dynamically like above but without using any proxies.

Can you please let me know when should we go for JNDI and when should we go for invocation thro' stub?

When you say JNDI, I presume it's for looking up for javax.xml.rpc.Service (if Generated Stubs, implementing class). Irrespective of which way you use call web service, JNDI is used to look-up the Service object except if using in non-J2EE environments (like standalone clients).



 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You so much Naren.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic