`
cobrayangxiaoping
  • 浏览: 1708 次
社区版块
存档分类
最新评论

webservice 意外元素异常

阅读更多
javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schemas.xmlsoap.org/ws/2005/04/discovery", local:"Probe"). Expected elements are <{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}AppSequence>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Bye>,<{http://www.w3.org/2005/08/addressing}EndpointReference>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Hello>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}MetadataVersion>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Probe>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}ProbeMatches>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Resolve>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}ResolveMatches>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Scopes>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Security>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Sig>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}SupportedMatchingRules>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Types>,<{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}XAddrs>
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1063)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:150)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:244)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:127)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:324)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:307)
at org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl$WSDiscoveryProvider.invoke(WSDiscoveryServiceImpl.java:376)
at org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl$WSDiscoveryProvider.invoke(WSDiscoveryServiceImpl.java:350)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:66)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.udp.UDPDestination$MCastListener$2.run(UDPDestination.java:106)
at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:426)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:351)
at java.lang.Thread.run(Thread.java:679)
cxf2.7搭建的服务端  部署到tomcat中 接口方法可以正常的执行 但是有时候tomcat日志中会出现这个异常 请问该如何解决呢
分享到:
评论

相关推荐

    webservice摘录webservice摘录

    webservice摘录webservice摘录webservice摘录webservice摘录webservice摘录webservice摘录webservice摘录webservice摘录webservice摘录质

    使用cxf webservice时容易出现的异常

    使用cxf webservice时容易出现的异常

    webservice

    2. **方法可见性**:为了使服务可用,所有暴露给外部的方法必须是公共的(public),私有(private)或其他非公开访问级别将导致异常。 3. **部署环境**:在低版本的JDK中可能遇到兼容性问题,建议升级至最新版本的JDK,...

    xfire组件实现webservice实例

    本文详细介绍了利用xfire组件实现webservice的服务端和客户端实例,适合入门参考和使用!

    webservice获取List案例

    泛型List允许我们在List中存储特定类型的元素,如List或List,确保了添加和检索元素时的类型一致性。 3. **XML配置**:由于WebService返回的是XML格式的数据,因此在处理非简单类型如List时,需要进行XML配置来正确...

    WebService教程+实例+代码提示功能WebService实例.rar

    这个"WebService教程+实例+代码提示功能WebService实例.rar"压缩包文件显然包含了关于WebService的学习资料、实例代码和可能的代码提示功能,旨在帮助用户深入理解和实践WebService的开发。 首先,"教程地址.txt"很...

    一个简单的WEBSERVICE 例子

    根据提供的文件信息,本文将详细解释一个简单的 WebService 示例,并深入探讨其中的关键概念和技术细节。 ### 一、WebService 概念 ...对于进一步的学习和发展,还可以探索更多高级特性,比如异常处理、安全性增强等。

    WebserviceStudio webservice调试工具

    - **错误检测**:在调用过程中,工具会捕获并显示任何错误或异常,帮助定位问题。 3. **使用流程**: - 首先,需要获取Web服务的WSDL地址,这通常是服务提供商提供的。 - 在WebserviceStudio中输入WSDL地址,...

    webService添加basic验证

    1. **定位到`servlet`元素**:找到`web.xml`文件中与你的WebService相关的`servlet`元素。例如,在示例中,`&lt;servlet-name&gt;`为`AxisServlet`。 2. **添加安全约束**:在`web.xml`中增加`&lt;security-constraint&gt;`...

    WebServiceStudio webservice测试工具

    WebServiceStudio是一款轻量级的Web服务测试工具,它允许开发者无需编写任何代码就能对Web服务进行快速、便捷的测试。这个工具特别适用于那些需要验证Web服务功能或调试接口的IT专业人员。在本文中,我们将深入探讨...

    C#调用JavaWebService

    调用WebService,最简单的办法当然是直接添加WEB引用,然后自动产生代理类,但是在调用JAVA的WebService时并没有这么简单,特别是对于SoapHeader的处理,通过C#添加Web引用方式访问JavaWebService的方法,除了string...

    Idea实现WebService实例

    【标题】:Idea实现WebService实例 在Java开发中,WebService是一种常见的跨平台、跨语言的通信方式,它允许不同的应用程序之间交换数据。IntelliJ IDEA(简称Idea)是广受欢迎的Java集成开发环境,提供了强大的...

    webservice测试

    第三个示例可能涉及到错误处理和异常管理,展示如何在出现问题时优雅地处理。 对于"webservicTest"主程序,它可能是一个客户端应用,用于发起对WebService的请求并接收响应。这通常包括设置SOAP消息,向WebService...

    webService客户端调用服务端传对象参数

    这个工程详细的介绍了webService服务客户端如何调用简单和复杂的webService,其中就包括传递的参数是对象类型,返回数据是数组类型,还有最简单的基本类型。压缩包里还配置说明,清晰的说明webService的整个过程,对...

    webService—Axis实例webService—Axis实例webService—Axis实例

    webService—Axis实例webService—Axis实例webService—Axis实例webService—Axis实例webService—Axis实例webService—Axis实例webService—Axis实例

    webservice测试软件WebServiceStudio

    Web服务(WebService)是一种基于标准的、平台和语言无关的方式,允许不同系统之间进行通信和数据交换。在IT行业中,Web服务广泛应用于企业级应用程序集成,使得不同系统间的数据共享和交互变得更加简单。本文将详细...

    WebServiceStudio C#源码

    C#的特点包括类型安全、垃圾回收、异常处理和丰富的库支持。 3. **公共类(Public Classes)**:源码中的34个公共类是程序的核心组成部分,它们定义了对象、方法和属性,以实现特定功能。这些类可能包括解析和构建...

    springboot+webservice搭建webservice服务端

    在IT行业中,Web Service是一种基于XML的通信标准,允许不同系统之间进行互操作性交互。...在实际开发中,可以根据项目需求选择适合的客户端调用方式,同时注意处理异常和错误,确保服务的稳定性和可靠性。

Global site tag (gtag.js) - Google Analytics