Soap Mule ESB选择流控制路由

Soap Mule ESB选择流控制路由,soap,mule,esb,choice,mule-studio,Soap,Mule,Esb,Choice,Mule Studio,在Mule中,我有以下流程: 有一个选择流控件,用于测试输入并验证输入字符串是否等于“ctr1” <flow name="mediationFlow1" doc:name="mediationFlow1"> <file:inbound-endpoint path="C:\MuleStudio\SandBox\input" pollingFrequency="3000" responseTimeout="10000" doc:name="File"/&g

在Mule中,我有以下流程: 有一个选择流控件,用于测试输入并验证输入字符串是否等于“ctr1”

    <flow name="mediationFlow1" doc:name="mediationFlow1">
         <file:inbound-endpoint path="C:\MuleStudio\SandBox\input" pollingFrequency="3000" responseTimeout="10000" doc:name="File"/>
        <file:file-to-string-transformer doc:name="File to String"/>
        <choice doc:name="Choice">
            <when expression="payload=='ctr1'">
                <cxf:jaxws-client operation="find" serviceClass="services.port.PortWS" port="portWSPort" enableMuleSoapHeaders="true" doc:name="Port"/>
                <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8080/Actors/portWS" doc:name="portWS"/>
            </when>
            <otherwise >
                <cxf:jaxws-client operation="find" serviceClass="services.douane.DouaneWS" port="douaneWSPort" enableMuleSoapHeaders="true" doc:name="Douane"/>
                <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8080/Actors/douaneWS" doc:name="douaneWS"/>
            </otherwise>
        </choice>
       <file:outbound-endpoint path="C:\MuleStudio\SandBox\output" outputPattern="#[function:datestamp:dd-MM-yy]_#[function:systime].xml " responseTimeout="10000" doc:name="Outgoing File"/>
    </flow>
</mule>
我不确定它是否来自选择测试表达式? 虽然我找不到关于如何使用选择控制流的详细信息

谢谢你的帮助。
谢谢。

默认情况下,Mule会在流中应用大量转换器,以将有效负载转换为所需的格式

在没有选择路由器的情况下,它将返回的对象转换为xml字符串以写入文件。 但是对于choice router,程序员有责任提供一个转换器,将响应对象转换为XML字符串

在choice router之后和写入文件出站之前,将以下mule xml jaxb对象添加到xml transformer

 .....
    </otherwise>
 </choice>

 <xm:jaxb-object-to-xml-transformer name="ObjectToXML" jaxbContext-ref="MyJaxb"  returnClass="java.lang.String" encoding="UTF-8"/>
。。。。。

希望这能有所帮助。

默认情况下,Mule会在流中应用大量转换器,将有效负载转换为所需的格式

在没有选择路由器的情况下,它将返回的对象转换为xml字符串以写入文件。 但是对于choice router,程序员有责任提供一个转换器,将响应对象转换为XML字符串

在choice router之后和写入文件出站之前,将以下mule xml jaxb对象添加到xml transformer

 .....
    </otherwise>
 </choice>

 <xm:jaxb-object-to-xml-transformer name="ObjectToXML" jaxbContext-ref="MyJaxb"  returnClass="java.lang.String" encoding="UTF-8"/>
。。。。。
希望这有帮助