wood burning stoves
The moose likes Web Services and the fly likes Java Client to call deployed Java Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Java Client to call deployed Java Webservice" Watch "Java Client to call deployed Java Webservice" New topic

Java Client to call deployed Java Webservice

mansi sac

Joined: Nov 15, 2010
Posts: 4
Hello All,

I am quite new to webservices.I have been given this task where I have to make a Java class which acts as a client to call methods of a java webservice deployed on Weblogic8.1 server.

Please suggest me how to proceed with it.

Thanks in advance,
Philip Grove
Ranch Hand

Joined: Aug 18, 2009
Posts: 68

What language is used to write the server part of the web service does not matter.

How to go about writing a client depends on the service itself. I guess that you have a SOAP service on the other end in which case I suggest that you look towards the javax.xml.soap package, you can find help here: Tip: Send and receive SOAP messages with SAAJ from IBM DeveloperWorks. I have previous used exactly the same document to enable me to write a SOAP client and it worked perfectly and was fairly easy to develop.

I would suggest that you learn a little about web services and XML before you have a go at the example because they dive right into the API abd expect you to know the basics.
Gnanasekaran Sakthivel

Joined: Jul 14, 2004
Posts: 23
I am also new. Recently I tried one. Download Axis2 at http://axis.apache.org/axis2/java/core/. Download the one that is aligning with the JDK you use. They have 'Quick Start' and 'Installation Guide'. Please go through them at least once. In Axis2, there is a tool called wsdl2java. This can create client code. We just need to use them to test it. You need necessary library (jars) in the environment where you develop/run this. Things like security, etc might come into the picture.
There is a lot more to Webservices than what I said. As Philip said, please read more information as you go along.

Best Wishes
subject: Java Client to call deployed Java Webservice
It's not a secret anymore!