webservice:com.sun.xml.internal.ws.server.ServerRtException: [failed to localize]
发布webservice发生了错误,一直没有能够解决,错误如下:
Exception in thread "main" com.sun.xml.internal.ws.server.ServerRtException: [failed to localize] cannot.load.wsdl(file:/D:/test/TmriOutAccess.wsdl) at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.getPrimaryWsdl(EndpointImpl.java:375) at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:315) at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:231) at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:126) at javax.xml.ws.Endpoint.publish(Endpoint.java:240) at com.test.webservice.server.ISuperviseForStandardService_SuperviseForStandardServiceImplPort_Server.<init>(ISuperviseForStandardService_SuperviseForStandardServiceImplPort_Server.java:19) at com.test.webservice.server.ISuperviseForStandardService_SuperviseForStandardServiceImplPort_Server.main(ISuperviseForStandardService_SuperviseForStandardServiceImplPort_Server.java:23)
其实解决这个问题很简单:
只要删除类中的wsdlLocation描述就可以了
访问成功:
若是本人原创文章,请标明:本文来自博客园,作者:huiy_小溪,转载请注明原文链接:https://www.cnblogs.com/huiy/p/9678880.html。
反之,请标明原创作者,文章链接,所属平台。