axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Sturgeon" <tom.sturg...@persystent.com>
Subject RE: Step By Step Example
Date Thu, 20 May 2004 14:24:27 GMT
Thanks Ken.

That starts to clear many things up for me.

I suppose I can eliminate the service part of the file and just do the
stubs for the client, right?

Tom

-----Original Message-----
From: Lee, Ken [mailto:Ken_Lee@platts.com] 
Sent: Wednesday, May 19, 2004 11:28 AM
To: axis-user@ws.apache.org
Subject: RE: Step By Step Example

> Anyone have a step-by-step example of creating a JAVA client 
> from a Microsoft Web Service using WSDL?
> 
> I could not figure out what a build.xml file would look like 
> from the Axis documentation, nor could I figure out how to 
> use Ant tasks...
> 

Here is sample code in a jar file with a working build file.  *** This
example will not work through a firewall/proxy! *** This uses remote
Axis web services that are available on the xmethods.com web site.
Microsoft Web services would also work.  This just shows a starting
point.  For the MS Web services to work, you will need to modify the
test client to use appropriate data types.  The easy way out is to only
use services that use very simple data types that match to java data
types well such as numbers and strings.

Good luck!


Overall Process Steps:
1. Go to xmethods.com
2. Found two sample Web services to use:
	RPC Try It Weather - Temperature Current temperature in a given
U.S. zipcode region. Apache SOAP 
	RPC Try It Barnes and Noble Price Quote Returns price of a book
at BN.com given an ISBN number. Apache SOAP 
In each of these, go to the wsdl file and save it to the conf directory
in the project.

3. Create clients for web services
4. Modify the build.xml file.  Need to add items to stubs target for any
other web service remote calls to generate java files.

5. Modify build.xml file.  Add client methods for testing that will call
the new client code created in step 4.



Working Sample code attached:  The Barnes and Noble and Temperature
service remote calls are included.

1.  Modify build.xml - make sure the axis.dir is pointing to your axis
directory.  You must have this to work!  Also, ant and java must also be
installed and working!

1. Compile - run ant compile
2. Run test clients
	ant clientbnstub.run
	(Check out results!)

	ant clienttempstub.run
	(check out results!)

That's about all there is to running already created programs.  It did
require looking at the wsdl file to see what parameters need to be sent
and what type of data is returned to make the test case work.  This is
of course a very simple example.

Hope it works for you!

Ken Lee

Mime
View raw message