<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;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>
        <br/>
                         <h4>Changes (18)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. {*}Salesforce Data Sources{*} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. *Salesforce Data Sources* <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Salesforce data sources use a Teiid specific JCA connector &quot;teiid-connector-salesforce.rar&quot;, which is deployed into the AS 7.x during installation. There are many ways to create the salesforce data source, using CLI,[AdminShell], admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes. <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Execute following command <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">using&amp;nbsp;[CLI|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI]&amp;nbsp;once</span> <span class="diff-added-words"style="background-color: #dfd;">using [CLI|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI] once</span> 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 &quot;connection-definitions&quot; command below. Edit the JNDI name to match the JNDI name you used in VDB. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;"> <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>batch <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS:add(archive=teiid-connector-salesforce.rar, transaction-support=NoTransaction) <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS:add(jndi-name=java:/sfDS,</span> <span class="diff-added-words"style="background-color: #dfd;">/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS:add(jndi-name=java:/sfDS,</span> class-name=org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory, enabled=true, use-java-context=true) <br><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=URL:add(value=https://www.salesforce.com/services/Soap/u/22.0)</span> <span class="diff-added-words"style="background-color: #dfd;">/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=URL:add(value=https://www.salesforce.com/services/Soap/u/22.0)</span> <br><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=username:add(value={user})</span> <span class="diff-added-words"style="background-color: #dfd;">/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=username:add(value={user})</span> <br><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=password:add(value={password})</span> <span class="diff-added-words"style="background-color: #dfd;">/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=password:add(value={password})</span> <br><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS:enable</span> <span class="diff-added-words"style="background-color: #dfd;">/subsystem=resource-adapters/resource-adapter=salesforce:activate</span> <br></td></tr>
            <tr><td class="diff-unchanged" >runbatch <br>{code} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{info} <br>To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI. <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">{code}<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">/subsystem=teiid:read-rar-description(rar-name=teiid-connector-salesforce.rar){code}&amp;nbsp;{info}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">/subsystem=teiid:read-rar-description(rar-name=salesforce) <br>{code} <br>{info} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{warning} <br></td></tr>
            <tr><td class="diff-changed-lines" >As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.2 <span class="diff-changed-words">Final.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{warning}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{warning} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{tip:title=Developer&#39;s Tip} <br></td></tr>
            <tr><td class="diff-changed-lines" >If the JBoss AS 7.x is running in standalone mode, you can also manually edit the &quot;&lt;jboss-install&gt;/standalone/configuration/standalone-teiid.xml&quot; file and add the XML configuration defined in &quot;&lt;jboss-install&gt;/docs/teiid/datasources/salesforce&quot; directory under &quot;resource-adapters&quot; subsystem. Shutdown the server before you edit this file, and restart after the modifications are <span class="diff-changed-words">done.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{tip}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{tip} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. {*}CXF Configuration{*} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. *CXF Configuration* <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >Salesforce service data source may choose a particular CXF config file and port configuration. <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">The&amp;nbsp;{{ConfigFile}}&amp;nbsp;config</span> <span class="diff-added-words"style="background-color: #dfd;">The {{ConfigFile}} config</span> property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>Only 1 port configuration can be used by this data source. The namespace URI for the QName in your config file should be &quot;urn:partner.soap.sforce.com&quot;, with configuration name &quot;Soap&quot;. For sample cxf configuration file and details on configuration see&amp;nbsp;[Web Service Data Sources] <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >See <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the&amp;nbsp;[CXF documentation|http://cxf.apache.org/docs/]&amp;nbsp;for</span> <span class="diff-added-words"style="background-color: #dfd;">the [CXF documentation|http://cxf.apache.org/docs/] for</span> all possible configuration options. <br></td></tr>
            <tr><td class="diff-unchanged" >{note} <br></td></tr>
            <tr><td class="diff-changed-lines" >The CXF configuration in Salesforce data source is only used for http bus configuration not for purposes of ws-security, Salesforce has its own security <span class="diff-changed-words">authentication.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{note}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note} <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 "teiid-connector-salesforce.rar", which is deployed into the AS 7.x 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 <a href="https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI" class="external-link" rel="nofollow">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='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>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.</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.x is running in standalone mode, you can also manually edit the "&lt;jboss-install&gt;/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "&lt;jboss-install&gt;/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>

<h3><a name="SalesforceDataSources-CXFConfiguration"></a><b>CXF Configuration</b></h3>

<p>Salesforce service data source may choose a particular CXF config file and port configuration. The <tt>ConfigFile</tt> config property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used.</p>

<p>Only 1 port configuration can be used by this data source. The namespace URI for the QName in your config file should be "urn:partner.soap.sforce.com", with configuration name "Soap". For sample cxf configuration file and details on configuration see&nbsp;<a href="/author/display/TEIID/Web+Service+Data+Sources" title="Web Service Data Sources">Web Service Data Sources</a></p>

<p>See the <a href="http://cxf.apache.org/docs/" class="external-link" rel="nofollow">CXF documentation</a> for all possible configuration options.</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The CXF configuration in Salesforce data source is only used for http bus configuration not for purposes of ws-security, Salesforce has its own security authentication.</td></tr></table></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=3&originalVersion=2">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Salesforce+Data+Sources?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>