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
Software EngineSoftware Engine 

How to specify the sand box address in the WSDL file.

Hi All,
 
I am new to the Apex code. I am developing an application to connect the apex webservice and displaying a report of the customers. But while developing the application i dont want to connect to actual webservice, bcaz it may lock me out of production and may destroy the original database.
 
I have  access to connect the sand box ( Duplicate ) of the customer database. But when i used the API calls  login() and query()  in my application, its connecting to the original database and not to the sand box database.
 
How to specify the sand box path in the WSDL file.
 
 
 
 
 
Rick.BanisterRick.Banister
You didn't say what language you're using, but the java code would be:

       // Application property file should point to "https://tapp0-api.salesforce.com/services/Soap/u/9.0";
       // for the Sandbox.
        String connectUrl = config.getConnectUrl();
        if (connectUrl == null)
        {
            connectUrl = new RJSforceService().getSoapAddress();
        }

        log.println("Connecting to:     " + connectUrl + " as " + config.getSfdcUser() + " at "
            + Calendar.getInstance().getTime().toString().substring(4));
        SoapBindingStub binding = (SoapBindingStub) new RJSforceService()
            .getSoap(new java.net.URL(connectUrl));