Search code examples
web-servicessoapwsdlsalesforce

Salesforce enterprise service wsdl and partner API token


Can you please let me know if it is possible to use partner API token in service generated from enterprise wsdl. The examples I was able to find seem to use partner wsdl (i.e. http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_header_calloptions.htm). In my SforceService class there is no CallOptions property where I could specify clientId (the token). I am using .NET.

Thank you in advance.


Solution

  • You can manually update the enterprise WSDL to include CallOptions and get it to work, but its not supported. The enterprise WSDL is particular to the organization that it was generated from, so generally its hard to correctly build an app that works for lots of different organizations with it. Its expected that partner apps are built with the partner WSDL which is the same for all organizations and designed to be able to build metadata driven apps with. (i.e. you can discover the orgs specific object & field customizations and take those into account)