[
https://issues.apache.org/jira/browse/CAMEL-8269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dhiraj Bokde closed CAMEL-8269.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.15.0
2.14.2
Added support for apexCall operation. See [test
routes|https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java#L507-L524]
for endpoint uri formats supported, and [test
invocation|https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java#L306-L393]
for usage example.
The APEX call supports URI parameters delimited with braces '{}', and query
parameters either in the URI, or in headers with 'apexQueryParam.' prefix. The
URI can be specified as part of the endpoint URI or in the option 'apexUrl'.
The option apexMethod specifies the HTTP method to use.
Note that both JSON and XML message formats require a user defined wrapper
request class, while only XML message format MUST use a user defined response
type annotated with @XStreamAlias("response") with a single field 'type'. Both
the request and response types MUST extend AbstractDTOBase or an SObject class.
The component's URI options apexMethod, apexUrl, and support for URI or header
based query params should allow invoking any APEX REST endpoint that the user
could design.
> camel-salesforce: support for Salesforce Apex API
> -------------------------------------------------
>
> Key: CAMEL-8269
> URL: https://issues.apache.org/jira/browse/CAMEL-8269
> Project: Camel
> Issue Type: New Feature
> Components: camel-salesforce
> Affects Versions: 2.14.1
> Environment: n/a
> Reporter: Daniel Pocock
> Assignee: Dhiraj Bokde
> Labels: rest, salesforce
> Fix For: 2.14.2, 2.15.0
>
>
> Salesforce provides a service that they call the "Apex" API.
> Using Apex, a developer can write a script and upload it into Salesforce.com
> and have it executed in the server, similar to putting a stored procedure
> into a database. The Apex language is very similar to Java and likely to be
> very accessible to Camel developers.
> Here is an example:
> http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm
> Notice that each method implementd in the Apex system can define new URLs for
> handling REST requests. The URL, the format of input data and the format of
> the return value are arbitrary and at the discretion of the developer. It is
> not uncommon for developers to use SObjects as input or output and the
> existing DTOs from the camel-salesforce component would be suitable for
> interaction with Apex.
> A typical use case for the Apex API is implementing the convertLead method
> for REST. The Salesforce SOAP API provides a mechanism for developers to
> request lead conversion. The Salesforce REST API does not have the
> convertLead() method. The simplest and most common way to work around this
> limitation is to implement convertLead() in Apex, here is an example:
> http://stackoverflow.com/questions/19663119/is-there-any-rest-service-available-in-saleforce-to-convert-leads-into-accounts
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)