【发布时间】:2020-08-03 17:50:18
【问题描述】:
我正在通过邮递员使用另一家公司的 SOAP API,但它一直返回错误
根据我的研究,当人们遇到此错误时,他们也在开发 API,并且修复始终是服务器端编辑。所以,我被引导相信这个错误不是我的错。
如果我使用不正确的凭据、错误的 XML 格式等,我可能会收到其他错误。我可以成功地使用此 API 的 SOAP“登录”请求,但此 API 的所有 getter SOAP 请求都会引发同样的错误
我不认为这是帐户权限错误,因为我的上级告诉我该帐户具有所需的权限。我能做些什么来解决这个错误吗?
我的 SOAP 正文:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthenticationHeader xmlns="http://url/omitted/">
<userName>{{username}}</userName>
<userPassword>{{password}}</userPassword>
</AuthenticationHeader>
</soap:Header>
<soap:Body>
<GetDeviceCommands xmlns="http://url/omitted/">
<datagateId>{{datagateid}}</datagateId>
</GetDeviceCommands>
</soap:Body>
</soap:Envelope>
错误:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request. ---> Request for principal permission failed.</faultstring>
<detail />
</soap:Fault>
当我从 c# 发出请求时也遇到同样的错误,所以我知道它是服务器端的。
System.AggregateException: 'constructorArgs[0]Server was unable to process
request. ---> Request for principal permission failed.)'
Inner Exception
FaultException: Server was unable to process request. ---> Request for principal permission failed.
【问题讨论】: