Help - Search - Members - Calendar
Full Version: API Errors - Need help
The Planet Forums > API > API Support
Nick Hudson
Keep getting the following error when trying to use the API...

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.theplanet.com/Svc/ConnectivityService.svc?WSDL' in /home/x/public_html/test.php:12 Stack trace: #0 /home/x/public_html/test.php(12): SoapClient->SoapClient('https://api.the...', Array) #1 {main} thrown in /home/x/public_html/test.php on line 12
Shelby Cain
I apologize for any inconvenience that this issue has caused you. Could you do a quick check of your script again? If it is still giving you an error, could you do the following:

1) Open https://api.theplanet.com/Svc/ConnectivityService.svc?WSDL in a web browser
2) Enter the credentials that you are using for your script
3) Post here (or PM me) the page that is rendered in your browser
Nick Hudson
I've narrowed the above error down to a PHP compilation issue.

Now I've got a new error:

Fatal error: Uncaught SoapFault exception: [s:Client] Hardware Object with ID 0 cannot be found on your account. in /home/x/public_html/test.php:16 Stack trace: #0 [internal function]: SoapClient->__call('GetBandwidthByM...', Array) #1 /home/x/public_html/test.php(16): SoapClient->GetBandwidthByMonth() #2 {main} thrown in /home/x/public_html/test.php on line 16

Here is the code from my file:
CODE
$params = array(
'login' => 'x',
'password' => 'x',
'HardwareID' => '118798',
'MonthDate' => '082009'
);


As you can see I've defined the HardwareID in the $params array...
Shelby Cain
Thanks for helping to narrow that down. I've made a note of the issue and I've forwarded it along to development.
Nick Hudson
Sigh. So we're at the mercy of the development team who has given us not only a botched API, but a botched Orbit too?

We might as well start looking into other solutions then. Your "development team" hasn't proven themselves to be very useful at all.
Shelby Cain
Would you mind posting or PM-ing your script? I think the web service isn't receiving HardwareID as part of the soap message.

Here is an example client that I was using to test:

CODE
<?php
ini_set('soap.wsdl_cache_enabled', false);
$wsdl_url =  'https://api.theplanet.com/Svc/HardwareBandwidthService.svc?WSDL';
$params = array(
                'login' => 'xxxxxx',     //orbit username
                'password' => 'yyyyyy',   //orbit password
                'trace' => true
               );
try {
        $svc = new SoapClient($wsdl_url, $params);
        $svc->GetBandwidthByMonth(array('HardwareID' => '123456',
             'MonthDate' => '2009-07-01T00:00:00'));
} catch (Exception $e) {
        echo "<pre>";
        echo print_r($e);
}
?>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.