发布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描述就可以了

webservice:com.sun.xml.internal.ws.server.ServerRtException: [failed to localize]

访问成功:

webservice:com.sun.xml.internal.ws.server.ServerRtException: [failed to localize]

相关文章:

  • 2021-12-06
  • 2021-09-21
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-03-29
  • 2021-12-10
猜你喜欢
  • 2022-01-04
  • 2021-07-15
  • 2022-03-09
  • 2022-02-25
  • 2021-12-04
  • 2021-10-31
  • 2021-05-10
相关资源
相似解决方案