这是我的代码:
$username = 'xxx';
$password = 'xxx';
$soapURL="my_url?wsdl";
$ns = 'my_url';
//Namespace of the WS.
//Body of the Soap Header.
$headerbody=array('UsernameToken'=>array('Username'=>$username,'Password' => $password ));
//Create Soap Header.
$client=new SoapClient($soapURL,array());
$header = new SOAPHeader($ns, 'authentication', $headerbody);
//set the Headers of Soap Client.
$client->__setSoapHeaders($header);
$data=array("Gender"=>"m", "ProspectType"=>"abc", "TariffProfile"=>"test");
$response = $client->__soapCall("myfunction",$data);
echo "<pre>";var_dump($response);
你能告诉我其中有什么问题吗?