Php SOAP客户端函数:如何传递属性

Php SOAP客户端函数:如何传递属性,php,soap,sabre,Php,Soap,Sabre,我在webservice soap客户端函数中传递一个对象作为参数 我使用的对象是: $soap_xml_data = new stdClass; $soap_xml_data->Version = '1.1.0'; $soap_xml_data->TargetSystem = '2'; $soap_xml_data->PrimaryLangID = 'en-us'; 在SOAP消息正文中,我希望得到: <SOAP-ENV:Body> <ns

我在webservice soap客户端函数中传递一个对象作为参数

我使用的对象是:

$soap_xml_data = new stdClass;
$soap_xml_data->Version = '1.1.0';
$soap_xml_data->TargetSystem = '2';
$soap_xml_data->PrimaryLangID = 'en-us';
在SOAP消息正文中,我希望得到:

<SOAP-ENV:Body>
        <ns2:TheWebService TargetSystem="2" Version="1.1.0" PrimaryLangID="en-us">
为什么属性Version和TargetSystem位于SOAP正文消息第一个节点中,而PrimaryLangID不在其中

<SOAP-ENV:Body>
        <ns2:TheWebService TargetSystem="2" Version="1.1.0">
Client request's payload malformed: Missing PrimaryLangID attribute.