按照精华帖《Web_Service开发指南_2.3.1》 打代码出现的错误提示?怎么解决呢

我是个新手 不知道下面的问题如何解决呢???

按照精华帖《Web_Service开发指南_2.3.1》 学习的时候
学习到2.1.4.2 WSDD定制发布
创建的类:
package com.axis.wsdd;

public class HelloWorldWSDD {
private int requestCount = 0;

public String hello(String name){
    requestCount++;     
    System.out.println("requestCount : " + requestCount);
    System.out.println("Received : " + name);
    return "Hello: " + name;
}

public Float add(Float a,float b){
    requestCount++; 
    String result = "a= " + a + ",b= " + b;
    System.out.println("requestCount : " + requestCount);
    System.out.println("Received : " + result);
    return a + b;
}

}

在 D:\Tomcat 5.0\webapps\axis\WEB-INF创建的deploy.wsdd
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">





生成的server-config.wsdd
<?xml version="1.0" encoding="UTF-8"?>






























http://xml.apache.org/axis/wsdd/






























文章说此时可以访问http://localhost:8080/axis/servlet/AxisServlet
但是报错:
And now... Some Services
AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - No service class was found! Are you missing a className option?
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: No service class was found! Are you missing a className option?
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:Jeff-Queenie

创建客户端测试的时候也报错:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.ConfigurationException: No service class was found! Are you missing a className option?
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: No service class was found! Are you missing a className option?
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:No service class was found! Are you missing a className option?

这个当然不对,少了className等
修改为




你现在报的异常也是在说这个问题
stackTrace:No service class was found! [color=red]Are you missing a className option?[/color]

可以运行相关命令自动生成,但此方法不太保险,运行环境要求苛刻,一般情况下都不用此方法,只在教课书上使用:)

我的做法是直接把deploy.wsdd中……内容拷贝到server-config.wsdd中,这样就不会出错了,这也是经验之谈。

因为部署的过程其实就是执行上述拷贝的过程。