我正嘗試創建一個Sub品牌(使用自寫的SOAP客戶端)。在SoftLayer API(返回#500的API)上創建子品牌帳戶
在WSDL SoftLayer_Brand#創建對象要求的參數templateObject
這是一個tns:SoftLayer_Brand
檢查的XSD文件這個複雜的類型我得到的文件類型,我通過以下哈希要求
longName: "Company Long Name",
name: "Company Name",
keyName: "KEY_NAME",
account: {
address1: "123 5th Street",
city: "City",
companyName: "Company Name",
country: "US",
email: "[email protected]",
firstName: "First",
lastName: "Last",
officePhone: '1234-1234',
postalCode: "11011",
state: "NY"
}
我的客戶是使用下面的XML
<?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/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<authenticate>
<username>SL00000</username>
<apiKey>apikeyhash</apiKey>
</authenticate>
</env:Header>
<env:Body>
<tns:createObject>
<templateObject>
<longName>Company Long Name</longName>
<name>Company Name</name>
<keyName>KEY_NAME</keyName>
<account>
<address1>123 5th Street</address1>
<city>City</city>
<companyName>Company Name - Master Account</companyName>
<country>US</country>
<email>[email protected]</email>
<firstName>First</firstName>
<lastName>Last</lastName>
<officePhone>1234-1234</officePhone>
<postalCode>11011</postalCode>
<state>NY</state>
</account>
</templateObject>
</tns:createObject>
</env:Body>
</env:Envelope>
我創建子品牌之前發送請求,但它不是工作了,請你指出我是否缺少任何參數。
在霧SOFTLAYER我們創造這樣https://github.com/fog/fog-softlayer/blob/master/examples/account.md#create-a-connection-to-softlayer-account-service(免責聲明:我霧SOFTLAYER維護者之一)
試圖與參數顯示在此(舊)依據https://gist.github.com/underscorephil/377bd50e71ac02377008並沒有工作過。
只想知道是否有更改或任何驗證正在應用於參數。
謝謝
似乎SoftLayer WSDL是rpc/encoded(據我研究),而我用來支持SOAP操作的庫只支持文檔/文字,我增加了對rpc/encoded的支持,現在事情運行良好。謝謝! –