We did this on many of the web services we created, and will do it soon for Sharepoint. As you say, you can get the data in XML. So you just need 1) Get XML data 2) XML data analysis 3) Return now readable data to a block in Drupal
For 1, you need to open any access to the firewall and provide a public XML channel or set it only to access the IP address of the Drupal server or some other authentication mechanism. For 2PHP, you get many XML parsing options. We created one module to process the XML service, and then we call it from another module that handles the display, theme, etc. Below I will first provide an example of two functions from an XML module, and then an example of how you can use it in another module.
Here is from the XML module.
/** * Retrieving XML data from the URL * * @param $url * The url to retrieve the data * @param $replace_special_characters * Replace special character to HTML format * * @return parse result as struct */ function xmlservice_parse($url, $replace_special_characters = FALSE) { $http_contents = drupal_http_request($url); if (!isset($http_contents->data)) { throw new RuntimeException("Cannot get contents from the URL"); }//if if($replace_special_characters) $http_contents_data = str_replace('&','&', $http_contents->data); else $http_contents_data = $http_contents->data; $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $http_contents_data, $result); xml_parser_free($xml_parser); return $result; } /** * Retrieving XML data as Dom document from the URL * * @param $url * The url to retrieve the data * @param $replace_special_characters * Replace special character to HTML format * * @return result as Dom Document */ function xmlservice_parse_to_dom($url, $replace_special_characters = FALSE) { $http_contents = drupal_http_request($url); if (isset($http_contents->error)) { throw new RuntimeException($http_contents->error); }//if if (!isset($http_contents->data)) { throw new RuntimeException("Cannot get contents from the URL"); }//if if($replace_special_characters){ $http_contents_data = str_replace('&','&', $http_contents->data); }//if else{ $http_contents_data = $http_contents->data; }//else $dom_document = new DomDocument; /* load htmlinto object */ $dom_document->loadXML($http_contents_data); /* discard white space */ $dom_document->preserveWhiteSpace = false; return $dom_document; }
Then just write your code to create the block. If you do not know how to do this, look at http://www.nowarninglabel.com/home/creating-a-new-custom-module-in-drupal-6 , which creates a simple block. Then for content, you can simply call one of the above functions in an XML document, for example $ content = xml_service_parse (' http://sharepoint.example.com/some/thing/feed.xml ');
If you want to parse a node, you can simply use the XML function, but instead use node_save () to programmatically create the node: http://api.drupal.org/api/function/node_save I haven't looked at the available Sharepoint services too much , but you could just parse the XML into a dom document, as shown above, and then loop through it, creating a node for each XML node that matches your criteria.
And if you want more work done for
Hope this was helpful. Feel free to ask for details.