我正试图利用冻结的1.1.7号网络服务来提供网络服务。
文件指出,我需要用以下格式发出呼吁:
RequestCustomReport(CustomReportDef, SecurityCredential)
结构如下:
<securityCredentials>
<Key>string</Key>
<UserName>string</UserN
<Password>string</Passw
</securityCredentials>
<reportDefinition>
<CustomTemplateId>int</CustomTemplateId>
<StartDate>dateTime</StartDate>
<EndDate>dateTime</EndDate>
<PeriodId>int</PeriodId>
<SiteId>int</SiteId>
<ReportGUID>string</ReportGUID>
<ReportData>base64Binary</ReportData>
<ReportDataType>xml or csv or tsv or txt</ReportDataType>
<CompressReportData>boolean</CompressReportData>
<ReportStatus>Pending or Ready or Error or Deleted</ReportStatus>
<ErrorMessage>string</ErrorMessage>
</reportDefinition>
我的自愿守则是:
$client = new Zend_Soap_Client($ws_url);
$reqFilter = array();
$reqFilter[ CustomTemplateId ] = 33117; //33117 = report id
//$reqFilter[ StartDate ] =
//$reqFilter[ ] = ;
$reqFilter[ PeriodId ] = 4; //4 = last 7 days
$reqFilter[ SiteId ] =3672;
$reqFilter[ ReportDataType ] = xml ;
$reqFilter[ CompressReportData ] =0;
$reptXml=new XMLWriter();
$reptXml->openMemory();
$reptXml->startDocument( 1.0 , UTF-8 );
$reptXml->startElement("reportDefinition");
$reptXml->startElement("CustomTemplateId");
$reptXml->text($reqFilter[ CustomTemplateId ]);
$reptXml->endElement();//CustomTemplateId
$reptXml->startElement("PeriodId");
$reptXml->text($reqFilter[ PeriodId ]);
$reptXml->endElement();//PeriodId
$reptXml->startElement("SiteId");
$reptXml->text((int)$reqFilter[ SiteId ]);
$reptXml->endElement();//SiteId
$reptXml->startElement("ReportDataType");
$reptXml->text($reqFilter[ ReportDataType ]);
$reptXml->endElement();//ReportDataType
$reptXml->startElement("CompressReportData");
$reptXml->text(0);
$reptXml->endElement();// CompressReportData
$reptXml->endElement();//reportDefinition
/*
* securityCredentials xml
*/
$secXml=new XMLWriter();
$secXml->openMemory();
$secXml->startDocument( 1.0 , UTF-8 );
$secXml->startElement("securityCredentials");
$secXml->startElement("Key");
$secXml->text( ---- );
$secXml->endElement();
$secXml->startElement("UserName");
$secXml->text( --.-- );
$secXml->endElement();
$secXml->startElement("Password");
$secXml->text( ---- );
$secXml->endElement();
$secXml->endElement();
$result = $client->RequestCustomReport($reptXml,$secXml);
但是,我正在犯以下错误:
致命错误: Unvista SoapFault exception: [收益:数额] 报告的定义是一个必要的参数,但没有在C:wampwwwlibsend-1.11.10endSoapClient.php中提供:1121 痕迹: #0 C:wampwwwlibsend-1.11.10endSoapClient.php(1121): SoapClient->_soapCall(请求CustomRe...、Array、NULLL、NULL、Array) #1 [内部职能]: Zend_Soap_Client->__questCustomRe..., Array #2 C:wampwwwProfound_testwsdl.php(109): Zend_Soap_Client->RequestCustomReport(Object(XMLWriter), Object(XMLWriter) #3{main} 扔进 C:wampwwwlibsend-1.11.10endSoapClient.php on line 1121
似乎并不承认我已经通过报告定义参数,将其作为正确的名称。
谁能帮助?