转化骡子1.3“;模型";Mule 3等效元件
我正在将Mule 1.3应用程序升级到Mule 3.2.1(最新版本)。Mule 1.3配置文件有一个“model”元素和许多“Mule描述符”子元素转化骡子1.3“;模型";Mule 3等效元件,mule,Mule,我正在将Mule 1.3应用程序升级到Mule 3.2.1(最新版本)。Mule 1.3配置文件有一个“model”元素和许多“Mule描述符”子元素 <model name="theModel"> <mule-descriptor name="theName" implementation="com.company.SomeClass"> <inbound-router> &
<model name="theModel">
<mule-descriptor name="theName" implementation="com.company.SomeClass">
<inbound-router>
<endpoint address="servlet://service/foo" transformers="ACustomTransformer" responseTransformers="AnotherCustomTransformer" />
<endpoint address="vm://anEndpoint"/>
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter">
<endpoint address="Authenticator">
<properties>
<property name="propName" value="propValue" />
</properties>
</endpoint>
<filter expression="/data = null" className="org.mule.routing.filters.xml.JXPathFilter" />
</router>
<router className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="RequestValidator" />
</router>
</outbound-router>
<properties>
<property name="someProp" value="someValue" />
</properties>
</mule-descriptor>
<!-- more <mule-descriptor> elements -->
</model>
3)另一个mule描述符在其
元素中有一个“matchAll”属性。如何将其转换为Mule 3流
<mule-descriptor name="theName" implementation="com.company.SomeClass">
<inbound-router>
<endpoint address="servlet://theInboundEndpoint" />
</inbound-router>
<outbound-router matchAll="true">
<router className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="firstOutboundEndpoint" />
</router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter" transformer="MyTransformer">
<endpoint address="vm://secondOutboundEndpoint" />
<filter pattern="Error*" className="org.mule.routing.filters.WildcardFilter" />
</router>
</outbound-router>
</mule-descriptor>
已被弃用型号
已替换flow
mule描述符
<flow name="theName">
<composite-source>
<vm:inbound-endpoint path="anEndpoint">
<transformer ref="ACustomTransformer" />
<response>
<transformer ref="AnotherCustomTransformer" />
</response>
</vm:inbound-endpoint>
<servlet:inbound-endpoint path="/service/foo" />
</composite-source>
<component>
<singleton-object class="com.company.SomeClass">
<property key="someProp" value="someValue" />
</singleton-object>
</component>
<outbound-endpoint ref="Authenticator">
<expression-filter expression="/data = null"
evaluator="jxpath" />
<property key="propName" value="propValue" />
</outbound-endpoint>
<outbound-endpoint ref="RequestValidator" />
</flow>
4) 您不能在流中声明全局端点,并且需要为端点和流使用不同的名称,因此实际的Mule 3配置等效为:
<vm:endpoint name="TheEndpointName" path="theEndpointAddress" />
<flow name="TheFlowName">
<inbound-endpoint ref="TheEndpointName" />
<component>
<singleton-object class="..." />
</component>
</flow>
已被弃用型号
已替换flow
mule描述符
<flow name="theName">
<composite-source>
<vm:inbound-endpoint path="anEndpoint">
<transformer ref="ACustomTransformer" />
<response>
<transformer ref="AnotherCustomTransformer" />
</response>
</vm:inbound-endpoint>
<servlet:inbound-endpoint path="/service/foo" />
</composite-source>
<component>
<singleton-object class="com.company.SomeClass">
<property key="someProp" value="someValue" />
</singleton-object>
</component>
<outbound-endpoint ref="Authenticator">
<expression-filter expression="/data = null"
evaluator="jxpath" />
<property key="propName" value="propValue" />
</outbound-endpoint>
<outbound-endpoint ref="RequestValidator" />
</flow>
4) 您不能在流中声明全局端点,并且需要为端点和流使用不同的名称,因此实际的Mule 3配置等效为:
<vm:endpoint name="TheEndpointName" path="theEndpointAddress" />
<flow name="TheFlowName">
<inbound-endpoint ref="TheEndpointName" />
<component>
<singleton-object class="..." />
</component>
</flow>
嗨,大卫,我很感谢你的帮助。我还在研究mule描述符,很快会有更多的问题,毫无疑问……你介意接受这一个,并在转换过程中提出新的问题吗?顺便说一句,祝你好运!David我还不想接受,我还没有试过运行我的Mule应用程序。嗨,David,如果你有时间的话,我用一些后续问题编辑了这个问题。我没有创建新问题,因为这些问题仍然与转换
元素有关。请注意,从1.x配置中,我不确定某些端点是否引用了现有端点或是在本地用URL声明的(区别不清楚)。这就是为什么我混合使用ref
和URI以及特定于传输的端点来显示选项板的原因。你可能得把它们整理出来,挑选出适合你的案例的。嗨,大卫,我很感谢你的帮助。我还在研究mule描述符,很快会有更多的问题,毫无疑问……你介意接受这一个,并在转换过程中提出新的问题吗?顺便说一句,祝你好运!David我还不想接受,我还没有试过运行我的Mule应用程序。嗨,David,如果你有时间的话,我用一些后续问题编辑了这个问题。我没有创建新问题,因为这些问题仍然与转换
元素有关。请注意,从1.x配置中,我不确定某些端点是否引用了现有端点或是在本地用URL声明的(区别不清楚)。这就是为什么我混合使用ref
和URI以及特定于传输的端点来显示选项板的原因。你可能需要把它们整理出来,然后选择那些适用于你的案例的。
<mule-descriptor name="theName" implementation="org.mule.components.rest.RestServiceWrapper">
<inbound-router>
...
</inbound-router>
<properties>
<property name="urlFromMessage" value="true" />
</properties>
</mule-descriptor>
<flow name="theName">
<composite-source>
<vm:inbound-endpoint path="anEndpoint">
<transformer ref="ACustomTransformer" />
<response>
<transformer ref="AnotherCustomTransformer" />
</response>
</vm:inbound-endpoint>
<servlet:inbound-endpoint path="/service/foo" />
</composite-source>
<component>
<singleton-object class="com.company.SomeClass">
<property key="someProp" value="someValue" />
</singleton-object>
</component>
<outbound-endpoint ref="Authenticator">
<expression-filter expression="/data = null"
evaluator="jxpath" />
<property key="propName" value="propValue" />
</outbound-endpoint>
<outbound-endpoint ref="RequestValidator" />
</flow>
<flow name="theFlowName">
<inbound-endpoint ref="theInboundName" />
<component>
<singleton-object class="com.company.SomeClass" />
</component>
</flow>
<pattern:bridge name="theName"
inboundAddress="vm://theInboundAddress"
outboundAddress="vm://theOutboundAddress" />
<flow name="theName">
<servlet:inbound-endpoint path="/theInboundEndpoint" />
<component>
<singleton-object class="com.company.SomeClass" />
</component>
<all>
<outbound-endpoint ref="firstOutboundEndpoint" />
<processor-chain>
<transformer ref="MyTransformer" />
<wildcard-filter pattern="Error*" />
<vm:outbound-endpoint path="secondOutboundEndpoint" />
</processor-chain>
</all>
</flow>
<vm:endpoint name="TheEndpointName" path="theEndpointAddress" />
<flow name="TheFlowName">
<inbound-endpoint ref="TheEndpointName" />
<component>
<singleton-object class="..." />
</component>
</flow>
<http:rest-service-component serviceUrl="..." />
<http:rest-service-component serviceUrl="#[header:INBOUND:svcURL]" />