SOAP-ERROR:编码:对象没有'any'属性

时间:2013-09-16 09:52:47

标签: soap wsdl

$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:编码:对象在...中没有'任何'属性”设置为字符串 $ 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>
你能帮帮我吗?这是什么错误?

0 个答案:

没有答案