Php WSDL Soap返回问题
嘿,伙计们,我如何返回我选择的所有用户的SOAP信封或数组? 我试图返回数据库结果集的数组,但没有返回,这是我的wsdlPhp WSDL Soap返回问题,php,xml,web-services,soap,wsdl,Php,Xml,Web Services,Soap,Wsdl,嘿,伙计们,我如何返回我选择的所有用户的SOAP信封或数组? 我试图返回数据库结果集的数组,但没有返回,这是我的wsdl <?xml version='1.0' encoding='utf-8' ?> <definitions name="ClientSearch" targetNamespace="urn:ClientSearch" xmlns:typens="urn:ClientSearch" xmlns:xsd="http://www.w3.org/2001/XMLSch
<?xml version='1.0' encoding='utf-8' ?>
<definitions name="ClientSearch" targetNamespace="urn:ClientSearch" xmlns:typens="urn:ClientSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="searchUser">
<part name="userName" type="xsd:string" />
</message>
<message name="searchUserResponse">
<part name="searchUserReturn" type="xsd:string" />
</message>
<portType name="searchUserPortType">
<operation name="searchUser">
<input message="typens:searchUser" />
<output message="typens:searchUserResponse" />
</operation>
</portType>
<binding name="searchUserBinding" type="typens:searchUserPortType">
<operation name="searchUser">
<soap:operation soapAction="urn:searchUserAction" />
<input>
<soap:body namespace="urn:ClientSearch" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body namespace="urn:ClientSearch" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="clientSearchService">
<port name="searchUserPort" binding="typens:searchUserBinding">
<soap:address location="http://localhost/service/server.php"/>
</port>
</service>
</definitions>
呼叫网页webserviceçe
<?php
ini_set("soap.wsdl_cache_enabled", "0");
$oSoapClient = new SOAPClient("http://localhost/service/service.wsdl");
var_dump( $oSoapClient->searchUser( 'name' ) ) ;
?>
我认为您的代码中缺少几个部分
纠正这些错误,您应该会没事。我认为您的代码中缺少几个部分
<?php
ini_set("soap.wsdl_cache_enabled", "0");
$oSoapClient = new SOAPClient("http://localhost/service/service.wsdl");
var_dump( $oSoapClient->searchUser( 'name' ) ) ;
?>