• 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:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

how can I create the client that consume a web service

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I want to learn java web services, I used Apache axis as follows:

I put a file called greeter.jws in C:\Tomcat 5.5\webapps\axis
-greeter.jws contains the following code:

public class greeter {
public String greetme(String s){
return "How are you?������.."+s;
}
}

When I start the browser with the URL : 'http://localhost:8080/axis/greeter.jws'

I have got a link to the WSDL file

How can I use this service from a JSP or servlet client (java client)?

Best Regards
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(the jws suggests to me that you are using Axis 1.x)
Have a look at Creating Web Services with Apache Axis. In the later part it explains how to generate a client stub and then uses it in a command-line program. You should be able to use that stub directly in a servlet.

J2EE Tutorial; Web Services Clients; Application Client shows how to acquire the client stub though JNDI, provided that you have set up the <service-ref> deployment descriptor in the web.xml (Tomcat 5.5 probably doesn't support the <service-ref> descriptor).
[ July 20, 2007: Message edited by: Peer Reynders ]
 
samir mohamed
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peer

The site you showed was very useful,
I want to learn about JAXB, do you know any site that explains JAXB through examples (step by step).

Best Regards
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java EE 5 tutorial contains a chapter on JAXB.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic