You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by shmahajan <sh...@persistent.co.in> on 2013/12/14 19:44:10 UTC

Configuration to use camel salesforce component

Hi,
I have created maven project to create conectivity with salesforce. 
Below is my camel context file. I have set dependency for all required camel
components along with camel salesforce plugin in pom.xml.  
But I don't understand how to set loginConfig for SalesForceComponent
defined in camel context.
Can you please help me with some example? 

<?xml version="1.0" encoding="UTF-8"?>


<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

<bean id="salesforce"
class="org.apache.camel.component.salesforce.SalesforceComponent"> 
</bean>

  <camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
        <description>here is a sample which processes the input files
         (leaving them in place - see the 'noop' flag)
         then performs content based routing on the message using
XPath</description>
        <from uri="file:src/data?noop=true"/>
        <choice>
            <when>
                <description>&lt;to
uri="file:target/messages/uk"/&gt;</description>
                <xpath>/person/city = 'London1'</xpath>
                <log message="UK message"/>
                <to uri="salesforce:upsertSObject?sObjectIdName=London1"/>
            </when>
            <otherwise>
                <log message="Other message"/>
                <to uri="file:target/messages/others"/>
            </otherwise>
        </choice>
    </route>
</camelContext>

</beans>






--
View this message in context: http://camel.465427.n5.nabble.com/Configuration-to-use-camel-salesforce-component-tp5744779.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Configuration to use camel salesforce component

Posted by Willem Jiang <wi...@gmail.com>.
We don’t have the salesforce share account. You need to have signup[1] first.
https://events.developerforce.com/signup

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 16, 2013 at 1:47:00 PM, shmahajan (shital_mahajan@persistent.co.in) wrote:
>  
> Thanks Claus.I will take a look at test code.
>  
> To establish conectivity with salesforce, do i need to make any  
> configurartion in my salesforce account?
>  
> Is any sample account provided by camel to test salesforce connectivity  
> similar to what is done for twitter?
> I am new to camel as well as salesforce. so donot know exaclty how  
> to
> proceed?
>  
> Regards
> Shital
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Configuration-to-use-camel-salesforce-component-tp5744779p5744816.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  


Re: Configuration to use camel salesforce component

Posted by shmahajan <sh...@persistent.co.in>.
Thanks Claus.I will take a look at test code.

To establish conectivity with salesforce, do i need to make any
configurartion in my salesforce account?

Is any sample account provided by camel to test salesforce connectivity
similar to what is done for twitter?
I am new to camel as well as salesforce. so donot know exaclty how to
proceed?

Regards
Shital



--
View this message in context: http://camel.465427.n5.nabble.com/Configuration-to-use-camel-salesforce-component-tp5744779p5744816.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Configuration to use camel salesforce component

Posted by Claus Ibsen <cl...@gmail.com>.
A good idea could be to take a look at some of the unit tests of
camel-salesforce in the source code


On Sat, Dec 14, 2013 at 7:44 PM, shmahajan
<sh...@persistent.co.in> wrote:
> Hi,
> I have created maven project to create conectivity with salesforce.
> Below is my camel context file. I have set dependency for all required camel
> components along with camel salesforce plugin in pom.xml.
> But I don't understand how to set loginConfig for SalesForceComponent
> defined in camel context.
> Can you please help me with some example?
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
> <bean id="salesforce"
> class="org.apache.camel.component.salesforce.SalesforceComponent">
> </bean>
>
>   <camelContext xmlns="http://camel.apache.org/schema/spring">
>     <route>
>         <description>here is a sample which processes the input files
>          (leaving them in place - see the 'noop' flag)
>          then performs content based routing on the message using
> XPath</description>
>         <from uri="file:src/data?noop=true"/>
>         <choice>
>             <when>
>                 <description>&lt;to
> uri="file:target/messages/uk"/&gt;</description>
>                 <xpath>/person/city = 'London1'</xpath>
>                 <log message="UK message"/>
>                 <to uri="salesforce:upsertSObject?sObjectIdName=London1"/>
>             </when>
>             <otherwise>
>                 <log message="Other message"/>
>                 <to uri="file:target/messages/others"/>
>             </otherwise>
>         </choice>
>     </route>
> </camelContext>
>
> </beans>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Configuration-to-use-camel-salesforce-component-tp5744779.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io