Logo IMCCE-VOParis

Observatoire de Paris / CNRS

Portal Home Page | Report issue | Legal notice | Contact us

The Virtual Observatory Sky Body Tracker

.: getAsterClass :.

.: Nota bene

This method is deprecated. Please use instead the SsODNet/Quaero service to retrieve the class of any solar system object.

.: Purpose

This method is intended to people who want to know the dynamical class an asteroid.

.: HTTP Request

The Skybot getAsterClass service can be accessed using the SkyBoT query forms. If you are a software/solutions developer, you might want to include the Skybot getAsterClass service into your application. This can be done by using the web service method or by using the following HTTP request:
where [parameters] is a list of parameters separated by the character &. The allowed parameters are:
-targets=<string> A comma separated list of names of solar system objects Ex.: ceres,pallas,1999_TC36
-mime=<string> Mime type of the results votable | html | text
-from=<string> Word which definite the name of the caller application, or which describes the request any short string (without space)

The output is described in the following table and is available in VOTable, HTML or plain text format (cf. examples). The -mime parameter is optionnal and its value can be omitted (just write nothing or &-mime= without value). In this case, the output is formatted in VOTable. The other input is mandatory.

.: Web service

The SkyBoT Web service provides methods based on SOAP and HTTP POST verb which allow one to interact between its own application and the SkyBoT services. Here is the useful information to invoke the getAsterClass method:
Web Service URI:
SOAP header:
name of the SOAP header element: 'clientID'
SOAP header's content: array('from' => 'YourName', 'hostip'=>'')
getAsterClass  (array, string)
- The input parameters of the method is an array of string providing the list of targets, and a string providing the format of the output:
VariableTypeUnitsLimits or valuesDefaultComment
targets array string Names of SSO none Can be an array of target names
mime string - votable | html | text votable Mime type of the results
- The output parameters of the method is a string containing the following information:
1 object number (blank if unnumbered) -
2 object name (official or preliminary designation) -
3 dynamical class -
- Depending on the selected mime type, the output is formatted as:
the data are written in the IVOA standard VOTable format
the data are transformed in a HTML document using a XSLT processing (SkyBoT XSL style sheet)
the data are returned in plain text where each block of data is separated by the semi-colon character ';' and each value in a block is separated by the pipe '|' character
- Examples: click on the following links to get the result for targets='ceres,pallas,1996 TO66' and:

.: How to consume:

In order to help you to invoke the SkyBoT web services, we provide some clients written in differents languages. Here are some detailed explanations to see how to write a client with PHP and SOAP which invokes the getAsterClass method:

1/ Provide the input parameters which are mandatory for the service:

// Client's ID: provide the name of your project or organisation or yourself
$from = 'MyName';
// Input parameters
$param = array(
    'targets' => array('ceres','pallas','1996 TO66'),
    'mime' => "html",

2/ Define the SOAP options, the namespace and the WSDL URI of SkyBoT web service:

// Enables or disables the WSDL caching feature
ini_set('soap.wsdl_cache_enabled', 1);
// SOAP version
$soapVersion = 'SOAP_1_2';
// SkyBoT namespace
$namespace = 'http://vo.imcce.fr/webservices/skybot';
// SkyBoT WSDL
$uriwsdl = $namespace.'/skybot.wsdl';

3/ Create a SoapClient object in WSDL mode, set the SOAP header, then call the method and catch exceptions:

  // Constructs the client
  $client = new SoapClient($uriwsdl, array('exceptions'=>1, 'soap_version'=>$soapVersion));
  // SOAP header
  $header = array('from'=>$from, 'hostip'=>'');
  $client->__setSoapHeaders(array(new SOAPHeader($namespace, 'clientID', $header)));
  // Call the resolver method
  $response = $client->__soapCall('getAsterClass',array($param));
  // Display the results
  if ($param['mime'] == 'text')
    header("Content-Type: text/plain");
    $res = explode(';', $response);
    $nbr = count($res);
    $key = array_keys($res);
    for ($i=0; $i<$nbr; $i++) { echo $res[$key[$i]],"\n"; };
    header("Content-Type: text/xml");
    echo $response."\n";
catch (SoapFault $fault)
  trigger_error("SOAP Fault: {$fault->getTraceAsString()} (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);