You need to sign in to do that
Don't have an account?
Peter Kemp
SOAP and wsdl problems
I have inherited a Salesforce C# project which was using an old wsdl written in 2005, and SOAP v7.0
In my attempt to bring it up to date I have used the new wsdl (SOAP v14.0) and rebuilt the references.cs output by wsdl.exe However, I can't get past the following error:
It says: System.Web.Services.Protocols.SoapException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from
login must be set in the SforceService
The system logs in correctly but it doesn't seem to get past this line. I've looked through the traces and everything seems in order. I'm really not quite sure what it is asking...
Help!
In my attempt to bring it up to date I have used the new wsdl (SOAP v14.0) and rebuilt the references.cs output by wsdl.exe However, I can't get past the following error:
Code:
public QueryResult query(string queryString)
{
object[] results = this.Invoke("query", new object[] {
queryString});
return ((QueryResult)(results[0]));
}
It says: System.Web.Services.Protocols.SoapException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from
login must be set in the SforceService
The system logs in correctly but it doesn't seem to get past this line. I've looked through the traces and everything seems in order. I'm really not quite sure what it is asking...
Help!
Message Edited by Peter Kemp on 11-25-2008 08:18 AM
Was tracing the binding values and there was a problem with the login details that didn't bring up an error, but failed to reset the URL to the returned value.
Thanks!
Pete
I'm having the same error but I can't find anything wrong with my code
20090327085203,Main | System.Web.Services.Protocols.SoapException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
{
binding = new STFtpDataSync.wsST.SforceService();binding.Timeout = 60000;
Debug.WriteLine("Logging in now...."); Console.WriteLine("Logging in now....");try
{
String SFUserName = Properties.Settings.Default.SFUserName; String SFPassword = Properties.Settings.Default.SFPassword;loginResult = binding.login(SFUserName, SFPassword);
Console.WriteLine("Logging in successfull");}
catch (Exception ex){
Debug.Write(ex.Message + ", please try again.\n\nHit return to continue...");LogError(ex.ToString());
Console.WriteLine("Logging in error : " + ex.ToString());
return false;}
Debug.WriteLine("\nThe session id is: " + loginResult.sessionId); Debug.WriteLine("\nThe new server url is: " + loginResult.serverUrl);binding.Url = loginResult.serverUrl;
binding.SessionHeaderValue = new STFtpDataSync.wsST.SessionHeader();binding.SessionHeaderValue.sessionId = loginResult.sessionId;
STFtpDataSync.wsST.GetUserInfoResult userInfo = loginResult.userInfo;
return true;}
Here this the full stacktrace
20090327085203,Main | System.Web.Services.Protocols.SoapException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at STFtpDataSync.wsST.SforceService.query(String queryString)
at STFtpDataSync.SF.CreateUserLookupTable()
at STFtpDataSync.SF.LoadLookupTables()
at STFtpDataSync.Program.Main(String[] args)