我正在尝试创建一个控制台应用程序来测试我的Web服务。
我已经成功部署了一个Web服务,位于http://localhost:8080/WS/myWS,
并且使用wsimport生成了代理类:
wsimport -d bin -s src http://localhost:8080/WS/myWS?wsdl
现在我的webservice类位于bin/mywebservice/中,我正在尝试使用classpath = ./编译我的客户端类。
这是我的类的源代码:
import bin.mywebservice.myClass_Service;
public class TesterApp{
public static void main (String args[])
{
myClass_Service service = new myClass_Service();
}
}
我遇到了一个错误:
TesterApp.java:1: error: cannot access myClass_Service
import bin.mywebservice_Service.myClass;
^
bad class file: .\bin\mywebservice\myClass_Service.class
class file contains wrong class: mywebservice.myClass_Service
Please remove or make sure it appears in the correct subdirectory of the classpath.
请帮忙看看,我的myClass_Service有什么问题? 我确定,myClass_Service.class 存在于 .\bin\mywebservice\ 目录下。