<?php
$client = new SoapClient('http://127.0.0.1/ActivityWebService/OnsiteActivity.asmx?WSDL');//这里必须加上?WSDL
$result=$client->__soapCall("Get_SignInfo",array(array('p_intActID'=>$actid)));
if (is_soap_fault($result)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
}else{
$data=$result->Get_SignInfoResult->any;//这里返回的是类,必须使用->得到元素的值
//print_r($data);
}
$doc = new DOMDocument();
$doc->loadXML( $data );
$books = $doc->getElementsByTagName( "ActivityInfo" );
foreach( $books as $book )
{
$actid = $book->getElementsByTagName( "actid" );
$actid = $actid->item(0)->nodeValue;
$mobile = $book->getElementsByTagName( "mobile" );
$mobile = $mobile->item(0)->nodeValue;
$signtime=$book->getElementsByTagName( "signtime" );
$signtime = $signtime->item(0)->nodeValue;
$signtime=strtotime($signtime);
}