<?xml version="1.0" encoding="UTF-8" ?>
<proxy name="VFS_RTDB_Proxy" serviceGroup="" startOnLoad="true" trace="enable" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<payloadFactory media-type="json">
<format>{rtdatas:$1}</format>
<args>
<arg expression="get-property('rtDataSets')" />
</args>
</payloadFactory>
<send>
<endpoint>
<address format="rest" statistics="enable" trace="enable" uri="http://211.154.164.28:9666/services/oge/vzdb/post/history" />
</endpoint>
</send>
</inSequence>
</target>
<parameter name="transport.vfs.Streaming">true</parameter>
<parameter name="transport.PollInterval">2</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.ActionAfterProces">MOVE</parameter>
<parameter name="transport.vfs.FileURI">D:\exportRTDB</parameter>
<parameter name="transport.vfs.FileURI">G:\MoveAfterFailure</parameter>
<parameter name="transport.vfs.MoveAfterFailure">G:\MoveAfterFailure</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
</proxy>
&#13;
为什么Send Mediator不执行?当我设置包含在Call Mediator中的Address Endpoint时,它也不会执行。我该如何解决这个问题?
当包含在Call Mediator中时,我收到以下错误:
[2016-03-30 20:31:25,550] INFO - BuilderUtil OMException in getSOAPBuilder org.apache.axiom.soap.SOAPProcessingException:首先 元素必须包含本地名称Envelope,但是找到了html 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:305) 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:252) 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:234) 在org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249) 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204) 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder。(StAXSOAPModelBuilder.java:154) 在org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder。(StAXSOAPModelBuilder.java:140) 在org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:659) 在org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:206) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:146) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:109) 在org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:68) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:348) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445) 在org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) 在org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) 在org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:254) 在org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:175) 在org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:113) 在org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:85) 在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185) 在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328) at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:751) at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:407) 在org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:177) 在org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:124) at org.apache.axis2.transport.base.AbstractPollingTransportListener $ 1 $ 1.run(AbstractPollingTransportListener.java:67) 在org.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(NativeWorkerPool.java:172) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)[2016-03-30 20:31:25,635] INFO - BuilderUtil剩余输入流:[] [2016-03-30 20:31:25,635] WARN - FaultHandler ERROR_CODE:401000 [2016-03-30 20:31:25,651]警告 - FaultHandler ERROR_MESSAGE:首先 元素必须包含本地名称Envelope,但是找到了html [2016-03-30 20:31:25,651]警告 - FaultHandler ERROR_DETAIL: [2016-03-30 20:31:25,651]警告 - FaultHandler ERROR_EXCEPTION: org.apache.synapse.SynapseException:执行调用时出错 operation [2016-03-30 20:31:25,651] WARN - FaultHandler FaultHandler :org.apache.synapse.mediators.MediatorFaultHandler@4207ac5d [2016-03-30 20:31:25,651] WARN - MediatorFaultHandler执行错误 处理程序介体:org.apache.synapse.mediators.base.SequenceMediator
答案 0 :(得分:0)
以下是更改代理配置,获取错误按照配置;我没有将代理发布为WSDL,所以我没有找到网页....
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="VFS_RTDB_Proxy" serviceGroup="" startOnLoad="true"
trace="enable" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
<localEntry key="smooks-key" src="file:repository/samples/resources/smooks/smooks-config.xml"/>
<target>
<inSequence>
<class description="" name="cn.oge.kdm.mediator.RTDataSetMediator"/>
<!-- <log description="" level="custom">
<property expression="get-property('rtDataSets')" name="RTDATASET"/>
</log> -->
<payloadFactory media-type="json">
<format>{"rtdatas":$1}</format>
<args>
<arg expression="get-property('rtDataSets')"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint>
<address statistics="enable" trace="enable" uri="http://211.154.164.98:9766/services/oge/vzdb/post/history"/>
</endpoint>
</call>
</inSequence>
<outSequence>
<!-- <log level="full"/> -->
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<property
expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')"
name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
</outSequence>
<faultSequence>
<!-- <class description="" name="cn.oge.kdm.mediator.DecompressionMediator"/> -->
<log level="full"/>
</faultSequence>
</target>
<parameter name="transport.vfs.Streaming">true</parameter>
<parameter name="transport.PollInterval">2</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.ActionAfterProces">MOVE</parameter>
<parameter name="transport.vfs.FileURI">D:\exportRTDB</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:ftp://ProEditor:****@211.154.164.99/</parameter>
<parameter name="transport.vfs.MoveAfterFailure">G:\MoveAfterFailure</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
</proxy>