Created
April 2, 2010 15:55
-
-
Save fago/353294 to your computer and use it in GitHub Desktop.
open calais remote site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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