我有一个肥皂服务,用于上传我上传多个文件的文件。该服务工作正常但偶尔它没有给出以下错误 - “com.ctc.wstx.exc.WstxUnexpectedCharException:意外的字符' H' (代码72)prolog;预期'<' “ 即可。我无法找到这个问题背后的原因。任何人都可以告诉我这个错误发生的原因和相同的解决方案。以下是soap信封和服务器错误。
SOAP信封:
2017-05-31T11:54:13:440080 + 01:00N0.0000Avondale Financial PlanningTestBrokerChoices@krbs.comMr。 Sayne wWard26372638716100014ACCEPTANCEwbroknet011824993OSBLENDINGWRESPONSEWEBGENER.CSDWEBR.PNG0SYSTEMCREATEDSYSTEM99902017-05-31T11:54:13:471080 + 01:00OSBLENDINGACCEPTANCESRCXMPLAUTHORISATIO0AFT00NT729000000223207290000002232017-05-31-11.54.13.471000N0HUBUSERHUBUSER
服务器错误:
11:54:13,547 WARN [org.apache.cxf.phase.PhaseInterceptorChain](default-workqueue-3){http://endpoint.consumer.ws.ihub.osb.com/}的拦截器AWDSoapEndpointService#{http://endpoint.consumer.ws.ihub.osb.com/} createObjects抛出异常,现在展开: org.apache.cxf.binding.soap.SoapFault:读取XMLStreamReader时出错:意外的字符' H' (代码72)prolog;预期'<' 在[row,col {unknown-source}]:[1,1] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:259)[cxf-rt-bindings-soap-3.0.4.jar:3.0.4] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:65)[cxf-rt-bindings-soap-3.0.4.jar:3.0.4] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[cxf-core-3.0.5.jar:3.0.5] 在org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:784)[cxf-core-3.0.5.jar:3.0.5] at org.apache.cxf.transport.http.HTTPConduit $ WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1645)[cxf-rt-transports-http-3.0.5.jar:3.0.5] at org.apache.cxf.transport.http.HTTPConduit $ WrappedOutputStream $ 1.run(HTTPConduit.java:1156)[cxf-rt-transports-http-3.0.5.jar:3.0.5] 在org.apache.cxf.workqueue.AutomaticWorkQueueImpl $ 3.run(AutomaticWorkQueueImpl.java:428)[cxf-core-3.0.5.jar:3.0.5] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[rt.jar:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)[rt.jar:1.8.0_73] at org.apache.cxf.workqueue.AutomaticWorkQueueImpl $ AWQThreadFactory $ 1.run(AutomaticWorkQueueImpl.java:353)[cxf-core-3.0.5.jar:3.0.5] 在java.lang.Thread.run(未知来源)[rt.jar:1.8.0_73] 引起:com.ctc.wstx.exc.WstxUnexpectedCharException:意外字符' H' (代码72)prolog;预期'<' 在[row,col {unknown-source}]:[1,1] 在com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:647)[woodstox-core-asl-4.4.1.jar:4.4.1] 在com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2054)[woodstox-core-asl-4.4.1.jar:4.4.1] 在com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131)[woodstox-core-asl-4.4.1.jar:4.4.1] 在com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1154)[woodstox-core-asl-4.4.1.jar:4.4.1] 在org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:161)[cxf-rt-bindings-soap-3.0.4.jar:3.0.4]
谢谢,
Siddharth Patil
答案 0 :(得分:0)
我有类似的问题。您的错误表明您的消息不是以prolog开头的,而prolog必须出现在xml的根元素之前。