加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

webservice异常

发布时间:2020-12-16 22:41:17 所属栏目:安全 来源:网络整理
导读:Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext ?at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:156) ?at com.sun.xml.internal.ws.model.AbstractSEI

Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext
?at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:156)
?at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:84)
?at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:234)
?at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:673)
?at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:661)
?at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
?at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
?at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
?at javax.xml.ws.Service.getPort(Service.java:119)
?at com.zys.firstws.cn.HelloWebServiceService.getHelloWebServicePort(HelloWebServiceService.java:72)


异常原因:

??? 有两个原因:

  1. 客户端的接口的包名(或者接口名)和服务端的包名(或者接口名)不一致

  2. 客户端的接口没有加上@Webservice注解

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读