代理服务

时间:2017-10-19 11:58:52

标签: wso2 wso2esb

在我的代理服务中,我尝试使用JMS-ActiveMQ创建端点,并且它在uri中失败。我的JMS端点是否正确?我在工具380上使用ActiveMQ和EI611。

<?xml version="1.0" encoding="UTF-8"?>
<proxy name="CSVProcessor" startOnLoad="true" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
<target>
    <inSequence>
        <log level="full"/>
        <smooks config-key="smooks-config" description="GetSmooks">
            <input type="text"/>
            <output type="xml"/>
        </smooks>
        <log description="GetData" level="full"/>
        <datamapper config="gov:datamapper/NewConfig.dmc" description="MapPriceData" inputSchema="gov:datamapper/NewConfig_inputSchema.json" inputType="XML" outputSchema="gov:datamapper/NewConfig_outputSchema.json" outputType="XML"/>
        <log description="LogDataMapper" level="full"/>
        <property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
        <send>
            <endpoint>
                <address uri="jms:/foo.bar?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue"/>
            </endpoint>
        </send>
    </inSequence>
    <outSequence/>
    <faultSequence/>
</target>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="transport.vfs.FileURI">file://c:\test-data\in</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file://c:\test-data\original</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file://c:\test-data\out</parameter>
</proxy>

错误:

  

[2017-10-19 17:20:30,944] [] ERROR - ClientUtils系统无法从jms推断传输信息:/foo.bar?transport.jms.ConnectionFactoryJNDIName = QueueConnectionFactory&amp; java.naming.factory。 initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp; java.naming.provider.url = tcp:// localhost:61616&amp; transport.jms.DestinationType = queue URL。   [2017-10-19 17:20:30,948] []错误 - Axis2Sender发送消息时出现意外错误   org.apache.axis2.AxisFault:系统无法从jms推断传输信息:/foo.bar?transport.jms.ConnectionFactoryJNDIName = QueueConnectionFactory&amp; java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp; java.naming.provider.url = tcp:// localhost:61616&amp; transport.jms.DestinationType =队列URL。           at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81)           在org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:288)           at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:249)           在org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)           在org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)           在org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)           在org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)           at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)           at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)           在org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)           在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)           在org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)           at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:213)           在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:824)           at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:472)           在org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188)           at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134)           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:1149)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)           在java.lang.Thread.run(Thread.java:748)   [2017-10-19 17:20:30,958] [] WARN - EndpointContext端点:地址为jms的AnonymousEndpoint:/foo.bar?transport.jms.ConnectionFactoryJNDIName = QueueConnectionFactory&amp; java.naming.factory.initial = org.apache.activemq .jndi.ActiveMQInitialContextFactory&amp; java.naming.provider.url = tcp:// localhost:61616&amp; transport.jms.DestinationType = queue将被标记为SUSPENDED,因为它失败

1 个答案:

答案 0 :(得分:1)

好的,那是我的坏事。

我没有完全取消注意axis2.xml中的以下条目(在C:\ wso2ei-6.1.1 \ conf \ axis2中),这导致了这个错误。我取消了对前导subseconds的注释,但没有注释尾随的<!--。肯定是个白痴。

-->

取消注释后,根据需要将从源CSV文件转换为新XML格式的数据发送到ActiveMQ的目标jms队列。