我创建了一个 WebService,我需要从中调用另一个 WebService。我正在使用 JaxWS 注释并已将战争部署到 WebSphere 上,但得到了异常:
javax.xml.ws.WebServiceException: Validation error: Web method annotations cannot exist on
implentation when WebService.endpointInterface is set
我的网络服务如下:
@WebService(serviceName = "MyServiceName",
targetNamespace = "http://myServiceNamespace/MyServiceName",
endpointInterface = "com.mycompany.MyServiceInterface",
portName = "MyServiceInterface")
public class MyServiceName implements MyServiceInterface{
@WebServiceRef(YourServiceDef.class)
YourService yourService;
....
}
有没有使用@WebServiceRef 的简单替代方法?