Hi,
I am trying to access a SOAP service which can be found on the following url: http://myserver/. The WSDL for this service can be found at http://myserver/Xtract.asmx?WSDL.
When i try to do access the operation GetPrice I get a Access Denied error which means that username and/or password is incorrect, but I know 100% sure it is correct. So I think my PHP code is wrong.
<?php
# Include needed files
require_once("NuSOAP.php");
require_once("Messages.php");
$client = new nusoapclient("http://xtract.bascomputers.nl:4040/Xtract.asmx?WSDL", true);
$params = array(
"customerID" => myid,
"password" => "mypass",
"productID" => "1492",
);
$result = $client->call("GetPrice", $params, "http://www.bascomputers.nl/", "http://www.bascomputers.nl/GetPrice");
# Display the SOAP request and response
$outgoing = $client->request;
$incoming = $client->response;
echo $custom . 'Outgoing SOAP Message:' . $customend . $outgoing . $end;
echo $custom . 'Incoming SOAP Message:' . $customend . $incoming . $end;
echo "<p style=\"border: 1px dotted #CCCCCC; background: #EBEBEB; font-family: Courier New; font-size: 8pt; padding: 5px;\"><xmp>";
print_r($result);
print_r($client->debug_str);
echo "</xmp></p>";
?>
|
I already tried params as a string too. But it gives me the same error.
The error i got is as follows
Array
(
[GetPriceResult] => Array
(
[Products] => Array
(
[Error] => Array
(
[!ID] => 2
[!Message] => Access denied
)
)
)
)
|
Thanks.