aspose file tools*
The moose likes Web Services and the fly likes Webservice client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice client" Watch "Webservice client" New topic
Author

Webservice client

Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
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

Joined: Feb 03, 2004
Posts: 576

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).




Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Raj Shan
Ranch Hand

Joined: Sep 04, 2006
Posts: 65
Thank You so much Naren.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Webservice client
 
Similar Threads
how to write a weblogic webservice client that run in jboss3.x box
Advice needed concerning the design of a webservice
Accessing webMethods webservice through static Java webservice client
Web service client, Time Out Issue
WebService Problem