h1. *Salesforce Data Sources* |
Salesforce data sources use a Teiid specific JCA connector that is deployed into the AS 7.x {space-metadata-from:asVersionNumber} 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. |
Execute following command using [CLI|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI] 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. |
... |
Salesforce data sources use a Teiid specific JCA connector that is deployed into AS 7.2 (EAP 6.1 Alpha) 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.
Execute following command using CLI 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.
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
To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.
/subsystem=teiid:read-rar-description(rar-name=salesforce) |
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. |
Developer's Tip If the JBoss AS 7.x 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. |
Salesforce service data source may choose a particular CXF config file and port configuration. The ConfigFile 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.
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 Web Service Data Sources
See the CXF documentation for all possible configuration options.
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. |