From 743dd7785ccc5095a6b3b1bd8ee8845f150cc1b9 Mon Sep 17 00:00:00 2001
From: Martin Haase <martin.haase@daasi.de>
Date: Fri, 12 Nov 2010 09:35:01 +0000
Subject: [PATCH] further merging

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@7751 7c539038-3410-0410-b1ec-0f2a7bf1c452
---
 .../rbacSoap/examples/getSLC.php              | 70 ++++++++++++++++++
 .../rbacSoap/examples/getUUID.php             | 73 +++++++++++++++++++
 2 files changed, 143 insertions(+)
 create mode 100755 info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getSLC.php
 create mode 100755 info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getUUID.php

diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getSLC.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getSLC.php
new file mode 100755
index 0000000..5319790
--- /dev/null
+++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getSLC.php
@@ -0,0 +1,70 @@
+<?php
+// #######################################################
+// Author: Martin Haase
+// Creation date: 13.10.2009
+// Modification date: 13.10.2009
+// Version: 0.1.1
+// #######################################################
+
+
+require_once( "../soapTypes.inc.php" );
+
+// -----------------------------------------------------
+// You'll need these services
+// -----------------------------------------------------
+$soapExtra = new SoapClient( "../wsdl/tgextra.wsdl" );
+
+
+echo "<BODY><HTML>";
+
+if( isset( $_POST['auth'] ) ) {
+
+  // -----------------------------------------------------
+  // If this was successfull you can add a the user you
+  // wish to create
+  // -----------------------------------------------------
+  $getReq = new getSLCRequest();
+  $getReq->auth = $_POST['auth'];
+  $getReq->log = "";
+  $getReq->secret = $_POST['secret'];
+
+
+  echo "<HR/>";
+  echo "Getting SLC...<BR/>";
+
+  try {
+
+    $getSLCResponse = $soapExtra->getSLC( $getReq );
+
+    if( $getSLCResponse->slc ) {
+
+      echo "DONE. . $getSLCResponse->slc .<BR>";
+
+    }
+    else {
+
+      echo "UNABLE to get SLC!<BR>";
+
+    }
+
+  }
+  catch( SoapFault $f ) {
+
+    echo "SOAP FAULT!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail;
+
+  }
+
+}
+
+
+echo "<FORM action=\"getSLC.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
+
+echo "</SELECT><BR>\n";
+echo "Auth: <INPUT type=\"text\" name=\"auth\" value=\"\"><BR>\n";
+echo "CRUD secret: <INPUT type=\"text\" name=\"secret\" value=\"\"><BR>\n";
+echo "<INPUT type=\"submit\" value=\"Commit...\">\n";
+echo "</FORM>\n";
+
+echo "</BODY></HTML>";
+
+?>
diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getUUID.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getUUID.php
new file mode 100755
index 0000000..f5c10c2
--- /dev/null
+++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/getUUID.php
@@ -0,0 +1,73 @@
+<?php
+// #######################################################
+// Author: Markus Widmer
+// Creation date: 07.04.2008
+// Modification date: 07.04.2008
+// Version: 0.1.0
+// #######################################################
+
+
+require_once( "../soapTypes.inc.php" );
+
+
+
+// -----------------------------------------------------
+// You'll need these services
+// -----------------------------------------------------
+$soapExtra = new SoapClient( "../wsdl/tgextra.wsdl" );
+
+
+echo "<BODY><HTML>";
+
+
+
+
+if( isset( $_POST['auth'] ) ) {
+
+  // -----------------------------------------------------
+  // If this was successfull you can add a the user you
+  // wish to create
+  // -----------------------------------------------------
+  $geoReq = new getUUIDRequest();
+  $geoReq->auth = $_POST['auth'];
+  $geoReq->log = "";
+  $geoReq->resource = $_POST['resource'];
+
+
+  echo "<HR/>";
+  echo "Looking for UUID...<BR/>";
+
+  try {
+
+    $response = $soapExtra->getUUID( $geoReq );
+
+    if( $response->uuid ) {
+
+      echo "UUID: " . $response->uuid;
+
+    }
+    else {
+
+     echo "UNABLE TO COMMIT...";
+
+    }
+
+  }
+  catch( SoapFault $f ) {
+
+    echo "SOAP FAULT!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail;
+
+  }
+
+}
+
+
+echo "<FORM action=\"getUUID.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
+echo "Auth: <INPUT type=\"text\" name=\"auth\" value=\"\"><BR>\n";
+echo "Resource: <INPUT type=\"text\" name=\"resource\" value=\"\"><BR>\n";
+echo "<INPUT type=\"submit\" value=\"Commit...\">\n";
+echo "</FORM>\n";
+
+echo "</BODY></HTML>";
+
+?>
-- 
GitLab