发布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描述就可以了
访问成功: