require_once("lib/nusoap.php");
//Create a new soap server
$server = new soap_server();
//Define our namespace
$namespace = "http://localhost/testtest/sendfile/ExServer.php";
$server->wsdl->schemaTargetNamespace = $namespace;
//Configure our WSDL
$server->configureWSDL("Image");
// Register our method and argument parameters
$varname = array(
'strFileData' => "xsd:string",
);
$server->register('Image',$varname);
//function Image($strbase64,$straa)
function Image($strFileData)
{
$filename = "filename.jpg";
$file = fopen($filename,"w");
$input = $strFileData;
fwrite($file,$input);
fclose($file);
}
// Get our posted data if the service is being consumed
// otherwise leave this data blank.
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
// pass our posted data (or nothing) to the soap service
$server->service($POST_DATA);
exit();