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
ArunSunArunSun 

UNKNOWN_EXCEPTION: Destination URL not reset

Hi all,

 

I am sending a SOAP request query to the Salesforce CRM,

 

"URL=https://cs12.salesforce.com/services/Soap/u/19.0", 
  "SOAPEnvelope=<se:Envelope xmlns:se=\"http://schemas.xmlsoap.org/soap/"
  "envelope/\"><se:Header xmlns:sfns=\"urn:partner.soap.sforce.com\">"
  "<sfns:SessionHeader><sessionId>00DV00000001NM7"
  "!AQcAQBLNcjSKjMxOt.2nz.n0cX8OZq1y.y.0BNCgHXA7UDRT4MoD6QDH6vU9lCO1sH1I4"
  "RyELZv4wFOvKCY0MaXhYGP5HCK4</sessionId></sfns:SessionHeader></se"
  ":Header><se:Body><query xmlns=\"urn:partner.soap.sforce.com\" xmlns"
  ":ns1=\"sobject.partner.soap.sforce.com\"><queryString>Select "
  "a.Notify_Pipeline_closure__c From User a where id= '005V0000000QZD3' "
  "limit 1</queryString></query></se:Body></se:Envelope>",

 

I am getting the following error response

 

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode><sf:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

The reason for the SOAP fault is: "UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService.

I suspect it is probably because, the session junk value keeps changing. If so where to capture it before passing it to the query request?

How to resolve this specific issue.

Regards,

Arun

SuperfellSuperfell

You'll get that error if you send your query request to the login server, and not the server for your specific instance, make sure you're using the serverUrl returned as part of the login response to send any subsequent requests.