XPlanner PHP SOAP Client
I am working on a project management system and want to build a Mylyn plugin such that all tasks from the PMS show up in Eclipse / Aptana. I want to adapt Extreme Programming model of Iterations - User Stories and Tasks. XPlanner does this really well, and Mylyn already has an XPlanner connector.
So I want to keep the same XPlanner API and hook that up with my PMS! (Don't have time / skills to build a new Mylyn connector yet!)
XPlanner has a SOAP client in PHP, but that's written in NuSOAP. PHP's SOAP support uses a different convention for web services. Here's a simple XPlanner SOAP client for PHP (right after the jump!)
-
<?php
-
$options['login'] = 'sysadmin';
-
$options['password'] = 'admin';
-
$xplanner = new SoapClient('http://localhost:7070/soap/XPlanner?wsdl', $options);
-
?>
-
-
<html>
-
<body>
-
<H1>XPlanner PHP SOAP Example</H1>
-
<?php
-
// Dump all properties of an object
-
function dump_props($obj)
-
{
-
echo '<ul>';
-
foreach ($obj as $key=>$value)
-
{
-
}
-
echo '</ul>';
-
}
-
-
$projects = $xplanner->getProjects();
-
foreach ($projects as $project)
-
{
-
$iterations = $xplanner->getIterations($project->id);
-
foreach($iterations as $iteration)
-
{
-
dump_props($iteration);
-
$stories = $xplanner->getUserStories($iteration->id);
-
foreach($stories as $story)
-
{
-
dump_props($story);
-
$tasks = $xplanner->getTasks($story->id);
-
foreach ($tasks as $task)
-
{
-
dump_props($task);
-
}
-
}
-
}
-
}
-
?>
References:
- XPlanner SOAP API documentation
- Mylyn plugin for Eclipse
No related posts.
