I've a php class and i want to use it with Nusoap. Can I register the class method's that already exists inside the nusoap with the register command?
Sample :
Here we register a function that we defined inside this script. But if we've a class that we maybe develop months ago and we want to use it as a webservice using the WSDL. Is there a way to register the methods of that class so that Nusoap creates a WSDL of it's stucture (methods inside)?
require_once("nuSOAP/lib/nusoap.php");
$server = new soap_server();
$namespace = "http://localhost/nusoapSCRIPT/index.php";
$server->wsdl->schemaTargetNamespace = $namespace;
$server->configureWSDL("SAMPLE");
$server->register('HelloWorld');
function HelloWorld()
{
return "Hello, World!";
}
Well here's how i solve this... maybe someone can try an approach in another way.
and the class code.
I also create a soap client in c# and it consumes correctly the soap service.
Hope this help!
You can call the method using
getProxy()