Im将1 Mule 1.3申请升级至3.2.1(最新版本)。 Mule 1.3 config文档有“模版”元素,有多个“单元-描述器”。
<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卷的对应内容? 感谢。
EDIT - 5/29/2012
<>1> 一些 mu字器的rou形形形形形形色色。
<mule-descriptor name="theName" implementation="com.company.SomeClass">
<inbound-router>
<endpoint address="theName" />
</inbound-router>
</mule-descriptor>
如何将这些流动转化为第3卷流动? 当我利用你的答复中的信息将这些流动转化为流动时,我收到关于启动的错误信息,这似乎表明,由于流动仍在创造(如循环依赖):
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ref:RequestValidator.20 : Cannot resolve reference to bean RequestValidator while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name RequestValidator : Cannot create inner bean (inner bean) of type [org.mule.config.spring.factories.InboundEndpointFactoryBean] while setting bean property messageSource ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name (inner bean) : 1 constructor arguments specified but no matching constructor found in bean (inner bean) (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
<>2> 1名 mu-descriptor将“彩虹”级改为“彩虹”级。 如何处理这些问题? Mule 3中不存在这一类。
<mule-descriptor name="theName" implementation="org.mule.components.simple.BridgeComponent">
<inbound-router>
<endpoint address="vm://theInboundAddress" />
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter">
<endpoint address="vm://theOutboundAddress" />
</router>
</outbound-router>
</mule-descriptor>
3) Another mule-descriptor has a "matchAll" attribute in its <outbound-router>
element. How should this be converted to a Mule 3 flow?
<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>
<>4> Mule 1.x config有一手<endpoint-identifier>
,其名称与<mule-descriptor>
s。 这些名字也作为终端地址在<mule-descriptor>
上使用。 例如:
<endpoint-identifiers>
<endpoint-identifier name="TheEndpointName" value="vm://theEndpointAddress" />
</endpoint-identifiers>
...
<model name="...">
<mule-descriptor name="TheEndpointName" implementation="...">
<inbound-router>
<endpoint address="TheEndpointName" />
</inbound-router>
...
</mule-descriptor>
...
</model>
My guess is that the Mule 3 equivalent should look like the code below. Is this correct?
<flow name="TheEndpointName">
<!--
My first guess was:
<inbound-endpoint ref="TheEndpointName" />
-->
<vm:inbound-endpoint path="theEndpointAddress" />
...
</flow>
再次感谢你。
EDIT 5/30/2012
<>5> 一些 mu字器使用<代码>RestserviceWrapper类别从Mule API。 当我把这段话转换成“第3号”(<代码><流程和>;时,我发现这一错误:
The required object/property serviceUrl is null
我注意到,Mule 1.x config的 mu描述人将财产称为“urlFromMessage”,这似乎说,除了在XML汇卷中提供的URL之外,它将作为财产提供给Mule电文。 但是,在《<代码>的Mule 3版中不存在“urlFromMessage”财产。 休息服务:代码>。 我是否应该使用Mule 3的不同组成部分类别? 由于这一类别是穆莱普文的一部分,我是否应当使用标准XML标签? 感谢。
<mule-descriptor name="theName" implementation="org.mule.components.rest.RestServiceWrapper">
<inbound-router>
...
</inbound-router>
<properties>
<property name="urlFromMessage" value="true" />
</properties>
</mule-descriptor>