我得到这个从SOAP客户端请求:不是有效的AllXsd值
异常:异常的SOAPFault: [肥皂:客户端]服务器无法 读请求。 --->在XML文档(2,273)中有一个错误 。 ---> 字符串'2010-5-24'不是有效的 AllXsd值。在/path/filinet.php:21 堆栈跟踪:#0 [内部函数]: SoapClient - > __ call('SubIdDetailsByO ...', Array)#1 /path/filinet.php(21): SoapClient - > SubIdDetailsByOfferId(阵列)#2 {}主要
好像我发送一个不正确的值,我如何在PHP格式化的AllXsd我的价值?
这里是我的代码:
<?php
$start = isset($_GET['start']) ? $_GET['start'] : date("Y-m-d");
$end = isset($_GET['end']) ? $_GET['end'] : date("Y-m-d");
//define parameter array
$param = array('userName'=>'user', 'password'=>'pass', 'startDate' => $start, 'endDate' => $end, 'promotionId' => '');
//Get wsdl path
$serverPath = "https://webservices.filinet.com/affiliate/reports.asmx?WSDL";
//Declare Soap client
$client = new SoapClient($serverPath);
try {
//make the call
$result = $client->SubIdDetailsByOfferId($param);
//If error found display error
if(isset($fault))
{
echo "Error: ". $fault;
}
//If no error display response
else
{
//Used to display raw XML in the Web Browser
header("Content-Type: text/xml;");
//SubIdDetailsResult = XML results
echo $result->SubIdDetailsByOfferIdResult;
}
}
catch(SoapFault $ex) {
echo "<b>Exception:</b> ". $ex;
}
unset($client);
?>
遗憾,它并没有奏效。 – 2010-05-24 20:09:43