SOAP PHP值不能为空.参数名称:source


SOAP PHP Value cannot be null. Parameter name: source

我正在尝试从这个web服务调用一个函数:

http://www.zulutrade.com/WebServices/Performance.asmx?WSDL

我正在发送所有请求的参数,但我得到这个错误:值不能为空。参数名称:source我认为这是一个服务器问题,但也许我需要改变我的代码:

$client = new SoapClient('http://www.zulutrade.com/WebServices/Performance.asmx?WSDL',
                         array('location' => "http://www.zulutrade.com/WebServices/Performance.asmx",
                               'trace'=>1, 
                               "cache_wsdl" => 0));
$params = array
(
    'providerId' => 109206,
    'fromDateStr' => "1985-12-19",
    'toDateStr' => "2013-05-06",
    'validTrades' => true,
    'lotSize' => "Mini",
    'start' => 0,
    'length' => 20,
    'sortBy' => "buy",
    'sortAscending' => true
);
try
{
    $result =  $client->GetProviderTrades($params);
}
catch (SoapFault $fault)
{
    print_r($fault);
}

任何想法?由于

我尝试使用nussoap类,我得到这个错误

HTTP错误:could 't open socket connection to server http://www.zulutrade.com:81/WebServices/Performance.asmx,错误(10060):连接尝试失败,因为连接的一方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机未能响应

所以这可能是他们的错误

您设置了除一个之外的所有变量。

未设置ArrayOfInt currencyIds;
struct GetProviderTrades {
 int providerId;
 ArrayOfInt currencyIds;
 string fromDateStr;
 string toDateStr;
 boolean validTrades;
 LotSize lotSize;
 int start;
 int length;
 string sortBy;
 boolean sortAscending;
}