0
我已經安裝了WSO2 API-M並嘗試更新用戶的角色。WSO2:通過Web服務更新用戶的角色
我的請求體:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:addRemoveRolesOfUser>
<!--Optional:-->
<xsd:userName>tom</xsd:userName>
<!--Zero or more repetitions:-->
<xsd:newRoles>internal/subscriber</xsd:newRoles>
<!--Zero or more repetitions:-->
<xsd:deletedRoles>admin</xsd:deletedRoles>
</xsd:addRemoveRolesOfUser>
</soap:Body>
</soap:Envelope>
我的回答是:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Receiver</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">Error occurred while getting
database type from DB connection</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
我儘量只刪除角色是好的,但不能添加新角色。
有沒有人知道發生了什麼?
2016年8月23日更新:
updateRolesOfUser的要求:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:updateRolesOfUser>
<!--Optional:-->
<xsd:userName>?</xsd:userName>
<!--Zero or more repetitions:-->
<xsd:newRoleList>?</xsd:newRoleList>
</xsd:updateRolesOfUser>
</soap:Body>
</soap:Envelope>
感謝
湯姆
感謝您的答覆。你可以嘗試updateRolesOfUser嗎?我會在上面發帖。錯誤將是相同的,非常感謝。 –
嘗試updateRolesOfUser。只有在新角色列表中添加一個角色時纔有效。我可以知道你的確切要求嗎? – Dilini
我的要求是:管理員可以通過Web服務API更改用戶的角色。我的API-M版本是1.10.0。我嘗試updateRolesOfUser但失敗,所以我嘗試addRemoveRolesOfUser ...它也失敗了。 –