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 " ["faultstrin g"]=>
string(22) "Rejected (from client)" }
Below is my code:
$VendorWsdl =
"https://api.betfair.com/betex-api-public-ws/v1/VendorService.w sdl";
$VendorSoap = new soapclient($Ven dorWsdl,"wsdl") ;
$VendorProxy = $VendorSoap->getProxy();
$AddUserParams =
array(request=> array('header'= >$BetfairReques tHeader,'userna me'=>$tok[3],'vendorSoftwar eId'=>342,'expi ryDate'=>$expir y));
$VendorAddResul t = $VendorProxy->addVendorSubsc ription($AddUse rParams);
$VendorSessionT oken =
$VendorAddResul t['Result']['header']['sessionToken'];
print("VST "); print($VendorSe ssionToken); print("<br>\n") ;
if ($VendorSoap->fault)
{
print_r($Vendor AddResult);
echo "";
}
else
{
$VendorError = $VendorSoap->getError();
if ($VendorError)
{
echo "<h2>Error</h2>" . $VendorError . "";
}
else
{
echo "<h2>Result </h2>";
print_r($Vendor AddResult);
echo "";
}
}
echo "<h2>Reques t</h2>";
print_r($Vendor Soap->request); print("<br>\n") ;
echo "" . htmlspecialchar s($VendorSoap->request, ENT_QUOTES) . "";
echo "<h2>Respon se</h2>";
echo($VendorSoa p->response); print("<br>\n") ;
echo "" . htmlspecialchar s($VendorSoap->response, ENT_QUOTES) . "";
print("VR "); var_dump($Vendo rAddResult);
Thanks,
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 " ["faultstrin g"]=>
string(22) "Rejected (from client)" }
Below is my code:
$VendorWsdl =
"https://api.betfair.com/betex-api-public-ws/v1/VendorService.w sdl";
$VendorSoap = new soapclient($Ven dorWsdl,"wsdl") ;
$VendorProxy = $VendorSoap->getProxy();
$AddUserParams =
array(request=> array('header'= >$BetfairReques tHeader,'userna me'=>$tok[3],'vendorSoftwar eId'=>342,'expi ryDate'=>$expir y));
$VendorAddResul t = $VendorProxy->addVendorSubsc ription($AddUse rParams);
$VendorSessionT oken =
$VendorAddResul t['Result']['header']['sessionToken'];
print("VST "); print($VendorSe ssionToken); print("<br>\n") ;
if ($VendorSoap->fault)
{
print_r($Vendor AddResult);
echo "";
}
else
{
$VendorError = $VendorSoap->getError();
if ($VendorError)
{
echo "<h2>Error</h2>" . $VendorError . "";
}
else
{
echo "<h2>Result </h2>";
print_r($Vendor AddResult);
echo "";
}
}
echo "<h2>Reques t</h2>";
print_r($Vendor Soap->request); print("<br>\n") ;
echo "" . htmlspecialchar s($VendorSoap->request, ENT_QUOTES) . "";
echo "<h2>Respon se</h2>";
echo($VendorSoa p->response); print("<br>\n") ;
echo "" . htmlspecialchar s($VendorSoap->response, ENT_QUOTES) . "";
print("VR "); var_dump($Vendo rAddResult);
Thanks,