我正尝试创建一个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的支持,现在事情运行良好。谢谢! –