我想在此Web服务(.Net)中调用一个函数:
http://cmr.rmto.ir/WCFServices/CMRService.svc?wsdl
在PHP中我发送所有变量,似乎是真的!但错误是:'值不能为空。参数名称:source':
值不能为空。参数名称:source
这是我的代码:
$params = array
(
'T'=> array
(
'CMRCategory'=>array
(
'CMRList'=> array
(
1 =>array
(
'CMR' => array
(
'AttachmentDocuments'=>'AttachmentDocuments',
'BLNumber'=> '123654' ,
'CMRItems'=> array
(
1 => array
(
'CMRItem'=> array
(
'ClientID'=>'1',
'FK_GoodClassID'=> 15,
'FK_PackageTypeID'=> 102,
'GoodsDescription'=> 'GoodsDescription',
'GrossWeight'=> '5.5',
'HSCODE'=> '1',
'KotajNo'=> 'KotajNo',
'Marks'=> 'Marks',
'NetWeight'=> '5.5',
'Quantity'=> '5.5',
'StatisticalNumber'=> 'StatisticalNumber',
'Volume'=>'5.5'
),
),
),
'CarnetTirNo'=> 'CarnetTirNo',
'ClientID' => '1' ,
'Consignee' => array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'GoodsDescription' =>'GoodsDescription' ,
'IssueDate'=> '2013-06-09 12:03',
'LoadingDate'=> '2013-06-09 12:03',
'Notify'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'PlaceOfDischarge'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'PlaceOfIssue'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'PlaceOfLoading'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'PlaceOfReceipt'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'PrintSerialNo'=> 'PrintSerialNo',
'ReceiptDate'=> '2013-06-09 12:03',
'ReferenceNo'=> 'ReferenceNo',
'Remark'=> 'Remark',
'Shipper'=> array
(
'Description'=>'Description',
'FK_CountryID'=>2
),
'TotalWeight'=> '12.6',
),
),
),
'ClientID'=> 2,
'DocumentNo'=>'DocumentNo',
'Driver' => array
(
'Description'=>'Description',
'FK_CountryID'=>2,
'ExternalID'=>6,
'FatherNameE'=> 'FatherNameE',
'FatherNameP'=>'FatherNameP',
'LastNameE'=> 'LastNameE',
'LastNameP'=> 'LastNameP',
'LicenceNo'=> 'LicenceNo',
'MotherNameE'=> 'MotherNameE',
'MotherNameP'=> 'MotherNameP',
'NameE'=> 'NameE',
'NameP'=> 'NameP',
'PassportNo'=> 'PassportNo'
),
'FK_InputBorderID' =>1,
'FK_NationalityID' =>3,
'FK_OutputBorderID' =>1,
'FK_TransportTypeID' =>1,
'HashData' =>'',
'LeaveDate' =>'2013-12-14',
'Number' =>'25454',
'Signature' =>'',
'Truck'=> array
(
'ExternalID'=>'ExternalID',
'FK_CountryID'=> 10,
'TransitNo'=> 'tran13',
'TruckNo'=> 'TruckNo',
)
),
),
);
$client = new SoapClient('http://cmr.rmto.ir/WCFServices/CMRService.svc?wsdl');
$res=$client->__call('GetHash',array('parameters' => $params));
var_dump($res);