创建PHP soap Web服务

I am very new to PHP and weak in programming.

I need to create a web service using PHP.

The main purpose is to allow user to enter their info and validate it at the backend database.

User enter their info in HTML in an array of

$_SESSION['ctform'][]

detail.php (client)

$wsdl = "http://localhost/detail_logic.php";
$client = new soapclient($wsdl);
$response = $client->_call('process_si_contact_form', array($_SESSION['ctform']));

detail_logic.php (server)

function process_si_contact_form()
{
//Process and validate the info
//Data base connection
}

$ss = new SoapServer(null, $_SESSION['ctform']);
$ss->addFunction("process_si_contact_form");
$ss->handle();

I have many error like:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/detail_logic.php' 

Please help and Thank you.

I think, You need a wsdl file for creating a Soap based server, So client can be communicate to it. Also client will communicate through wsdl file not directly with Url. See http://php.net/manual/en/sca.examples.understanding-wsdl.php and http://in1.php.net/manual/en/soapclient.soapclient.php