Php 来自wsdl的Soap查询

Php 来自wsdl的Soap查询,php,soap,wsdl,Php,Soap,Wsdl,我正试图编写一个PHP脚本来从服务器检索一些数据。 我有一个wsdl文件,其中包含我需要调用的函数的以下条目: <xs:element name="getRecoveryPointByID" type="tns:getRecoveryPointByID"/> <xs:complexType name="getRecoveryPointByID"> <xs:sequence> <xs:element minOccurs="0" name="disk

我正试图编写一个PHP脚本来从服务器检索一些数据。 我有一个wsdl文件,其中包含我需要调用的函数的以下条目:

<xs:element name="getRecoveryPointByID" type="tns:getRecoveryPointByID"/>
<xs:complexType name="getRecoveryPointByID">
<xs:sequence>
    <xs:element minOccurs="0" name="diskSafe" type="tns:diskSafe"/>
    <xs:element minOccurs="0" name="recoveryPointID" type="xs:long"/>
</xs:sequence>
</xs:complexType>
但我真的不明白它是怎么工作的。 有人能帮助我理解如何构建查询吗

我是PHP和soap的真正初学者

提前谢谢


Benoît

getRecoveryPointByID需要一个对象,而不是一个数组(这是使用“complextypes”得到的结果)

类似于此,将arrray投射到对象(受此启发):


这可能需要一些调整。还有其他方法(例如使用),但它们是漫长而艰巨的。肥皂真让人痛苦…

谢谢你的帮助。我想我知道我现在的问题在哪里了。Soap调用等待的是diskSafe类型,而不是直接的ID。这肯定是函数中传递的类型的问题。现在已解决:)
getRecoveryPointIDs(array('aecaaba8-c57b-4401-82a7-27775383b04b','1'));
$soap_client->getRecoveryPointIDs(
   (object)array(
        'diskSafe' => 'aecaaba8-c57b-4401-82a7-27775383b04b',
        'recoveryPointID' => '1'
   ));