axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clark Dorman" <clark.dor...@nextcentury.com>
Subject Deployment wsdd and Copying files
Date Wed, 18 May 2005 15:54:24 GMT
I have been going through the Axis user's guide and working through the
examples and my own simple test.  I cannot get the admin client to copy
the class to the server directory though.  (I'm using axis 1.2 RC3 on
Tomcat 5.5, default port 8080).  Here's what I have done:

1.  Created a simple java class: TestService.java

		package com.abc.service;
		public class TestService {
			public String echoMethod(String arg)
	    		{
	        		return arg;
	      	}
		}

2.  Created a simple wsdd:  

	<deployment xmlns="http://xml.apache.org/axis/wsdd/"
 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
	   <service name="TestService" provider="java:RPC">
	       <parameter name="className"
value="com.abc.service.TestService"/>
	       <parameter name="allowedMethods" value="*"/>
	   </service>
	</deployment>

3.  Ran the AdminClient (from ant)

	<target name="deploy" description="Deploy the web service">
		<java classname="org.apache.axis.client.AdminClient"
fork="true">
			<arg value="${config.dir}/deploy.wsdd" />
			<classpath>
				<pathelement location="${builddir}" />
				<path refid="libs.set" />
			</classpath>
		</java>
	</target>
    The response was:
     [java] <Admin>Done processing</Admin>

4.  Looked in the server-config.wsdd.  It included the service
TestService

5.  Tried to list the service using the axis web page.  I got:

		Fault - Could not find class for the service named:
com.abc.service.TestService
		Hint: you may need to copy your class files/tree into
the right location (which depends on the servlet system you are using).;
nested exception is: 
			java.lang.ClassNotFoundException:
com.ncc.wrap.weatherservice.TestService  

6.  My trivial client for this service failed as well.

Why does this fail?  Does the admin client create the correct directory
structure under classes and copy the class file?  

--> Do I have to explicitly copy the service to the server?   If so, is
there an ant task that I should use?

If I create the directory structure .../WEB-INF/classes/com/abc/service
and then copy the TestService.class into there, it works.  Do I have to
do that step manually (or within ant)?

Thanks,
Clark



Mime
View raw message