1
지난 2 일 동안 NuSoap을 사용하여 PHP로 웹 서비스를 만들려고 노력했습니다. 그러나, 끝없이 다양한 튜토리얼과 가이드를 통해 선별 한 후에, 나는 여전히 작동을 거절하는 코드의 012 라인을 과 붙어있다.NuSoap 도움말 - 웹 서비스 생성
서버 :
// Pull in the NuSOAP code
require_once('./lib/nusoap.php');
// Create the server instance
$server = new soap_server;
// Initialize WSDL support
$server->configureWSDL('hellowsdl','http://mysite.com');
// Register the method to expose
$server->register('hello',
array("params"=>"xsd:string"),
array("result"=>"xsd:string"),
'http://mysite.com'
);
// Define the method as a PHP function
function hello($name) {
return 'Hello, ' . $name;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
그리고 클라이언트 :
// Pull in the NuSOAP code
require_once('./lib/nusoap.php');
// Create the client instance
$client = new nusoap_client('http://localhost/nusoap/server.php?wsdl',true);
// Call the SOAP method
$result = $client->call('hello',array("name"=>"Scott"));
var_dump($result);
나에게 (false)를 부울를 제공
내가 잘못 갈거야 ??? 당신이 방법을 등록 할 때