On 26 June 2010 23:46, robert mena <robert.mena@xxxxxxxxx> wrote: > Hi, > > I am trying to access a webservice using php's soapclient but I keep getting > the error SoapFault exception: [HTTP] Unauthorized > > If I try using a web browser I can authenticate using the same credentials > used by the php code. > > I've searched but the only mention that I found led to a 'won't fix' bug > registered to php 5.1.6. I am using 5.2.10. > > Any ideas of what may be causing this? Is there a workaround? > > Regards. > Can you show the SoapClient construction you are using? The documentation says that you can supply HTTP authentication [1] ... "For HTTP authentication, the login and password options can be used to supply credentials. For making an HTTP connection through a proxy server, the options proxy_host, proxy_port, proxy_login and proxy_password are also available. For HTTPS client certificate authentication use local_cert and passphrase options. An authentication may be supplied in the authentication option. The authentication method may be either SOAP_AUTHENTICATION_BASIC (default) or SOAP_AUTHENTICATION_DIGEST." There was recent activity on a Soap Authorisation Header bug [2]. If this issue is appropriate, you can try a building your code code from SVN (no win32 snapshots for a LONG time now). Regards, Richard. [1] http://docs.php.net/manual/en/soapclient.soapclient.php [2] http://bugs.php.net/bug.php?id=50976 -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php