function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shenwei LiuShenwei Liu 

Access SOAP API from Developer's Local Machine

My company has apps integrated with the Salesforce SOAP API. I’m doing some major upgrade for moving the apps from the Oracle Service Bus to .NET WCF Services. I’m just working on the dev environment now. The existing accounts are server location based (no security token is needed). For my prototype work, after successfully calling API functions with .NET code using my personal Salesforce developer account, I need to make API calls from my local machine using the company’s Salesforce development accounts. Note that I cannot login to the Salesforce.com with browsers using any company’s Salesforce development account. How can I make such API calls work from my local dev machine? Please suggest all possible approaches so that I can escalate the issue to high-level management teams for a solution. Thanks.
pconpcon
I would start by looking at the sample SOAP messages [1] and working from there.  You will need someone to login to the developer sandbox at least once to generate either the Enterprise WSDL or the Partner WSDL for you, since this cannot be accessed any way other than via the web ui.

The SOAP UI is farily straight forward to use.  I have some examples you can see here [2-4] that are using SOAPui but the concept can be moved to any SOAP framework you are comfortable with.

[1] https://developer.salesforce.com/page/Sample_SOAP_Messages
[2] http://blog.deadlypenguin.com/blog/2012/02/03/salesforce-and-soapui/
[3] http://blog.deadlypenguin.com/blog/2012/04/13/salesforce-and-soapui-using-the-default-query-method/
[4] http://blog.deadlypenguin.com/blog/2012/08/26/nulling-fields-in-salesforce-with-soapui/
Shenwei LiuShenwei Liu
Hi Pcon, I might not make my question clear. My company has existing apps integrated with the Salesforce SOAP API. We already have the Enterprise WSDL and others specifically for our company’s apps. I tried to use the company’s Salesforce accounts to access the API functions from my local machine but it failed. It’s fine to access the API from the server boxes. I think that the accounts I use are location/IP based. The server boxes are registered from the Salesforce. I need to use my local machine for the development work. Is there any suggested approach or setup? For example, requesting for adding an account by the company’s Salesforce administrator that is not location based and I can use from my local machine (with a security token attached to the password), or configurating the company’s Salesforce development environment to allow developers to access the Salesforce API for the company’s WSDL from their own local machines. Thanks, Shenwei Shenwei Liu | Contractor | +1 973 422 3263 (tel) | Shenwei.Liu@cit.com
pconpcon
You should be able to do it one of two ways (assuming that the account you are using for development has the proper API access).

1) Add your developer machines public IP address to the whitelist.  This is something that any administrator should be able to do by going to setup -> security controls -> network access and adding a new trusted IP
2) Logging in with password & token, if your system is not on the trusted IP range you should be able to combine the users password and it's security token together and providing that as the "password" to any SOAP login calls.

For more info on the "API Enabled" permssion, see here: http://www.salesforce.com/developer/docs/api/Content/sforce_api_concepts_security.htm