PHP soap调用来自函数

PHP soap调用来自函数,php,web,soap,wsdl,Php,Web,Soap,Wsdl,我有一个wsdl文件,其中包含一个返回结果的函数 <s:element name="RecordDataResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="RecordDataResult" type="s:string"/> <

我有一个wsdl文件,其中包含一个返回结果的函数

<s:element name="RecordDataResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RecordDataResult" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="message" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
但是你会得到这个错误

Uncaught SoapFault exception: [Client] Function ("RecordDataResponse") is not a valid method for this service in ...

有什么提示吗?使用windows php,我可以将数据放入..

函数名实际上是
ImportData1
,而属性
RecordDataResult
可能在响应中存在,也可能不存在。这就是:

$responseObject=$soapclient->ImportData1(/*如果有参数,请在此处放置*/);
if(设置($responseObject->RecordDataResult))
{
$response2=$responseObject->RecordDataResult;
}
其他的
{
$response2='N/A';//例如
};

我做了一个get__函数,注意到函数中有重复的名称,但在wsdl文件中,只有一个数组(2){[0]=>string(56)“RecordDataResponse ImportData1(ImportData1$parameters)”[1]=>string(56)“RecordDataResponse ImportData1(ImportData1$parameters)”}奇怪……请不要在评论中散布必要的信息来回答你的问题:相反。
Uncaught SoapFault exception: [Client] Function ("RecordDataResponse") is not a valid method for this service in ...