Skip to content

Instantly share code, notes, and snippets.

@terrafied
Last active December 20, 2015 11:39
Show Gist options
  • Save terrafied/6124512 to your computer and use it in GitHub Desktop.
Save terrafied/6124512 to your computer and use it in GitHub Desktop.
One Page Soap Server
// Create a file named "login.php" within a WSDL recognized folder (e.g. www/test/wsdl).
<?php
if(!extension_loaded("soap")){
dl("php_soap.dll");
}
ini_set("soap.wsdl_cache_enabled","0");
$server = new SoapServer("login.wsdl");
function UserLoginCommand($yourName){ //EXAMPLE! NOT VALID ARGUMENT LIST
return "<xml></name>".$yourName."</name></xml>"; //NOT VALID SOAP RETURN
}
$server->AddFunction("UserLoginCommand");
$server->handle();
?>
@terrafied
Copy link
Author

This code is untested, it is for use as an example only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment