Invoke through sample synapse config(API/ Sequence/ Proxy) using following steps :
- Download the salesforce REST connector from store.
Here, we use salesforce REST connector to maintain the access token and get the access token from the refresh token.
- Open the <ESB_HOME>/repository/conf/axis2/axis2.xml and add the <parameter name="HttpsProtocols">TLSv1.1,TLSv1.2</parameter> entry inside the PassThroughHttpSSLSender element as below :
- Start the WSO2 ESB Server.
- Navigate to the management console and deploy the downloaded connector.
- Click the Main tab on the Management Console, go to Manage -> Services and then click Proxy Service -> Custom Proxy. Click on switch to source view. Then add following and click on Save.
- Click the Main tab on the Management Console, go to Manage -> Services and then click List. Then click on “salesforceApex”. Under the Endpoints, you can find the http endpoint. With this http endpoint and the following request following payload, you can get the output. Here in this proxy service, we reuse the salesforce REST connector for refreshing the access token.