ServiceMix异常(4):Unmarshalling Error: 意外的元素 (uri:"", local:"arg0")

错误信息

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
org.apache.cxf.interceptor.Fault: Unmarshalling Error: 意外的元素 (uri:"", local:"arg0")。所需元素为<{}param1>,<{}param2> 
	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:905)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:712)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:179)[177:org.apache.cxf.cxf-rt-databinding-jaxb:3.1.4]
	at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)[176:org.apache.cxf.cxf-rt-wsdl:3.1.4]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[173:org.apache.cxf.cxf-core:3.1.4]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[173:org.apache.cxf.cxf-core:3.1.4]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)[180:org.apache.cxf.cxf-rt-transports-http:3.1.4]
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)[195:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[195:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.Server.handle(Server.java:370)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[50:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]
Caused by: javax.xml.bind.UnmarshalException

解决方案

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值