Camel Salesforce Proxy configuration

Solution In Progress - Updated -

Issue

So, the whole point for us to install R2P6, was the fact that the Salesforce component had a bug in the version which we were on and that didnt let us login (even when we bypassed the proxy).
Now, that we've patched our Fuse instance, we've deployed our application which uses this Camel Salesforce component, which works fine when we bypass the proxy, however, when we set the proxy on the SalesforceEndpointConfig class it doesnt care about it.
Here's how I set the proxy on the config -

package xxx.xxx.xxx.adapter.salesforce.v1

import org.apache.camel.component.salesforce.SalesforceEndpointConfig
import org.eclipse.jetty.client.Address
import org.eclipse.jetty.client.HttpClient

public class StaticSalesforceEndpointConfigFactory {

    public static SalesforceEndpointConfig getSalesforceConfig(String proxyHost, int proxyPort) {
        def config = new SalesforceEndpointConfig()
        config.setHttpClient(new HttpClient().setProxy(new Address(proxyHost, proxyPort)))
        return config
    }

}

And, here's how I set the SalesforceComponent bean -

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

        <property name="loginConfig">
            <bean class="org.apache.camel.component.salesforce.SalesforceLoginConfig">
                <property name="loginUrl" value="${salesforce.loginUrl}"></property>
                <property name="userName" value="${salesforce.userName}"></property>
                <property name="password" value="${salesforce.password}"></property>
                <property name="clientId" value="${salesforce.clientId}"></property>
                <property name="clientSecret" value="${salesforce.clientSecret}"></property>
                <property name="lazyLogin" value="true"></property>
            </bean>
        </property>
        <property name="config">
            <bean
                class="xxx.xxx.xxx.xxx.salesforce.v1.StaticSalesforceEndpointConfigFactory" factory-method="getSalesforceConfig">
                <argument value="${salesforce.http.proxy.host}" />
                <argument value="${salesforce.http.proxy.port}" />
            </bean>
        </property>
        <property name="packages" value="${sObjectDTOPackages}"></property>
    </bean>

Thoughts?

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.