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
Bryan HuntBryan Hunt 

Sandbox loginresult metadataserverurl property is null

Hello,

I was working on testing some metadata updates on a 31.0 sandbox.  I downloaded both the most recent enterprise API and the most recent metadata api.  I also did a sandbox refresh before starting testing.

I found that, post login, my loginresult object had a null value in the metadataserverurl property, which we use in the metadataservice url property.

I was able to manually manipulate the url to get past the issue.

After testing, we switched to production and the metadataserverurl property was set properly after the login.

Is there some reason why the property would not be set in the sandbox when it is set properly in production?

Thanks.

Bryan Hunt
James LoghryJames Loghry
Are you using the instance url such as cs24.salesforce.com or are you using test.salesforce.com when logging in via the enterprise api?  Not sure it would matter, but try using test.salesforce.com for the sandbox login URL.
James LoghryJames Loghry
Another thing to try would be using the partner wsdl instead of the enterprise wsdl to see if you notice a difference there.  You can do this easily with SOAP UI and importing both WSDLs.
Bryan HuntBryan Hunt
James, I was using the test.salesforce.com URL when logging in, thanks.