Search code examples
phpapiwsdlsalesforcesoap-client

Programmatically check Enterprise WSDL against Salesforce


I'm building a custom SalesForce integration into my php application using the PHP SDK and the SOAP API. We have a Enterprise account.

My company frequently changes the custom objects inside of SalesForce. I'm worried that this might break my integration with our SalesForce account. Is there a way to verify programmatically that my WSDL (generated inside SalesForce) is still working?

I tried using the describeGlobal message, but this just seems to reflect what's inside my current WSDL (rather than checking with SalesForce).


Solution

  • Since your company frequently changes the custom objects then you should be using the Partner WSDL, not Enterprise. Enterprise is used for non changing or slowly changing orgs. Basically, a strongly typed WSDL. Partner is loosely typed so you can access all objects within the org and you gain flexibility but it requires more time for development.

    If you didn't want to stop using the enterprise WSDL, you could use both. Use the partner to issue the describeglobal call to detect changes, download the new WSDL, compile and do what you need with it.