发布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]的更多相关文章

  1. com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address: bind

    在发布 web service 时报错: Endpoint.publish(publishAddress, hl7MessageReveiver); com.sun.xml.internal.ws.s ...

  2. 【CXF】com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Faul

    在客户端生成代码之后测试出现错误: com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Faul ...

  3. 解决maven 引用JDK内部类编译错误 程序包:com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler不存在

    当maven项目里面有用到JDK内部的一些类或者接口的时候,用maven编译一般会出现如下错误: 程序包:com.sun.xml.internal.bind.marshaller.CharacterE ...

  4. Exception in thread "main" com.sun.xml.internal.ws.streaming.XMLStreamReaderException: unexpected XML tag.

    webservice 抛异常,原因: public class HeaderHandler implements SOAPHandler<SOAPMessageContext>{ @Ove ...

  5. ClassNotFoundException:com.sun.xml.bind.v2.ContextFactory

    项目中引入hive-jdbc-1.2.1-standalone.jar包之后,报错如下: Caused by: javax.xml.bind.JAXBException: Provider com.s ...

  6. springBoot 打war包 程序包com.sun.istack.internal不存在的问题

    使用的是 idea - Lifecycle-package 的方式打包(maven) 确认  <packaging>war</packaging> 修改启动类: (原启动类) ...

  7. 使用SpringBoot + JavaMailSender 发送邮件报错 Mail server connection failed;Could not connect to SMTP host

    说明: 出于安全考虑,阿里云默认封禁 TCP 25 端口出方向的访问流量,无法在阿里云上的云服务器通过 TCP 25 端口连接外部地址. [官方提示]:如果您需要使用阿里云上的云服务器对外部发送邮件, ...

  8. maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在

    maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在 将jre/lib/rt.jar添加到maven的compi ...

  9. maven编译不通过:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在

     问题:代码中使用了sun公司的第三方私有库,导致编译不通过 maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存 ...

随机推荐

  1. hdu 6418(石头剪刀布 **)

    题意是说双方各有剪刀,石头和布的卡片各 a,b,c,a‘,b',c' 张,对方是随机选择,问我方的最大预期得分. 这道题目一开始看到的时候感觉没有头绪,再次读题,发现题目说结果可能是分数,如果是分数的 ...

  2. Doker安装日志,留个记录而已

    tianye@ubuntu:/usr/share$ wget -qO- https://get.docker.com/ | sh # Executing docker install script, ...

  3. 贝叶斯推断之最大后验概率(MAP)

    贝叶斯推断之最大后验概率(MAP) 本文详细记录贝叶斯后验概率分布的数学原理,基于贝叶斯后验概率实现一个二分类问题,谈谈我对贝叶斯推断的理解. 1. 二分类问题 给定N个样本的数据集,用\(X\)来表 ...

  4. Andrew NG 机器学习编程作业4 Octave

    问题描述:利用BP神经网络对识别阿拉伯数字(0-9) 训练数据集(training set)如下:一共有5000个训练实例(training instance),每个训练实例是一个400维特征的列向量 ...

  5. [C++]Linux之C编程异常[true未定义解决方案]

    C语言里面是没有bool(布尔)类型的,C++里面才有,这就是说,在C++里面使用bool类型是没有问题的.bool类型有只有两个值:true =1 .false=0. 但是,C99标准里面,又定义了 ...

  6. IBM X3650 M5服务器RAID阵列设置

    生产环境中的raid配置说明: 一. 开机后,注意引导界面,按F1键进入BIOS进行设置 二. 进入BIOS后,选择system setting--storage ,进入磁盘阵列配置界面,可以看到M5 ...

  7. linux全部替换命令学习

    :%s/准备替换内容/新内容/g 可以使用 # 作为分隔符,此时中间出现的 / 不会作为分隔符 :%s#vivian/#sky/#g 替换 vivian/ 为 sky/ :%s+/oradata/ap ...

  8. intellij idea无效的发型版本1.8解决方案

    描述:intellj中启动项目报错无效的发行版本:8 解决方案一: file -> settings -> build,exception,deployment -> compile ...

  9. day 5 - 2 字典(dict)练习

    1. 有如下变量(tu 是个元祖),请实现要求的功能 tu = ("alex",[11,22,{"k1":'v1',"k2":[" ...

  10. 定时刷新页面SetInterval 和setTimeout -时间间隔可以动态设定

    JS里设定延时: 使用SetInterval和设定延时函数setTimeout 很类似.setTimeout 运用在延迟一段时间,再进行某项操作. setTimeout("function& ...