Re: Re: PHP4 SOAP Request problem logging in to salesforce.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As an addendum to the last reply sent, I refer you to the following links:

Example of login SOAP request (I use Partner API):
http://www.sforce.com/us/resources/soap/sforce60/sforce_API_messages_login.html

README by Byrne Reese (Nov 2004):
http://cvs.sourceforge.net/viewcvs.py/sforce/php_gen_proxy/README.txt?view=markup


Colin Goldberg
** <http://www.plezecall.com/ease-savings/pc.pl?pc=zp7C>


Colin Goldberg wrote:

I only sent login information in both header and body because of your suggestion to add the addHeader code. If this is redundant, I will remove it. The problem is still that the SOAP body does not contain the parameters username and password, but only
<SOAP-ENV:Body>
<ns4:login xsi:nil="true"/>
</SOAP-ENV:Body>

even though I supply the username and password in the 'call'.

Why are the username and password not being inserted into the body?

(The wsdl - suitable for the "partner" API - is located at http://www.thebizconnector.com/web_services/wsdl/sforce_partner.wsdl)

Colin Goldberg
** <http://www.plezecall.com/ease-savings/pc.pl?pc=zp7C>


Michael Rasmussen wrote:

On Tue, 25 Oct 2005 21:29:24 -0400, Colin Goldberg wrote:

produced error "Did not understand "MustUnderstand" header(s)" when set to
1 - so it was changed to 0.


Why use a login method with MustUnderstand=0?

The login function used is as follows:
function &login($username, $password) {
       $login =& new
SOAP_Value('{urn:partner.soap.sforce.com}login',false,$v=array("username"=>$username,
"password"=>$password));
       $header =& new SOAP_Header(
           '{urn:partner.soap.sforce.com}login', 'Struct',
           array("username"=>$username, "password"=>$password), 0);
       $this->addHeader($header);
       $request = array('login'=>$login);
       return $this->call('login', $request,
           array('namespace'=>'urn:partner.soap.sforce.com',
                           'soapaction'=>'',
                           'style'=>'document',
                           'use'=>'literal' ));
}
}
Why are the username and password not being inserted into the body?


Why do you send login information in both header and body?

To give you any further help I would need to see the entire WSDL. An
online link would be preferred.



--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux