+ Start a Discussion

passing credentials to another application problem


I've got a web application which currently requires a Salesforce.com login a password.  I'd like to change it so it can use a passed in session id and server url from a custom link in salesforce.com.

I've coded it up, but when I try to retrieve an Account, I get the following exception:

System.InvalidOperationException: There is an error in XML document (1, 333). ---> System.InvalidOperationException: The specified type was not recognized: name='sObject', namespace='urn:sobject.partner.soap.sforce.com', at <result xmlns='urn:enterprise.soap.sforce.com'>.

This call works if the binding has been set up with a login, but not with a passed-in session id and server. 

I've just rebuilt my wsdl as well.

Any ideas?

You're probably mixing serverUrls, make sure the ServerURL merge field you picked (Enterprise xxx, or Partner xxx) matches the WSDL that you built your code against, it sounds like you might of picked the Partner server URL merge field, but actually have an Enterprise WSDL based app.
That was exactly it.  Thanks!