File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to run sample web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to run sample web service" Watch "How to run sample web service" New topic
Author

How to run sample web service

Subash Sagar
Greenhorn

Joined: Sep 01, 2006
Posts: 15
Hi

I have already got Tomcat and axis with me.

I would like to know if there any sample webservice which i can run to see how it works.

I have downloaded a sample from this link http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html

but I have difficulty in understanding readme.txt

If someone has links to any other sample web service please tell me.

Thanking You
Subash
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
That article is about as simple as it gets.
Have you tried skipping the jws example and trying Working with a Production Web Service first, without relying on the download?
Are you using Axis 1.x?


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Subash Sagar
Greenhorn

Joined: Sep 01, 2006
Posts: 15
yes I have skipped the jws example part.

Does it makes difference if i dont go through that example

Thanking You
subash
venkat reddyk
Greenhorn

Joined: Oct 22, 2006
Posts: 3
Here is an refference Implementation go through this this is gaving all the possibilities for creating an web-service and accessing an existing web-service

http://www.ncsa.uiuc.edu/people/ramonw/ws_demo/axisdemo.html
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Originally posted by Subash Sagar:
Does it makes difference if i dont go through that example


You can safely ignore the "jws" portion of the tutorial.
The important part of Creating Web Services with Apache Axis starts at "Working With a Production Web Service" and it really gets going at "3. WSDL2Java: Generate the Server-side Wrapper Code and Stubs For Easy Client Access".
Subash Sagar
Greenhorn

Joined: Sep 01, 2006
Posts: 15
Hi

I am getting this error

java.lang.noclassdeffounderror org.apache.axis.admin.clientadmin

when i run this command
java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

My classpath setting is right. I dont know what exactly the problem is.
I am using Tomcat 5.0.25 and axis 1.4.

Thanking You
Subash
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
My classpath setting is right.

What does AXISCLASSPATH look like? It needs to include the axis.jar file, which contains the AdminClient class.


Ping & DNS - updated with new look and Ping home screen widget
Subash Sagar
Greenhorn

Joined: Sep 01, 2006
Posts: 15
My AXISCLASSPATH looks like this

set AXIS_HOME=D:\axis-1_4
set AXIS_LIB=%AXIS_HOME%\lib
set AXISCLASSPATH=%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;
%AXIS_LIB%\commons-logging.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;
%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar

Cant proceed from here.

Thanking You
Subash
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Have you gotten the HappyAxis page to work yet (while Tomcat is running)? i.e.:
http://localhost:8080/axis/happyaxis.jsp

See also:
http://ws.apache.org/axis/java/install.html#ValidateAxisWithHappyaxis

The reason why I'm asking is because I don't see
activation.jar
mail.jar
in you AXISCLASSPATH either. Not that that would solve your problem - but if happyaxis isn't working there may be more basic issues to deal with.

JavaBeans Activation Framework (JAF) (activation.jar)
JavaMail (javamail.jar)
Subash Sagar
Greenhorn

Joined: Sep 01, 2006
Posts: 15
I have fixed the class path issue and followed all the steps in this link
http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html

But I have no idea on how to check the 6th step.
Any suggestions please.

And when i run this command "java org.apache.axis.client.AdminClient deploy.wsdd" where does the file is being deployed.

Thanking You
Subash
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
I'm not sure what you mean by "check the 6th step". The 6th step involves creating and running the client, which will print the result to the command line.

As to running the admin client for deploying a service, the deploy.wsdd is not strictly deployed anywhere - the web service it describes is. After deploying it be listed on this page: http://localhost:8080/axis/servlet/AxisServlet
[ October 25, 2006: Message edited by: Ulf Dittmer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run sample web service
 
Similar Threads
set return type as array of integer
Web Services newbie
Web-app to web-service (Axis)
generate AXIS server-config.wsdd ?
Apache Axis