• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

funtamental of web services

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

I am using web services in my project since last 6 months.I am using eclipse wtp(Web Tool Platform) to develop web services which uses apche axis to create and call web services.

I have very little knowlege on how to write wsdl and how to call webservices from different context(like from jsp,servlet) and how to pass parameters.

Now I want to know all these things.i.e internally how all these works,what should I do ?

Any help will be highly apreciatied.

Thanks
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well the clinet for web service can be anything... it can be a pojo, jsp, servlet or an ejb, it really doesnt matter

Look at the following code snippet for a WS client
--------------------------------------------------
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service service = serviceFactory.createService(serviceQName);
Call call = service.createCall();
call.setOperationName(operationQName);
call.setTargetEndpointAddress(location);
call.addParameter("symbol", stringQName, ParameterMode.IN);
call.addParameter("currency", stringQName, ParameterMode.IN);
call.setReturnType(doubleQName);
Double result = (Double) call.invoke(new Object[]{"usa", "india"});


Now this answers your question about how to pass parameters to the web service.

you can now use this snippet in a jsp or a servlet as well.
 
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look ...

https://coderanch.com/t/224017/Web-Services/java/Beginning-Web-Services
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic