我试图从SOAP服务获得响应,我在我的XML文件中有这个:
<xs:complexType name="GetInsuranceDataF">
<xs:sequence>
<xs:element name="req" type="tns:request" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="request">
<xs:sequence>
<xs:element name="lbo" type="xs:string" minOccurs="0"/>
<xs:element name="zk" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
我尝试以两种方式发送数据:
class Request {
public $lbo;
public $zk;
}
$request = new Request();
$request->lbo = '13900140107';
$request->zk = '20024179770';
$search = array('req' => $request);
和:
$search = array('req' => array('lbo' => '13900140107', 'zk' => '20024179770'));
但这不起作用,有人可以帮我这个吗?