You need to sign in to do that
Don't have an account?
Error 1112 "username or password not valid"
I've been playing with the xmlrpc acces with my account, and it was fine.
I'm switching to SOAP, and I always get an error 1112 as a reply.
The following, is the message I write on the socket (just replacedaccount and password with '*'). I'm pretty lost, can someone tells me what is wrong
Thanks
POST /servlet/servlet.SoapApi HTTP/1.0
User-Agent: PEAR-SOAP 0.8.0RC2-devel
Host: www.salesforce.com
Content-Type: text/xml; charset=UTF-8
Content-Length: 509
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:partner.soap.sforce.com"
>
<SOAP-ENV:Body>
<ns4:login>
<ns4:username>laurentb@***********.com</ns4:username>
<ns4:password>********</ns4:password></ns4:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
env
- Apache/1.3.29
- PHP/4.3.4
- SOAP 0.8RC2 with all depend modules
yes, I'm using it as a template.
I just change the $this->SOAP_Client("http://aspen.salesforce.com/services/Soap/u/2.0", 0);
by $this->SOAP_Client("http://www.salesforce.com/servlet/servlet.SoapApi", 0);
should be this:
$this->SOAP_Client("http://www.salesforce.com/services/Soap/u/2.5", 0);
Here is the trick, however - the toolkit was developed against a test server, and does not (yet) support the correct single sign on usage, so in pratice you should log on directly to the correct api server. This is likely na1.salesforce.com, but you can confirm buy looking at the result from the login call.
So for now, it really should be:
$this->SOAP_Client("http://na1.salesforce.com/services/Soap/u/2.5", 0);
Let us know how it goes.
Adam
I have been wrestling with the same problem the last few days (in the perl implementation), modifying the address in Salesforce.pm to na1.salesforce.com solved the problem, how long will this address be valid for?
Thanks.
Thank you Adam, works fine when I target the API server http://na1.salesforce.com/services/Soap/u/2.5.
I just noticed that the returned 'serverURL' is always https://na1.salesforce.com/services/Soap/u/2.5 even if I target http, but it has no effect for further calls.
Thanks again for the support
> how long will this address be valid for?
While it is correct form to check the login response from www to determine the correct API server, the mapping between a given login and given API server should not (although may in the future) change. If you are writing an application where users from different orgs will login (and hence be mapped to different API servers), using this shortcut is unwise.