Skip to content

Instantly share code, notes, and snippets.

@fago
Created April 2, 2010 15:55
Show Gist options
  • Save fago/353294 to your computer and use it in GitHub Desktop.
Save fago/353294 to your computer and use it in GitHub Desktop.
open calais remote site
$remote = new RulesWebRemote();
$remote->name = 'calais';
$remote->label = 'Open calais';
$remote->url = 'http://api.opencalais.com/enlighten/?wsdl';
$remote->type = 'soap';
// Add info about the SOAP service, which the user has to provide via the UI.
// We need to define the "Enlighten" complex data type, which the operation
// takes as parameter.
$remote->settings['data types']['Enlighten'] = array(
'data info' => array(
'properties' => array(
'licenseID' => array('type' => 'text'),
'content' => array('type' => 'text', 'label' => 'The text to enlighten'),
'paramsXML' => array('type' => 'xml', 'optional' => TRUE),
'outputFormat' => array('outputFormat')
),
),
);
$operation['label'] = 'Open Calais Enlighten Text';
$operation['parameter']['Enlighten'] = array('type' => 'Enlighten');
$operation['provides']['EnlightenResponse'] = array(
'type' => 'struct',
'data info' => array(
'properties' => array(
'EnlightenResult' => array('type' => 'text'),
),
),
);
$remote->settings['operations']['enlighten'] = $operation;
$remotes[$remote->name] = $remote;
return $remotes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment