<?php

// ========================
// Insert the path to the wsdl file.
// This is an example of Confluence's wsdl file.
// ========================
$client = new SoapClient(
    "http://localhost:8080/rpc/soap-axis/confluenceservice-v1?wsdl"
    ,array("trace" => 1, "exceptions" => 0)
);  

// ========================
// Displays all functions
// ========================
echo "<h2>All Functions</h2>";
$functions = $client->__getFunctions();
echo "<pre>";
var_export($functions);  
echo "</pre>";

// ========================
// Display all Types
// ========================
echo "<h2>All Objects and Types</h2>";
$types = $client->__getTypes();
echo "<pre>";
var_export($types);
echo "</pre>";

// ========================
// Login API call for Confluence.
// ========================
$token = $client->login("admin", "secretPasswd");
echo "<p>Token: $tok</p>";  

// ========================
// Pull all Confluence Spaces.
// ========================
$spaces = $client->getSpaces($token);
echo "<h2>All Spaces</h2>";
print_r($spaces);