• Bruno Diaz
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

New to salesforce, SOAP and web services, so not surprising that I'm stuck @ the gate on login.  Created a Developer account, followed instructions for getting WSDL files, and using soapUI (seems to be a great tool BTW!) to generate SOAP messages for login.  Using the same username and password that I can successfully use on the salesforce website, cut and paste my organizationId from the site, and appended the security token from the email to my password. 

Based on what I read somewhere, I left the tags for client, defaultNamespace and portalId empty.

Here's what I post (edited for the ID, username, etc.) - this is trying to use the Partner wsdl - get same error for Enterprise:

 

POST https://login.salesforce.com/services/Soap/u/19.0 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: login.salesforce.com
Content-Length: 715

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
   <soapenv:Header>
      <urn:CallOptions>
         <urn:client></urn:client>
         <urn:defaultNamespace></urn:defaultNamespace>
      </urn:CallOptions>
      <urn:LoginScopeHeader>
         <urn:organizationId>00D50000000xxxx</urn:organizationId>
         <!--Optional:-->
         <urn:portalId></urn:portalId>
      </urn:LoginScopeHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>jort@xxxxxxxxxxxxx.com</urn:username>
         <urn:password>pppppppppp78l6g7iFac5uaviDnJLFxxxxx</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

 

and the response:

 

HTTP/1.1 500 Internal Server Error
Server:
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
Content-Length: 351
Date: Thu, 01 Jul 2010 14:03:03 GMT

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.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>

 

This newbie thanks you in advance for any and all help you can give!

  • July 01, 2010
  • Like
  • 1