Monday, May 23, 2016
How to Test SOAP API access with an oAuth acess Token
Step 1: Create a Salesforce Connected App
Step 2: Generate the access token with SOAP UI
1. Create a SOAP UI REST project
2. set the endpoint to https://test.salesforce.com
3. do a GET request once
4. create Auth profile(https://www.soapui.org/oauth2/reference/oauth-2.html): This will require Client ID, Client Secret, Auth URI , Access Token URI and the rollback URI
5. generate the Token with clicking "Get Access Token" button
6. Copy, generated access token from the Acess token test field
Step 3 : Make requests to SOAP API
1. Copy enterprise/Partner WSDL and generate/create new SOAP UI SOAP Project
2. Change the endpoint to exact salesforce instance URL of the request (eg: https://cs24.salesforce.com/services/Soap/c/36.0/0DF19000000Cb5v)
3. Include the copied Access Token in the <urn:sessionId></urn:sessionId> tag, and modify the request XML as required
4. Hurah! it works!!
Resources Used: https://developer.salesforce.com/blogs/developer-relations/2011/03/oauth-and-the-soap-api.html
https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_at_Salesforce.com?language=en
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm
http://blog.deadlypenguin.com/blog/2012/04/13/salesforce-and-soapui-using-the-default-query-method/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment