Witajcie, uczę się obsługi soap servera, bawię narazie się na localhost (MAMP) i mam problem, nie ładuje mi metod z soap server.

SOAP SERVER:
  1. <?php
  2. function hello($name)
  3. {
  4. return "Hello ".$name." in soap server !";
  5. }
  6.  
  7. ini_set("soap.wsdl_cache_enabled", 0);
  8. $server = new SoapServer("http://localhost/PHPSoapServer/soapServer.php", array('soap_version' => SOAP_1_2));
  9.  
  10. $server->addFunction("hello");
  11. $server->handle();
  12.  
  13. ?>


WSDL
  1. <?xml version="1.0"?>
  2. <definitions name="MyDefinition"
  3. targetNamespace="urn:myTargetNamespace"
  4. xmlns:tns="urn:myTns"
  5. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  7. xmlns="http://schemas.xmlsoap.org/wsdl/">
  8. <message name="myRequest">
  9. <part name="reqParam" type="xsd:string"/>
  10. </message>
  11. <message name="myResponse">
  12. <part name="resParam" type="xsd:string"/>
  13. </message>
  14. <portType name="MyPortType">
  15. <operation name="hello">
  16. <input message="tns:myRequest"/>
  17. <output message="tns:myResponse"/>
  18. </operation>
  19. </portType>
  20. <binding name="MyBinding" type="tns:MyPortType">
  21. <soap:binding style="rpc"
  22. transport="http://schemas.xmlsoap.org/soap/http"/>
  23. <operation name="hello">
  24. <soap:operation soapAction=""/>
  25. <input>
  26. <soap:body use="encoded"
  27. namespace="urn:myInputNamespace"
  28. encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  29. </input>
  30. <output>
  31. <soap:body use="encoded"
  32. namespace="urn:myOutputNamespace"
  33. encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  34. </output>
  35. </operation>
  36. </binding>
  37. <service name="MyService">
  38. <documentation>Returns a greeting string.
  39. </documentation>
  40. <port name="MyPort" binding="tns:MyBinding">
  41. <soap:address
  42. location="http://localhost/PHPSoapServer/soapServer.php"/>
  43. </port>
  44. </service>
  45. </definitions>


SOAP CLIENT
  1. <?php
  2. $client = new SoapClient("http://localhost/PHPSoapServer/hello.wsdl");
  3.  
  4. var_dump($client->hello('tomsol'));


po uruchomieniu soapClient.php localhost się zawiesza i musze restartować MAMP, co robię źle ?