I have an wsdl file with a function that returns results
<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>
I tried this but came up with an invalid function result.. i just want to get the value from this function
$response2 = $soapclient->RecordDataResponse()->RecordDataResult;
but get this error
Uncaught SoapFault exception: [Client] Function ("RecordDataResponse") is not a valid method for this service in ...
any hints? using windows php and I can put data in ..
The function name is actually ImportData1
and attribute RecordDataResult
may or may not exist in the response. So here it is:
$responseObject = $soapclient->ImportData1(/* put parameters here if any */);
if (isset($responseObject -> RecordDataResult))
{
$response2 = $responseObject -> RecordDataResult;
}
else
{
$response2 = 'N/A'; // For example
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.