【问题标题】:API returns error: Request for principal permission failedAPI 返回错误:请求主体权限失败
【发布时间】: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. ---&gt; 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.

【问题讨论】:

    标签: c# xml api soap postman


    【解决方案1】:

    原来这是一个权限错误,设置帐户的人做错了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-18
      • 1970-01-01
      • 2018-03-10
      • 2014-05-17
      • 2022-12-19
      • 1970-01-01
      • 2018-04-19
      相关资源
      最近更新 更多