For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > December 2006 > Nusoap









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Nusoap
Equinex

2006-12-21, 6:58 pm

Using a PHP 4 and Nusoap I get the following errors when attempting to
call a web service

I need to login to the main web service and get a session token to be
able to access the second web service - this part works ok

When I try and call the second web service, I get the following error.

Result
Array ( [faultcode] => env:Client [faultstring] => Rejected (from
client) )

Request

Response

VR array(2) { ["faultcode"]=> string(10) "env:Client" ["faultstring"]=>
string(22) "Rejected (from client)" }

Below is my code:

$VendorWsdl =
"https://api.betfair.com/betex-api-public-ws/v1/VendorService.wsdl";
$VendorSoap = new soapclient($VendorWsdl,"wsdl");
$VendorProxy = $VendorSoap->getProxy();

$AddUserParams =
array(request=>array('header'=>$BetfairRequestHeader,'username'=>$tok[3],'vendorSoftwareId'=>342,'expiryDate'=>$expiry));
$VendorAddResult = $VendorProxy->addVendorSubscription($AddUserParams);

$VendorSessionToken =
$VendorAddResult['Result']['header']['se
ssionToken'];
print("VST "); print($VendorSessionToken); print("<br>\n");
if ($VendorSoap->fault)
{
print_r($VendorAddResult);
echo "";
}
else
{
$VendorError = $VendorSoap->getError();
if ($VendorError)
{
echo "<h2>Error</h2>" . $VendorError . "";
}
else
{
echo "<h2>Result</h2>";
print_r($VendorAddResult);
echo "";
}
}
echo "<h2>Request</h2>";
print_r($VendorSoap->request); print("<br>\n");
echo "" . htmlspecialchars($VendorSoap->request, ENT_QUOTES) . "";
echo "<h2>Response</h2>";
echo($VendorSoap->response); print("<br>\n");
echo "" . htmlspecialchars($VendorSoap->response, ENT_QUOTES) . "";

print("VR "); var_dump($VendorAddResult);

Thanks,


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com