我有一个名为 get_file_list 的肥皂函数,我想为 PHP 编写它,但是我无法让它工作。它有三个参数,1)开始时间,2)结束时间,3)布尔值。这是示例代码在肥皂中的样子;
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:get_file_list soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://schemas.cisco.com/ast/soap/">
<in0 xsi:type="xsd:string">200511161000</in0>
<in1 xsi:type="xsd:string">200511161059</in1>
<in2 href="#id0"/>
</ns1:get_file_list>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:boolean"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">true</multiRef>
</soapenv:Body>
</soapenv:Envelope>
我已经像这样编写了 PHP;
$response = $soapClient->__get_file_list(array('$in0'=>'201401161000','$in1'=>'201401161059','$in2'=>'id0'));
print_r($response);
我知道我肯定在进行身份验证,并且 get_file_list 是一个真正的肥皂函数,因为我能够生成此输出;
Array
(
[0] => ArrayOfFileName get_file_list(string $in0, string $in1, boolean $in2)
[1] => void get_file(string $in0, string $in1, string $in2, string $in3, string $in4, boolean $in5)
)
当我执行页面时,它返回一个空白。任何帮助表示赞赏。
这是wsdl
<wsdl:definitions targetNamespace="http://schemas.cisco.com/ast/soap/"><!--WSDL created by Apache Axis version: 1.4 With AXIS-2250
Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema targetNamespace="http://schemas.cisco.com/ast/soap/"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="ArrayOfFileName"><sequence><element maxOccurs="unbounded" minOccurs="0" name="FileName" nillable="true" type="xsd:string"/></sequence></complexType></schema></wsdl:types><wsdl:message name="get_file_listRequest"><wsdl:part name="in0" type="xsd:string"/><wsdl:part name="in1" type="xsd:string"/><wsdl:part name="in2" type="xsd:boolean"/></wsdl:message><wsdl:message name="get_fileResponse">
</wsdl:message><wsdl:message name="get_fileRequest"><wsdl:part name="in0" type="xsd:string"/><wsdl:part name="in1" type="xsd:string"/><wsdl:part name="in2" type="xsd:string"/><wsdl:part name="in3" type="xsd:string"/><wsdl:part name="in4" type="xsd:string"/><wsdl:part name="in5" type="xsd:boolean"/></wsdl:message><wsdl:message name="get_file_listResponse"><wsdl:part name="get_file_listReturn" type="impl:ArrayOfFileName"/></wsdl:message><wsdl:portType name="CDRonDemand"><wsdl:operation name="get_file_list" parameterOrder="in0 in1 in2"><wsdl:input message="impl:get_file_listRequest" name="get_file_listRequest"/><wsdl:output message="impl:get_file_listResponse" name="get_file_listResponse"/></wsdl:operation><wsdl:operation name="get_file" parameterOrder="in0 in1 in2 in3 in4 in5"><wsdl:input message="impl:get_fileRequest" name="get_fileRequest"/><wsdl:output message="impl:get_fileResponse" name="get_fileResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="CDRonDemandSoapBinding" type="impl:CDRonDemand"><wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="get_file_list"><wsdlsoap:operation soapAction="http://schemas.cisco.com/ast/soap/action/#CDRonDemand#get_file_list"/><wsdl:input name="get_file_listRequest"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.cisco.com/ast/soap/" use="encoded"/></wsdl:input><wsdl:output name="get_file_listResponse"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.cisco.com/ast/soap/" use="encoded"/></wsdl:output></wsdl:operation><wsdl:operation name="get_file"><wsdlsoap:operation soapAction="http://schemas.cisco.com/ast/soap/action/#CDRonDemand#get_file"/><wsdl:input name="get_fileRequest"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:CDRonDemand" use="encoded"/></wsdl:input><wsdl:output name="get_fileResponse"><wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.cisco.com/ast/soap/" use="encoded"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="CDRonDemandService"><wsdl:port binding="impl:CDRonDemandSoapBinding" name="CDRonDemand"><wsdlsoap:address location="https://<server_ip>:8443/CDRonDemandService/services/CDRonDemand"/></wsdl:port></wsdl:service></wsdl:definitions>