我有一个用于上传文档的soap服务,通过它我可以上传多个文档。该服务工作正常,但偶尔会出现以下错误-com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'H' (code 72) in prolog; expected '<'
。我无法找到此问题背后的原因。有人能告诉我出现此错误的原因和解决方法吗?以下是soap信封和服务器错误。
肥皂包:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/><soap:Body><ns2:createObjectsResponse xmlns:ns2="http://ws.processing.dstawd.com/"><createObjectsResponse><workInstance assignedTo="SYSTEM" id="2017-05-31-11.54.13.440080T01" instanceType="transaction" permission="Update"><createTime>2017-05-31T11:54:13:440080+01:00</createTime><fieldValues><fieldValue name="VIP">N</fieldValue><fieldValue name="amount">0.0000</fieldValue><fieldValue name="amountType"></fieldValue><fieldValue name="BKCN">Avondale Financial Planning</fieldValue><fieldValue name="BKEM">TestBrokerChoices@krbs.com</fieldValue><fieldValue name="BKNM">Mr. Sayne wWard</fieldValue><fieldValue name="BKPH">26372638716</fieldValue><fieldValue name="FCAN">100014</fieldValue><fieldValue name="PDID">ACCEPTANCE</fieldValue><fieldValue name="BKUN">wbroknet01</fieldValue><fieldValue name="AN02">1</fieldValue><fieldValue name="OANO">824993</fieldValue></fieldValues><businessArea>OSBLENDING</businessArea><type>WRESPONSE</type><customScreen>WEBGENER.CSD</customScreen><iconName>WEBR.PNG</iconName><externalSystems><externalSystem><externalDLL></externalDLL><externalHost></externalHost><externalParameter></externalParameter><externalProcedure></externalProcedure><order>0</order></externalSystem></externalSystems><lockedBy>SYSTEM</lockedBy><status>CREATED</status><queue>SYSTEM</queue><priority>999</priority><priorityIncrease>0</priorityIncrease></workInstance><sourceInstance id="2017-05-31-11.54.13.471080O01" permission="Update"><createTime>2017-05-31T11:54:13:471080+01:00</createTime><fieldValues/><businessArea>OSBLENDING</businessArea><type>ACCEPTANCE</type><customScreen>SRCXMPL</customScreen><iconName>AUTHORISATIO</iconName><externalSystems><externalSystem><order>0</order></externalSystem></externalSystems><lockedBy></lockedBy><accessMethod>AFT</accessMethod><annotationBlob></annotationBlob><archiveBox>0</archiveBox><archiveStartPage>0</archiveStartPage><commentsExist>N</commentsExist><format>T</format><mailType></mailType><contentId>729000000223</contentId><opticalStatus>2</opticalStatus><pageCount>0</pageCount><path>729000000223</path><receiveTime>2017-05-31-11.54.13.471000</receiveTime><revisable>N</revisable><securityLevel>0</securityLevel><createUser>HUBUSER</createUser><createStation>HUBUSER</createStation></sourceInstance><immediateRelationships><relateObjects childId="2017-05-31-11.54.13.471080O01" parentId="2017-05-31-11.54.13.440080T01"/></immediateRelationships></createObjectsResponse></ns2:createObjectsResponse></soap:Body></soap:Envelope>
服务器错误:
11:54:13,547 WARN [org.apache.cxf.phase.PhaseInterceptorChain] (default-workqueue-3) Interceptor for {http://endpoint.consumer.ws.ihub.osb.com/}AWDSoapEndpointService#{http://endpoint.consumer.ws.ihub.osb.com/}createObjects has thrown exception, unwinding now: **org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader: Unexpected character 'H' (code 72) in prolog; expected '<'
at [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]
at 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]
at 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]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_73]
**Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'H' (code 72) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]**
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:647) [woodstox-core-asl-4.4.1.jar:4.4.1]
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2054) [woodstox-core-asl-4.4.1.jar:4.4.1]
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131) [woodstox-core-asl-4.4.1.jar:4.4.1]
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1154) [woodstox-core-asl-4.4.1.jar:4.4.1]
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:161) [cxf-rt-bindings-soap-3.0.4.jar:3.0.4]
1条答案
按热度按时间pgvzfuti1#
我也遇到过类似的问题。你的错误说你的消息不是以prolog开头的,而prolog必须出现在xml的根元素之前。