当前位置:   article > 正文

ServiceMix异常(4):Unmarshalling Error: 意外的元素 (uri:"", local:"arg0")_意外的元素uri 所需元素为{json}

意外的元素uri 所需元素为{json}

错误信息

  1. 2019-06-28 23:18:51,972 | WARN | tp2114777362-248 | PhaseInterceptorChain | 173 - org.apache.cxf.cxf-core - 3.1.4 | Interceptor for {http://demo.monk.com/}CalculatorServiceService#{http://demo.monk.com/}subtraction has thrown exception, unwinding now
  2. org.apache.cxf.interceptor.Fault: Unmarshalling Error: 意外的元素 (uri:"", local:"arg0")。所需元素为<{}param1>,<{}param2>
  3. at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:905)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
  4. at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:712)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
  5. at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:179)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
  6. at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)[176:org.apache.cxf.cxf-rt-wsdl:3.1.4]
  7. at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[173:org.apache.cxf.cxf-core:3.1.4]
  8. at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[173:org.apache.cxf.cxf-core:3.1.4]
  9. at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)[180:org.apache.cxf.cxf-rt-transports-http:3.1.4]
  10. at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)[195:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
  11. at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[195:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
  12. at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  13. at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  14. at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  15. at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  16. at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  17. at org.eclipse.jetty.server.Server.handle(Server.java:370)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  18. at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  19. at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  20. at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  21. at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  22. at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  23. at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  24. at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  25. at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  26. at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  27. at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
  28. at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]
  29. Caused by: javax.xml.bind.UnmarshalException

解决方案

在访问的地址后面跟上 ? wsdl
    如:http://localhost:8080/CalculatorService?wsdl

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/252795
推荐阅读
相关标签
  

闽ICP备14008679号