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
rd7rd7 

initial setup

I am fairly new to web services and completely new to using salesForce.com.  I am not sure if I have everything set up within salesForce.com that needs to be set up in order to make soap requests.  I have downloaded the enterprise wsdl and my account is api enabled.  although, when i try to use the login() request I am getting the following response:

 

      <soapenv:Fault>
         <faultcode>sf:INVALID_LOGIN</faultcode>
         <faultstring>INVALID_LOGIN: Invalid username or password, locked out or Self-Service portal is not enabled</faultstring>
         <detail>
            <sf:LoginFault xsi:type="sf:LoginFault">
               <sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode>
               <sf:exceptionMessage>Invalid username or password, locked out or Self-Service portal is not enabled</sf:exceptionMessage>
            </sf:LoginFault>
         </detail>
      </soapenv:Fault>

SuperfellSuperfell
Did you include your API security token with your password?
rd7rd7
simon: no.  I'm not sure what the token is?  where do i find that info?? thanks!
rd7rd7
found my security token and am still getting the error
SuperfellSuperfell
And you're passing in password + security token as the password? can you post some code and/or your actual soap request.
rd7rd7

Yes, I included the token appended to the end of my pwd.  Here is the request and response I"m getting:

 

REQUEST:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:LoginScopeHeader>
         <urn:organizationId>00D80000000b18d</urn:organizationId>
         <!--Optional:-->

      </urn:LoginScopeHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>robinl@cardscan.com</urn:username>
         <urn:password>myPasswrdHerexxxxxTokenxxxxx</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

 

RESPONSE:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>sf:INVALID_LOGIN</faultcode>
         <faultstring>INVALID_LOGIN: Invalid username or password, locked out or Self-Service portal is not enabled</faultstring>
         <detail>
            <sf:LoginFault xsi:type="sf:LoginFault">
               <sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode>
               <sf:exceptionMessage>Invalid username or password, locked out or Self-Service portal is not enabled</sf:exceptionMessage>
            </sf:LoginFault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

SuperfellSuperfell
For regular users don't set the LoginScopeHeader, its only used to perform login for selfService or portal users.
rd7rd7

Thanks Simon!!!  That did the trick! :smileyhappy: