|
Hello,
has anyone experienced problems with XMLRPC library when trying to
connect through authentication?
I am calling a service on (example):
http:\\myuser:mypassword@awebsite.com/file/file.xml
And I get:
"Something went wrong - -32300 : transport error - HTTP status code
was not 200" I use the IXR_Library but also with another library I
have the same problem. In debug mode I see that PHP produces the XML
file for the request but it seems to have problems sending this to the
service. The service itself is ok, this is checked via another client
implementation.
Below the code I use.
Any suggestions? I think it is due to the userid password thing. When
calling on another service without a userid/password this code works
fine.
Regards
Stefan
<?php
include('IXR_Library.inc.php');
$par =
array("field1"=>"hello","field2"=>"world");
$client = new
IXR_Client('http:\\myuser:mypassword@awebsite.com/file/file.xml');
if (!$client->query('post', $par)) {
die('Something went wrong - '.$client->getErrorCode().' :
'.$client->getErrorMessage());
}
print_r ($client->getResponse());
echo "Done!";
?> |