在wso2esb中调用send mediator中的序列时出错

时间:2014-04-28 05:44:16

标签: wso2 wso2esb wso2dss

我正在使用wso2esb 4.7.0和wso2dss 3.0.0。我已经创建了一个数据服务来更新wso2dss中的表并且它工作正常。现在我通过send mediator在wso2esb中调用了这个服务:

<inSequence>
         <property name="messageType" value="application/json" scope="axis2"/>
         <property name="username"
                   expression="//username/text()"
                   scope="default"
                   type="STRING"/>
         <property name="userid"
                   expression="//userid/text()"
                   scope="default"
                   type="STRING"/>
         <log>
            <property name="username" expression="get-property('username')"/>
            <property name="userid" expression="get-property('userid')"/>
         </log>
         <payloadFactory media-type="xml">
            <format>
               <p:trail_op xmlns:p="http://ws.wso2.org/dataservice">
                  <p:username>$1</p:username>
                  <p:userid>$2</p:userid>
               </p:trail_op>
            </format>
            <args>
               <arg evaluator="xml" expression="get-property('username')"/>
               <arg evaluator="xml" expression="get-property('userid')"/>
            </args>
         </payloadFactory>
         <header name="Action" value=""/>
         <property name="SOAPAction" value="" scope="transport"/>
         <send>
            <endpoint>
               <address uri="http://192.168.1.23:9764/services/Capp_muser_dataservice/"
                        format="soap12"/>
            </endpoint>
         </send>
         <log level="full"/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>

这也工作正常。当我在发送中介调用序列时发生问题,如:

         <send receive="Capp_Login_seq1">
            <endpoint>
               <address uri="http://192.168.1.23:9764/services/Capp_muser_dataservice/"
                        format="soap11"/>
            </endpoint>
         </send>

我的要求是:

 curl -v -H "Accept:application/json" -H "Content-Type:application/json"  -d '{"username":"sps","userid":"337217709387286044"}'  http://youtility-desktop:8282/services/Capp_LoginProxy

它在esb中显示错误:

 ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
    at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
    at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
    at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
    at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
    at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:118)
    at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:116)
    at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:91)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:62)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
    at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
    at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2116)
    at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2022)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1114)
    at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
    at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
    at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
    ... 20 more

是肥皂请求还是其他问题? 请让我知道..

1 个答案:

答案 0 :(得分:0)

删除端点格式并检查。