I'm trying to deploy an extremely simple web service under Tomcat 4.0, but
I'm not having much luck. When I try to access the URL
http://localhost:8080/axis/services/CraftsWeb?wsdl, I get the following
error:

java.lang.IllegalAccessException: craftsweb.CraftsWeb 

Here's the service code:

package craftsweb;

//import java.sql.*;

class CraftsWeb
{

  public CraftsWeb()
  {
    try
    {
      //Class.forName("com.ibm.as400.access.AS400JDBCDriver");
    }
    catch (Exception ex)
    {
       ex.printStackTrace();
    }
  }

  public String getCount (String aTable)
  {
    String url = "jdbc:as400:hlinvt";
    String mRetValue = "*** Error ***";
 
   return mRetValue;
  }
}       

And here's the deployment descriptor:

<!-- Use this file to deploy some handlers/chains and services      -->
<!-- Two ways to do this:                                           -->
<!--   java org.apache.axis.client.AdminClient deploy.wsdd          -->
<!--      after the axis server is running                          -->
<!-- or                                                             -->
<!--   java org.apache.axis.utils.Admin client|server deploy.wsdd   -->
<!--      from the same directory that the Axis engine runs         -->

<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"; 
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
  <service name="CraftsWeb" provider="java:RPC">
    <parameter name="className" value="craftsweb.CraftsWeb"/>
    <parameter name="allowedMethods" value="*"/>
    <requestFlow type="checks"/>
  </service>
</deployment>

The class file is in the appropriate directory
($TOMCAT/webapps/axis/WEB-INF/classes/craftsweb/CraftsWeb.class).
Ultimately, this will be accessing AS/400 data, but I have it really simple
right now, because I'm new to web services and I'm not sure exactly what I'm
doing.  To complicate things, this service will be accessed via .Net, and I
need to make sure I understand how to make all of that work before I confuse
things with DB integration and complex return types.

Has anyone else run into this?  Any clues as to what I'm doing wrong?  I had
a working service, but I started over to make sure I had things right in my
head.  It even returned a HashMap successfully to a Java consumer.  Other
than being simpler, this looks exactly like the other from what I can tell,
but it sure isn't working.  Thanks!

-- 
Jason Lee - Programmer
405.745.1789
Hobby Lobby Stores, Inc.


Reply via email to