implementing soap.. soap soap soap
authorpaulr <me@pjr.cc>
Mon, 28 Mar 2011 05:10:14 +0000 (16:10 +1100)
committerpaulr <me@pjr.cc>
Mon, 28 Mar 2011 05:10:14 +0000 (16:10 +1100)
.project
agent/agent.php [new file with mode: 0644]
lib/config.php [new file with mode: 0644]
lib/lib.php
www/.htaccess
www/index.php
www/soap.php [new file with mode: 0644]

index 5975073..4e74449 100644 (file)
--- a/.project
+++ b/.project
@@ -5,7 +5,29 @@
        <projects>
        </projects>
        <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.wst.validation.validationbuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.dltk.core.scriptbuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
+               <nature>org.eclipse.php.core.PHPNature</nature>
        </natures>
+       <filteredResources>
+               <filter>
+                       <id>1301266264267</id>
+                       <name></name>
+                       <type>5</type>
+                       <matcher>
+                               <id>org.eclipse.ui.ide.multiFilter</id>
+                               <arguments>1.0-name-matches-false-false-.htaccess</arguments>
+                       </matcher>
+               </filter>
+       </filteredResources>
 </projectDescription>
diff --git a/agent/agent.php b/agent/agent.php
new file mode 100644 (file)
index 0000000..f9aa584
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+
+// I AM A EMENY!
+require_once("../lib/lig.php");
+
+$s = new SoapClient("http://localhost/src/eclipse-workspace/gslac/www/soap.php?wsdl");
+
+$k = $s->status();
+
+echo "l was $k\n";
+?>
\ No newline at end of file
diff --git a/lib/config.php b/lib/config.php
new file mode 100644 (file)
index 0000000..15c5adc
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+?>
\ No newline at end of file
index 5e7cf40..1a85a5e 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+require_once("config.php");
+
 // first and foremost, load the plugins
 $basedir = dirname(__FILE__);
 if(is_dir("$basedir/plugins")) {
index e69de29..e1f7b2e 100644 (file)
@@ -0,0 +1,8 @@
+RewriteEngine on
+RewriteBase /src/eclipse-workspace/glcas/www/ 
+RewriteRule ^index\.php.* - [L]
+RewriteRule ^soap\.php.* - [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
+
index e69de29..5c2f5d8 100644 (file)
@@ -0,0 +1,9 @@
+<html>
+<pre>
+<?php 
+print_r($GLOBALS);
+print_r($_REQUEST);
+print_r($_SERVER);
+?>
+</pre>
+</html>
\ No newline at end of file
diff --git a/www/soap.php b/www/soap.php
new file mode 100644 (file)
index 0000000..454c201
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+require_once("../lib/lib.php");
+
+$soapFunctions["status"] = "status";
+global $soapFunctions;
+
+function status()
+{
+       return "im good";
+}
+
+if(isset($_REQUEST["wsdl"])) {
+       generateWSDL();
+       exit(0);
+}
+
+if(isset($_REQUEST["xsd"])) {
+       //generateXSD();
+       exit(0);
+}
+
+function generageWSDL()
+{
+       
+}
+
+$s = new SoapServer(NULL, array( "uri" => "http://pjr.cc/glcas"));
+
+foreach($soapFunctions as $function) {
+       $s->addFunction($function);
+}
+
+print_r($s->getFunctions());
+
+
+?>
\ No newline at end of file