Error: HTTP Error: HTTP authentication failed |
|
This was a error in one of my server.php function's syntax.
Now I am getting a 401 error: 2007-08-19 19:00:26.052578 soap_transport_http: Got 401 Authorization Required with WWW-Authenticate: Basic realm="Protected Area" 2007-08-19 19:00:26.052641 soap_transport_http: HTTP authentication failed 2007-08-19 19:00:26.052707 soap_transport_http: end of send() 2007-08-19 19:00:26.052837 soapclient: Error: HTTP Error: HTTP authentication failed my (apache 2.0) htaccess is setup as follows: AuthUserFile /home/xxxxxxxx/.htpasswd AuthGroupFile /dev/null AuthName "Protected Area" AuthType Basic <Limit GET POST> require user wsuser </Limit> and my client is calling the wsdl like this: $password = urlencode("**********"); $username = "wsuser"; $wsdl = "https://".$username.":".$password."@www.xxxxxx.com/ws/server.php?wsdl"; $client = new soapclient($wsdl, true); $client->setCredentials($username, $password); any help is much appreciated! |
||||||||||||
|
Site Admin
|
probably you need to enable WSDL file retrival without authentication or have client-side copy of it and use it instead of the WSDL url
|
||||||||||||
_________________ The PHP IDE team |
|
You might also want to put this into your client:
I went through something like what you are doing, a https connection and if you just set your information the way you did, it's still not enough, you will need to put in the information that I have above after you declare your client with your username password. -Addison |
||||||||||||||
|
|
hi,
thanks for the responses! 1. I tried adding "basic" but still getting http authentication error. 2. An interesting suggestion to keep the wsdl localhost from the clients perspective. Is that a known workaround? I'm just wondering if that implies a bug in nusoap? I am also trying the other authentication methods: 'digest' and 'allow from ip' thanks again! Jonathan |
||||||||||||
|
|
just to make sure:
1. did you use $client = new soapclient('https://'.$username.':'.$password.'@www.xxxxxxx.com/ws/server.php?wsdl', true); and 2. did you also use $client->setCredentials($username, $password, "basic"); I had to use both to make it work when going through https -Addison |
||||||||||||
|
|
I got it to work by using access control in the .htaccess as opposed to
AuthType Basic AuthName <auth name> Order allow,deny Allow from <IP> Satisfy any This works for me as I am only ever calling the webservice from a limited set of IPs. thanks! |
||||||||||||
|
Error: HTTP Error: HTTP authentication failed |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by