You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by brijesh <br...@gmail.com> on 2009/10/21 09:06:27 UTC
smx-eip and camel
Hi there ,
I am in the process of converting my existing smx-eip to smx-camel , I am
new to camel.
Can anybody guide me how to convert following eip configuration(xbean below)
to camel??. following configuration containts content based router,
pipeline and static reciepient list in single xbean. can we have similar
configuration in camel DSL?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:imp="http://xmlns.oracle.com/EkaPoImportProcess"
xmlns:impSo="http://xmlns.oracle.com/EkaSoImportProcess"
xmlns:com="com.ekaplus.commons.document"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
xmlns:lstn="http://www.ekaplus.com/ListenerEvent/"
xmlns:bupa="http://SOAP_to_File_BUPA_Create"
xmlns:modad="http:\\SOAP_to_RFC_BUPA_Address_Change"
xmlns:invmod="http://SOAP_to_RFC_Customer_Invoice_Change"
xmlns:inc="htttp:\\SOAPtoZBAPI_Vendor_Invoice_Create_New"
xsi:schemaLocation="http://servicemix.apache.org/eip/1.0
http://servicemix.apache.org/schema/servicemix-eip-3.2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<eip:content-based-router service="nte:gatewayRouter"
endpoint="gatewayRouterEP">
<eip:rules>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate
xpath="/com:GenericDocument/@document_Id = 'BUPA_CREATE'"
namespaceContext="#nsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target
service="nte:bupaCreateEIPService" />
</eip:target>
</eip:routing-rule>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate
xpath="/com:GenericDocument/@document_Id = 'BUPA_MODIFY'"
namespaceContext="#nsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target
service="nte:notifyeventSAPInvoiceEIPService" />
</eip:target>
</eip:routing-rule>
</eip:rules>
</eip:content-based-router>
<!-- EIP for BUPA create service -->
<eip:pipeline service="nte:bupaCreateEIPService"
endpoint="bupaCreateEIPServiceEP">
<eip:transformer>
<eip:exchange-target service="nte:transformToSapBp" />
</eip:transformer>
<eip:target>
<eip:exchange-target
service="bupa:MI_OBA_SOAP_Input_BUPA_CreateService" />
</eip:target>
</eip:pipeline>
<!-- EIP for invoice create service -->
<eip:static-routing-slip
service="nte:notifyeventSAPInvoiceEIPService"
endpoint="nte:notifyeventSAPInvoiceEP">
<eip:targets>
<eip:exchange-target service="nte:transformToSapGL" />
<eip:exchange-target
service="inc:MI_OBS_SOAP_Req_Res_Vendor_Invoice_Create_NewService" />
<eip:exchange-target
service="nte:createMappingFromSAPInvRspnse" />
</eip:targets>
</eip:static-routing-slip>
<!-- namespace configuration for generic document -->
<eip:namespace-context id="nsContext">
<eip:namespaces>
<eip:namespace prefix="com">com.ekaplus.commons.document</eip:namespace>
<eip:namespace
prefix="nte">http://www.ekaplus.com/NotifyEvent/</eip:namespace>
</eip:namespaces>
</eip:namespace-context>
</beans>
--
View this message in context: http://www.nabble.com/smx-eip-and-camel-tp25987471p25987471.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: smx-eip and camel
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You can take a look at the Camel Content Based Router which covers
most of your use case
http://camel.apache.org/content-based-router.html
On Wed, Oct 21, 2009 at 9:06 AM, brijesh <br...@gmail.com> wrote:
>
> Hi there ,
>
> I am in the process of converting my existing smx-eip to smx-camel , I am
> new to camel.
> Can anybody guide me how to convert following eip configuration(xbean below)
> to camel??. following configuration containts content based router,
> pipeline and static reciepient list in single xbean. can we have similar
> configuration in camel DSL?
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
> xmlns:imp="http://xmlns.oracle.com/EkaPoImportProcess"
> xmlns:impSo="http://xmlns.oracle.com/EkaSoImportProcess"
> xmlns:com="com.ekaplus.commons.document"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
> xmlns:lstn="http://www.ekaplus.com/ListenerEvent/"
> xmlns:bupa="http://SOAP_to_File_BUPA_Create"
> xmlns:modad="http:\\SOAP_to_RFC_BUPA_Address_Change"
> xmlns:invmod="http://SOAP_to_RFC_Customer_Invoice_Change"
> xmlns:inc="htttp:\\SOAPtoZBAPI_Vendor_Invoice_Create_New"
> xsi:schemaLocation="http://servicemix.apache.org/eip/1.0
> http://servicemix.apache.org/schema/servicemix-eip-3.2.2.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>
> <eip:content-based-router service="nte:gatewayRouter"
> endpoint="gatewayRouterEP">
> <eip:rules>
> <eip:routing-rule>
> <eip:predicate>
> <eip:xpath-predicate
> xpath="/com:GenericDocument/@document_Id = 'BUPA_CREATE'"
> namespaceContext="#nsContext" />
> </eip:predicate>
> <eip:target>
> <eip:exchange-target
> service="nte:bupaCreateEIPService" />
> </eip:target>
> </eip:routing-rule>
> <eip:routing-rule>
> <eip:predicate>
> <eip:xpath-predicate
> xpath="/com:GenericDocument/@document_Id = 'BUPA_MODIFY'"
> namespaceContext="#nsContext" />
> </eip:predicate>
> <eip:target>
> <eip:exchange-target
> service="nte:notifyeventSAPInvoiceEIPService" />
> </eip:target>
> </eip:routing-rule>
> </eip:rules>
> </eip:content-based-router>
>
>
> <!-- EIP for BUPA create service -->
> <eip:pipeline service="nte:bupaCreateEIPService"
> endpoint="bupaCreateEIPServiceEP">
> <eip:transformer>
> <eip:exchange-target service="nte:transformToSapBp" />
> </eip:transformer>
> <eip:target>
> <eip:exchange-target
> service="bupa:MI_OBA_SOAP_Input_BUPA_CreateService" />
> </eip:target>
> </eip:pipeline>
>
>
> <!-- EIP for invoice create service -->
> <eip:static-routing-slip
> service="nte:notifyeventSAPInvoiceEIPService"
> endpoint="nte:notifyeventSAPInvoiceEP">
> <eip:targets>
> <eip:exchange-target service="nte:transformToSapGL" />
> <eip:exchange-target
> service="inc:MI_OBS_SOAP_Req_Res_Vendor_Invoice_Create_NewService" />
> <eip:exchange-target
> service="nte:createMappingFromSAPInvRspnse" />
> </eip:targets>
> </eip:static-routing-slip>
>
>
> <!-- namespace configuration for generic document -->
> <eip:namespace-context id="nsContext">
> <eip:namespaces>
> <eip:namespace prefix="com">com.ekaplus.commons.document</eip:namespace>
> <eip:namespace
> prefix="nte">http://www.ekaplus.com/NotifyEvent/</eip:namespace>
> </eip:namespaces>
> </eip:namespace-context>
> </beans>
> --
> View this message in context: http://www.nabble.com/smx-eip-and-camel-tp25987471p25987471.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus