这是一个常见问题。但看起来我的类和接口正确注释。如果我忽略某些事情,请告诉我。提前致谢。我在互联网上搜索了很多但没有帮助我。
异常详情:
C:\Indu\workspaceWS\CalculatorWS>wsgen -s src -verbose -d bin -cp bin com.indu.w
s.services.CalcServiceImpl
warning: The apt tool and its associated API are planned to be
removed in the next major JDK release. These features have been
superseded by javac and the standardized annotation processing API,
javax.annotation.processing and javax.lang.model. Users are
recommended to migrate to the annotation processing features of
javac; see the javac man page for more information.
Note: ap round: 1
Problem encountered during annotation processing;
see stacktrace below for more information.
com.sun.tools.internal.ws.processor.modeler.ModelerException: [failed to localiz
e] A web service endpoint could not be found()
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.o
nError(WebServiceAP.java:219)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.b
uildModel(WebServiceAP.java:326)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.p
rocess(WebServiceAP.java:260)
我的代码: 实施类:
@WebService(serviceName = "CalculatorService", endpointInterface =
"com.indu.ws.services.CalcIntService",
targetNamespace="http://com/indu/ws/services/",
portName="CalcIntServicePortType")
public class CalcServiceImpl implements CalcIntService {
接口:
@WebService(name = "CalcIntServicePortType", targetNamespace =
"http://com/indu/ws/services/",
wsdlLocation="WEB-INF/wsdl/CalculatorWS.wsdl")
public interface CalcIntService {
@WebMethod
public int doService(Calculator c);
}