Salesforce Authentication with Oracle SOA ("Exception-driven Authentication")
In this Blog , I will be sharing a different approach we followed in EAI (BPEL) to invoke the Salesforce Services. The requirement was to invoke Salesforce REST API which uses
Hence BPEL need not to perform the SFDC Login call for every incoming request.[Guessed it right!! we need Cache it internally]
The approach was -
"Exception driven Authentication " where in,Salesforce login flow would be only triggered in case of INVALID SESSION exception, while making call to salesforce REST API.
The Login Scope ensure that once the
SFDC Login retrieves a new session Id, it replays the Salesforce REST API flow, but this time using the new session Id,expecting the same to work this time.
for the fact that salesforce session id would remain active for next 8 hours, We also cache the sessionid in in the Xref table.,so that a regular look-up and reuse of the session can be done for all subsequent request that follows.
SF Login + Caching done in case of Invalid-session |
I chose to use Xref tables because,felt that this was right place to dynamically update and retrieve the session-Id as per demand.
[.....but again,you might follow a different approach to store the same as in a global Variable or property file..but never in a DVM- definitely this is not meant to store any dynamic/configuration data :) ]
Hi,Can you please throw some light on how to login to salesforce using BPEL via REST API. I have accomplished the same using SOAP but am struggling in case of REST API.Regards,Monika Ahuja
ReplyDeletePlease clarify whether you need make a 1.Salesforce Login from BPELOR2.REST API invocation from BPELfor 1. you need to use SOAP Service invocation from BPLE on Salesforce enterprise WSDL.and for2. I have created a custom java class with with a static method HTTPCaller()making MyClass.HTTPCaller() from my BPEL java embedding.
ReplyDelete