当前位置: 代码迷 >> Java Web开发 >> unexpected element (uri:"" local:"SessionBody"). Expected elements are (none)解决思路
  详细解决方案

unexpected element (uri:"" local:"SessionBody"). Expected elements are (none)解决思路

热度:893   发布时间:2016-04-16 21:47:32.0
unexpected element (uri:"", local:"SessionBody"). Expected elements are (none)
使用工具访问webservice服务端

这是错误信息:
2014-1-2 14:37:45 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
警告: Interceptor for {http://www.mbossvsop.com.cn/vsop}ProdInfoSynSV#{http://www.mbossvsop.com.cn/vsop}productInfoSync has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"", local:"SessionBody"). Expected elements are (none) 
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:791)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:154)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:105)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:188)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"SessionBody"). Expected elements are (none)]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
... 28 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"SessionBody"). Expected elements are (none)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:254)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:249)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:116)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:101)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:478)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:459)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:242)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:176)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
... 30 more
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"SessionBody"). Expected elements are (none)
... 40 more



这是报文:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:ProductSyncToVSOPReq xmlns:m="http://www.mbossvsop.com.cn/vsop">
<request>
<SessionBody>
<ProductSyncToVSOPReq>
<StreamingNo>222111133335555</StreamingNo>
<TimeStamp>20110114104458</TimeStamp>
<SystemId>100</SystemId>
<ReginID>35</ReginID>
<SPID>35100427</SPID>
<OPFlag>1</OPFlag>
<ProductType>2</ProductType>
<ProductID>JTVSOP_PROD</ProductID>
<PnameCN>VSOP01</PnameCN>
<PnameEN>OY</PnameEN>
<PdescriptionCN>VSOP01</PdescriptionCN>
<PdescriptionEn>aaff</PdescriptionEn>
<ServiceCapabilityID>01</ServiceCapabilityID>
<Status>0</Status>
<Scope>0</Scope>
<ProductHost>211</ProductHost>
<PlatForm>206</PlatForm>
<ProdRelation>
<OPType>0</OPType>
<RelationType>1</RelationType>
<RProductID>135000000000000002123</RProductID>
</ProdRelation>
<OwnerPlatForm>204</OwnerPlatForm>
</ProductSyncToVSOPReq>
</SessionBody>
</request>
</m:ProductSyncToVSOPReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

------解决思路----------------------
少了些声明信息
  相关解决方案