Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Webservice client

 
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.
 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • 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.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic