Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java client for webservices

Reply
Thread Tools

Java client for webservices

 
 
Fran
Guest
Posts: n/a
 
      07-06-2004
Hello all,

I have made a WebServices in the IBM WSAD Ide tool and I have tested
it using a provided tester.

However I need to build a java client to call my webservices but I
don´t know how to do it.

I have found this sample code to call a Webservices but I have
compilation problems because I have not the following classes:

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

Could anybody say me where can I get this classes?, I have installed
the Java Web Services Developer Pack but these classes does not
appear.

Could anybody send me another one example to call Webservice?

Thank you very much,

Best regards.

Fran.

.................................................. ..............
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;

public class TestClient
{
public static void main(String [] args) {
try {

String endpoint =
"http://www.vbnetexpert.com/vsm/timeservice";

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("GetLocal");

String ret = (String) call.invoke( new Object[] { "foo" } );
System.out.println("Sent 'foo', got '" + ret + "'");

}catch (Exception e) {
System.err.println(e.toString());
}
}
}

.................................................. ............
 
Reply With Quote
 
 
 
 
Cristiano Sadun
Guest
Posts: n/a
 
      07-06-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Fran) wrote in
news:(E-Mail Removed) om:

> Hello all,
>
> I have made a WebServices in the IBM WSAD Ide tool and I have tested
> it using a provided tester.
>
> However I need to build a java client to call my webservices but I
> don´t know how to do it.


The easiest way with Axis is to use the wsdl2java tool, which takes a WSDL
and creates corresponding set of java classes (in source), which methods
wrap the webservice call code.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webservices - can I post back the response to the client as a html page narmathabala@gmail.com ASP .Net 0 04-22-2006 08:19 AM
need to help to copy file from server to client through webservices Anin via .NET 247 ASP .Net Web Services 1 03-24-2005 04:35 AM
Do .Net Client Applications require MSSoap dlls for calling WebServices? Jack Wright ASP .Net Web Services 3 07-30-2004 11:19 AM
Client Side Webservices Paul Gorman ASP .Net Web Services 1 12-16-2003 09:48 AM
Webservices and vb6 client Jukka Kenttälä ASP .Net Web Services 2 07-17-2003 05:18 PM



Advertisments