This topic contains 6 replies, has 0 voices, and was last updated by david.mendoza 8 years, 7 months ago.

  • Author
    Posts
  • #6736

    david.mendoza

    I’m trying to connect this exercise solution to my Sandbox account, with no luck.

    However, I am able to connect to prod with no problems.

    Any insight would be greatly appreciated.

    Code:
    private void setPassport() throws SOAPException
    {
    // set information into the passport
    Passport passport = new Passport();
    RecordRef roleRef = new RecordRef();

    // replace text in the next 4 lines as noted
    passport.setEmail(“your email”);
    passport.setPassword(“your password”);
    roleRef.setInternalId(“3”);
    passport.setAccount(“your account number”);

    passport.setRole(roleRef);

    // Display the login information in the console
    System.out.println(“Login info…”);
    System.out.println(” Email: ” + passport.getEmail());
    System.out.println(” Password: ” + passport.getPassword());
    System.out.println(” Role Internal Id: ” + roleRef.getInternalId());
    System.out.println(” Account: ” + passport.getAccount() + “n”);

    includeInHeader(“passport”, passport, _service);
    }
    This is a cached copy. Click here to see the original post.

  • #6737

    vconnect

    What error are you getting?

  • #6738

    david.mendoza

    When I use my sandbox credentials, I get this in message:

    RemoteException: InvalidCredentialsFault

    Message : You have entered an invalid email address or password. Please try again.

    When I use my production credentials it goes through fine:

    Execution completed.

  • #6739

    CREECE

    Have you used the roles rest service to see if you have the combination correct for your user/pass? Or does the sandbox have webservices enabled? I’ve had some issues where I clearly have a sandbox login but it does not work. In one instance, it was due to web services not being on and in another, I just had a typo.

  • #6740

    david.mendoza

    Sandbox has web services enabled, and the credentials I use are for my Admin role.

  • #6741

    sathish

    In build.xml change the url replace na1 with sandbox

    then , right click on build.xml and run as select option 2 and run your custom code.

    Hope this helps

  • #6742

    david.mendoza

    Thank you Sathish!

You must be logged in to reply to this topic.