3
$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: エンコーディング: オブジェクトに 'any' プロパティがありません..」 が返され、文字列 $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>

手伝って頂けますか?間違いは何ですか?

4

0 に答える 0