問題:私はAPIをヒットし、SoftLayer_Account#getVirtualGuestsのオブジェクトマスクを使用しようとしていますが、無視されているようです。ヘッダオブジェクトマスクを考慮していないSoftLayerアカウント
<SoftLayer_Virtual_GuestObjectMask>
<mask>
<datacenter xsi:nil="true" />
<bandwidthAllotmentDetail><allocation xsi:nil="true" /></bandwidthAllotmentDetail>
</mask>
</SoftLayer_Virtual_GuestObjectMask>
でSoftLayer_Virtual_Guest.getObjectを呼び出す
は完璧に動作しますが、私は、ヘッダー
<SoftLayer_AccountObjectMask>
<mask>
<datacenter xsi:nil="true" />
<bandwidthAllotmentDetail><allocation xsi:nil="true" /></bandwidthAllotmentDetail>
</mask>
</SoftLayer_AccountObjectMask>
とSoftLayer_Account.getVirtualGuestsを呼び出すとき、それはしていません:私が試した何
仕事、私はhttps://sldn.softlayer.com/article/object-masksの記事で見たように、SoftLayer_Account :: getHardwareを呼び出すときに、特定のタイプのルートプロパティを設定する必要があります。この例によると、SOAPを使って呼び出す方法を理解することはできません。
の例では、私は私の側に扱うことができるSoftLayer_Account.getVirtualGuests
ためとオブジェクト・フィルタマスクオブジェクトを使用する方法で提供することができれば。
mcruzさん、ありがとうございました、私が探していたものです...私は私の要求を変更しました。すべてが完璧に働いています。ちょうど質問です。ObjectFilterで 'virtualGuests'を使う必要があることをどうやって知っていますか?その背後にある論理は何ですか?ありがとうございました! –
通常、 'Object Filters'を適用するとき、私たちは出発点を知るために' return values'が何であるかを知る必要があります。たとえば、[SoftLayer_Account :: getVirtualGuests](http://sldn.softlayer.com/reference/services/SoftLayer_Account/getVirtualGuests)を実行すると、[SoftLayer_Virtual_Guest](http://sldn.softlayer.com/)という配列が返されます。参照/データ型/ SoftLayer_Virtual_Guest)。次に、フィルタを使用するときにその値を操作したい場合は、この結果を処理する必要があります。 – mcruz
'SoftLayer_Account :: getVirtualGuests'を実行する際に、' getVirtualGuests'メソッドから 'get'を削除して' filter'の最初の要素を知ることができます。他の例では、[SoftLayer_Account :: getHardware](http://sldn.softlayer.com/reference/services/SoftLayer_Account/getHardware)の最初の要素は 'hardware'です。これはルールではありませんが、私はそれに続くいくつかのケースを見ることができました。 – mcruz