logo       

Re: htaccess login credentials: msg#00129

php.nusoap.general

Subject: Re: htaccess login credentials

tirsdag 25. mai 2004, 15:26, skrev Jan Horsman:
> Hi,
>
> I am using Nusoap to write a Soap client for a dutch webservice.
>
> The webservice is secured with htaccess The soapclient->setCredentials
> method is suitable for handling this when calling the webservice. When I
> use a WSDL document however ( /$soapclient = new soapclient($wsdl,
> true)/ ) the Nusoap client object does not use the login credentials
> when retrieving the wsdl document. The WSDL document has the same login
> credentials as the webservice.
>
> I believe the wsdl document is retrieved when the soapclient object is
> created, at that point the soap object isn't aware of the login
> credentials.
>
> What is a good workaround for this situtaion?

This works for me;

$soapclient = new soapclient('http://username:password@host/wsdl.jsp','wsdl');
$soapclient->setCredentials('username','password');
$response = $soapclient->call('functionname', $param);

--
Med vennlig hilsen,
Eurobate ASA

Arne K. Haaje
Senior Network Engineer
--------------------------------------------------------------------
Eurobate ASA - Postboks 4589 Nydalen - 0404 Oslo - Norway
Phone: +47 23 22 73 73 - Fax: +47 23 22 73 74 - Mob: +47 92 88 44 66
http://www.eurobate.no/


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise