خرید بک لینک

Vote count: 0

According to XSD file, SoftLayer_Product_PackageObjectFilter receive a categories parameter that is a tns:SoftLayer_Product_Item_CategoryObjectFilter.

SoftLayer_Product_Item_CategoryObjectFilter accepts categoryCode that is a SoftLayer_Utility_ObjectFilter_Operation, so a filter to get only categories with categoryCode 'guest_disk0' would be:

object_filter = {
  'categories': {
    'categoryCode': {
      'operation': 'guest_disk0'
    }
  }
}

When I call with this filter on header, I'm receiving SoftLayer_Exception_Public

Here is my SOAP request

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://api.service.softlayer.com/soap/v3.1/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header>
    <authenticate>
      <useame>USER</useame>
      <apiKey>KEY</apiKey>
    </authenticate>
    <tns:SoftLayer_Product_PackageObjectFilter>
      <categories>
        <categoryCode>
          <operation>guest_disk0</operation>
        </categoryCode>
      </categories>
    </tns:SoftLayer_Product_PackageObjectFilter>
    <tns:SoftLayer_ObjectMask>
      <mask>mask[categoryCode,name]</mask>
    </tns:SoftLayer_ObjectMask>
    <SoftLayer_Product_PackageInitParameters>
      <id>46</id>
    </SoftLayer_Product_PackageInitParameters>
  </env:Header>
  <env:Body>
    <tns:getCategories></tns:getCategories>
  </env:Body>
</env:Envelope>

Following the exact same idea, but filtering activeRamItems for keyName we can perfectly use the filter

object_filter = {
  'activeRamItems': {
    'keyName': {
      'operation': 'RAM_12_GB'
    }
  }
}

The SOAP request is exact the same used for categories, just changing the filter

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://api.service.softlayer.com/soap/v3.1/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header>
    <authenticate>
      <useame>USER</useame>
      <apiKey>KEY</apiKey>
    </authenticate>
    <tns:SoftLayer_Product_PackageObjectFilter>
      <activeRamItems>
        <keyName>
          <operation>RAM_12_GB</operation>
        </keyName>
      </activeRamItems>
    </tns:SoftLayer_Product_PackageObjectFilter>
    <tns:SoftLayer_ObjectMask>
      <mask>mask[id,keyName]</mask>
    </tns:SoftLayer_ObjectMask>
    <SoftLayer_Product_PackageInitParameters>
      <id>46</id>
    </SoftLayer_Product_PackageInitParameters>
  </env:Header>
  <env:Body>
    <tns:getActiveRamItems></tns:getActiveRamItems>
  </env:Body>
</env:Envelope>

I do REALLY believe this is an API error, but as the SoftLayer procedure is open a question on stack overflow for any API related issues, I'm opening here

asked 42 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 11 فروردين 1395 ساعت: 9:36

صفحه بندی