I have URL-parameters on my soapserver call. Calling 'mysoapserver.php?version=1' works well, except in this case
mysoapserver.php?wsdl&version=1
Soapserver does not output the wsdl.
The code looks like this
$version = isset($_GET['version']) ? $_GET['version'] : 1;
switch($version) {
case 1:
$wsdl = 'myservices.v1.wsdl';
break;
case 2:
$wsdl = 'myservices.v2.wsdl';
break;
default:
throw new SoapFault('Server',utf8_encode('error'));
break;
}
$mysoapserver = new SoapServer($wsdl);
$mysoapserver->setClass('SOAPServices');
$mysoapserver->handle();
Any ideas how to get this working?
I had the same problem, GET was empty. The problem was that I was reading it inside my service. The problem is that we can't print inside a server cause it is an xml file, it we try it, it would return us error, then an good trick is this.
Saving the result in other file.