<html>
<head>
<base href="https://docs.jboss.org/author">
<link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://docs.jboss.org/author/display/TEIID/Salesforce+Data+Sources">Salesforce Data Sources</a></h2>
<h4>Page <b>edited</b> by <a href="https://docs.jboss.org/author/display/~rareddy">Ramesh Reddy</a>
</h4>
<div id="versionComment">
<b>Comment:</b>
TEIID-3493<br />
</div>
<br/>
<h4>Changes (2)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >{info} <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{warning} <br>As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.2 Final. <br>{warning} <br> <br></td></tr>
<tr><td class="diff-unchanged" >{tip:title=Developer's Tip} <br>If the JBoss AS {space-metadata-from:asVersionNumber} is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/salesforce" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done. <br>{tip} <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;"> <br>h2. Mutual Authentication <br> <br>If you need to connect to Salesforce using Mutual Authentication, follow the directions to setup Salesforce at [https://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_US] then configure the below CXF configuration file on the resource-adapter by adding following property to above cli script <br>{code} <br>/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=ConfigFile:add(value=${jboss.server.config.dir}/cxf-https.xml) <br>{code} <br>{code:title=cxf-https.xml} <br><beans xmlns="http://www.springframework.org/schema/beans" <br> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br> xmlns:sec="http://cxf.apache.org/configuration/security" <br> xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" <br> xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" <br> xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd"> <br> <br> <http-conf:conduit name="*.http-conduit"> <br> <http-conf:client ConnectionTimeout="120000" ReceiveTimeout="240000"/> <br> <http-conf:tlsClientParameters secureSocketProtocol="SSL"> <br> <sec:trustManagers> <br> <sec:keyStore type="JKS" password="changeit" file="/path/to/truststore.jks"/> <br> </sec:trustManagers> <br> </http-conf:tlsClientParameters> <br> </http-conf:conduit> <br></beans> <br>{code} <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h1><a name="SalesforceDataSources-SalesforceDataSources"></a><b>Salesforce Data Sources</b></h1>
<p>Salesforce data sources use a Teiid specific JCA connector that is deployed into AS 7.5 (EAP 6.4 Alpha) during installation. There are many ways to create the salesforce data source, using CLI,<a href="/author/display/TEIID/AdminShell" title="AdminShell">AdminShell</a>, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.</p>
<p>Execute following command using the <a href="/author/display/AS72/Admin+Guide#AdminGuide-RunningtheCLI">CLI</a> once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
batch
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS:add(jndi-name=java:/sfDS, class-name=org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=URL:add(value=https://www.salesforce.com/services/Soap/u/22.0)
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=username:add(value={user})
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=password:add(value={password})
/subsystem=resource-adapters/resource-adapter=salesforce:activate
runbatch
</pre>
</div></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
/subsystem=teiid:read-rar-description(rar-name=salesforce)
</pre>
</div></div></td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Developer's Tip</b><br />If the JBoss AS 7.5 (EAP 6.4 Alpha) is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/salesforce" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.</td></tr></table></div>
<h2><a name="SalesforceDataSources-MutualAuthentication"></a>Mutual Authentication</h2>
<p>If you need to connect to Salesforce using Mutual Authentication, follow the directions to setup Salesforce at <a href="https://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_US" class="external-link" rel="nofollow">https://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_US</a> then configure the below CXF configuration file on the resource-adapter by adding following property to above cli script</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=ConfigFile:add(value=${jboss.server.config.dir}/cxf-https.xml)
</pre>
</div></div>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>cxf-https.xml</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd">
<http-conf:conduit name="*.http-conduit">
<http-conf:client ConnectionTimeout="120000" ReceiveTimeout="240000"/>
<http-conf:tlsClientParameters secureSocketProtocol="SSL">
<sec:trustManagers>
<sec:keyStore type="JKS" password="changeit" file="/path/to/truststore.jks"/>
</sec:trustManagers>
</http-conf:tlsClientParameters>
</http-conf:conduit>
</beans>
</pre>
</div></div>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://docs.jboss.org/author/display/TEIID/Salesforce+Data+Sources">View Online</a>
|
<a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=55476957&revisedVersion=9&originalVersion=8">View Changes</a>
|
<a href="https://docs.jboss.org/author/display/TEIID/Salesforce+Data+Sources?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>