$sh_param = array(
'SessionKey' => $sessionKey,
'ClientName' => 'QABudgetClient',
'UserName' => 'username'
);
$ap_param = array(
'actuals' => array(
'BUDGET' => array(
'Business_Unit' => 1,
),
),
'integration_id' => 1
);
$headers = new SoapHeader('http://tempuri.org/', 'SecurityHeader', $sh_param);
$client->__setSoapHeaders($headers);
$info = $client->__soapCall("GN_SET_ACTUAL", array($ap_param));
它为我返回“致命错误:SOAP-ERROR: Encoding: object has no 'any' property in..”设置为字符串 $info = $client->__soapCall("PN_SET_ACTUAL", array($ap_param));
这是函数:服务器上的 GN_SET_ACTUAL(XmlDocument actuals, Int32 integration_id)
这是来自 wdsl 的描述
<s:element name="GN_SET_ACTUAL">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="actuals">
<s:complexType mixed="true">
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="1" maxOccurs="1" name="integration_id" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
这个请求可以从 SOAPUI 正常工作:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header>
<tem:SecurityHeader>
<!--Optional:-->
<tem:SessionKey>XXX</tem:SessionKey>
<!--Optional:-->
<tem:ClientName>QABudgetClient</tem:ClientName>
<!--Optional:-->
<tem:UserName>username</tem:UserName>
</tem:SecurityHeader>
</soapenv:Header>
<soapenv:Body>
<tem:GN_SET_ACTUAL>
<!--Optional:-->
<tem:actuals>
<BUDGET>
<Business_Unit>1</Business_Unit>
</BUDGET>
</tem:actuals>
<tem:integration_id>1</tem:integration_id>
</tem:GN_SET_ACTUAL>
</soapenv:Body>
</soapenv:Envelope>
你能帮助我吗?错误是什么?