【发布时间】:2013-12-19 17:51:14
【问题描述】:
我运行以下命令
wsimport -s ..\Code\app\src\main\java http://localhost:9080/shortbus/ShortbusService/ShortbusService.wsdl
这会运行并生成代码,但是,当我尝试根据我得到的新代码进行编译时...
...\ShortbusService_Service.java:[43,8] cannot find symbol
symbol : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.w
s.WebServiceFeature[])
location: class javax.xml.ws.Service
我尝试显式添加 jaxws-api.jar 和 rt.jar,但似乎都不起作用。有人可以帮我解决我所缺少的吗?
更新
如果我手动编辑为(注意 cmets)...
public ShortbusService_Service(WebServiceFeature... features) {
//super(__getWsdlLocation(), SHORTBUSSERVICE_QNAME, features);
super(__getWsdlLocation(), SHORTBUSSERVICE_QNAME);
}
public ShortbusService_Service(URL wsdlLocation) {
super(wsdlLocation, SHORTBUSSERVICE_QNAME);
}
public ShortbusService_Service(URL wsdlLocation, WebServiceFeature... features) {
//super(wsdlLocation, SHORTBUSSERVICE_QNAME, features);
super(wsdlLocation, SHORTBUSSERVICE_QNAME);
}
public ShortbusService_Service(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public ShortbusService_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
//super(wsdlLocation, serviceName, features);
super(wsdlLocation, serviceName);
}
它可以编译,但我不想这样做。
【问题讨论】:
-
你可以试试 WebSphere 论坛:ibm.biz/websphere-forum