1

我在我的 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">

相反,我得到

<SOAP-ENV:Body>
        <ns2:TheWebService TargetSystem="2" Version="1.1.0">

Web 服务返回:

Client request's payload malformed: Missing PrimaryLangID attribute. 

为什么 SOAP 正文消息的第一个节点中存在 Version 和 TargetSystem 属性,而 PrimaryLangID 却没有?

4

0 回答 0