| |
phpsoa |
i just write my first demo for sca php,helloworld,the code is:
include 'SCA/SCA.php';
/**
http://localhost:8082/myphp/helloworldscawsreference/Greeting.wsdl
include 'SCA/SCA.php';
//$wsdl = file_get_contents('http://localhost:8082/myphp/
$greeting_service = SCA::getService('http://localhost:8082/myphp/
echo $greeting_service->greet('liaoyurong');
?>
Fatal error: Uncaught SCA_RuntimeException: SDO_Exception in
my php version is php 5.2.8,the run in visita system
* @service
* @binding.soap
*/
class Greeting
{
/**
* @param string $name
* @return string
*/
public function greet($name)
{
return 'hello ' . $name;
}
and when i run the code above,it generated the wsdl,and the wsdl is:
and i can use the ie browser to see it.
the the client code is:
<?
helloworldscawsreference/Greeting.wsdl');
//file_put_contents("service.wsdl",$wsdl); //write the wsdl to a file
$service=SCA::
helloworldscawsreference/Greeting.wsdl');
but when i runt the code,i wait for a long time,then get the result
is:
setWSDLTypes : SDO_DAS_XML::create - Unable to parse the supplied xsd
file 1 parse error(s) occurred when parsing the file 'http://localhost:
8082/myphp/helloworldscawsreference/Greeting.wsdl': 1.
xmlSAXUserParseFile returned an error -1 thrown in D:\php5\PEAR\SCA
\Bindings\soap\Proxy.php on line 104