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
KimInFLAKimInFLA 

SandBox Inconsistancy

I have been successfully using the following in both my developer and prodution environment so some time now:

String formattedName = "Poo ? Noah";

SearchResult  sr = binding.search("find {\"" + formattedName + "\"} in name fields returning account(id, name, shippingpostalcode, shippingcity)");

Having recently acquired the SandBox, I have pointed my code over and am now receiving the following error:

org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - type

I added the following to do additionally testing and also received the error mentioned above:

QueryResult  qr = binding.query("select Id,Name from Account");

 

Any ideas what might be causing this?  I am using Axis1.3 and

https://test.salesforce.com/services/Soap/u/7.0

Thanks for any assistance.

SuperfellSuperfell
Sounds like you're sending an enterprise API request to the Partner endpoint. If you're using the enterprise API/WSDL, then you should be using test.salesforce.com/services/Soap/c/7.0 (not u/7.0)
KimInFLAKimInFLA
Thank You!  When I did a search for how to connect to the SandBox, I found that URL.  Now that I know there is a difference between /u and /c, I an good to go.:smileyvery-happy:
SuperfellSuperfell
The WSDLs from the test environment do contain the correct URLs, the best bet is to always start from the WSDL.