在Mule WSDL解析中获取错误 - 带有根异常堆栈的COULD_NOT_READ_XML_STREAM:prolog中的意外字符'/'(代码47);

时间:2015-07-01 13:33:30

标签: web-services soap wsdl mule

我正在尝试通过 Web服务消费者连接器在mule中使用SOAP服务。每件事看起来都很好但是在运行应用程序时我得到了以下异常:

org.apache.cxf.interceptor.Fault: COULD_NOT_READ_XML_STREAM
at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:151)
at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:135)
at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:131)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:119)
at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.mule.module.cxf.transport.MuleUniversalConduit$1.write(MuleUniversalConduit.java:143)

:44)
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50)
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:40)
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:41)
at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:48)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:13)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:109)
at org.mule.execution.FlowProcessingPhase$1.run(FlowProcessingPhase.java:62)
at org.mule.transport.TrackingWorkManager$TrackeableWork.run(TrackingWorkManager.java:267)
at org.mule.work.WorkerContext.run(WorkerContext.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '/' (code 47) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2029)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1114)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:606)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:565)
at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:142)
... 214 more

My Mule流看起来像这样:

 <ws:consumer-config name="Web_Service_Consumer" wsdlLocation="D:\Balwant\docs\greet.wsdl" service="GreeterService" port="GreeterPort" serviceAddress="http://localhost:63081/services/unsecure" doc:name="Web Service Consumer"/>

<flow name="jax-ws-external" doc:name="jax-ws-external">
    <http:inbound-endpoint exchange-pattern="request-response"
        host="localhost" port="8084"  doc:name="HTTP" />
    <ws:consumer config-ref="Web_Service_Consumer" operation="greet" doc:name="Web Service Consumer" mtomEnabled="true"/>

</flow>

您的帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

您可以分享您发布到http://localhost:8084的SOAP Xml吗? 您是否有可能不发送一个以及它失败的原因?默认情况下,入站端点会在没有时将有效负载设置为请求路径,在这种情况下&#34; /&#34;因为端点中没有配置路径,而且消费者似乎在抱怨什么。