WSO2 IS 5.1.0 - 使用 Soap 更新服务提供商时出错
WSO2 IS 5.1.0 - Error while updating Service Provider using Soap
在更新服务提供商的权限时,有时叶节点不会被删除。
例如,
服务提供商中存在以下权限,
BILL/ADD
BILL/REMOVE
REPORT/ADD
REPORT/REMOVE
仅在获得以下许可的情况下进行更新,
REPORT/ADD
REPORT/REMOVE
示例 SOAP 调用:
端点:
services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:updateApplication>
<xsd:serviceProvider>
<xsd1:applicationID>1</xsd1:applicationID>
<xsd1:applicationName>SP1</xsd1:applicationName>
<xsd1:permissionAndRoleConfig>
<xsd1:permissions>
<xsd1:value>REPORT/ADD</xsd1:value>
</xsd1:permissions>
<xsd1:permissions>
<xsd1:value>REPORT/REMOVE</xsd1:value>
</xsd1:permissions>
</xsd1:permissionAndRoleConfig>
<xsd1:inboundProvisioningConfig>
</xsd1:inboundProvisioningConfig>
<xsd1:outboundProvisioningConfig>
</xsd1:outboundProvisioningConfig>
</xsd:serviceProvider>
</xsd:updateApplication>
</soapenv:Body>
</soapenv:Envelope>
BILL/ADD & BILL/REMOVE 已被删除。但是更新成功后,"BILL"仍然存在于权限列表中。
更新后:
BILL
REPORT/ADD
REPORT/REMOVE
有时,adding/removing 多个权限会折叠其他权限节点
应用程序中的 add/remove 资源将解决此问题,而不是更新应用程序。
例如应用示例,
肥皂 API URL :
/services/ResourceAdminService.ResourceAdminServiceHttpsSoap12Endpoint/
添加资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:addCollection>
<!--Optional:-->
<ser:parentPath>/_system/governance/permission/applications/sample/REPORT</ser:parentPath>
<!--Optional:-->
<ser:collectionName>CREATE</ser:collectionName>
<!--Optional:-->
<ser:mediaType>?</ser:mediaType>
<!--Optional:-->
<ser:description>?</ser:description>
</ser:addCollection>
</soap:Body>
</soap:Envelope>
删除资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:delete>
<!--Optional:-->
<ser:pathToDelete>/_system/governance/permission/applications/sample/BILL</ser:pathToDelete>
</ser:delete>
</soap:Body>
</soap:Envelope>
在更新服务提供商的权限时,有时叶节点不会被删除。
例如,
服务提供商中存在以下权限,
BILL/ADD
BILL/REMOVE
REPORT/ADD
REPORT/REMOVE
仅在获得以下许可的情况下进行更新,
REPORT/ADD
REPORT/REMOVE
示例 SOAP 调用:
端点:
services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:updateApplication>
<xsd:serviceProvider>
<xsd1:applicationID>1</xsd1:applicationID>
<xsd1:applicationName>SP1</xsd1:applicationName>
<xsd1:permissionAndRoleConfig>
<xsd1:permissions>
<xsd1:value>REPORT/ADD</xsd1:value>
</xsd1:permissions>
<xsd1:permissions>
<xsd1:value>REPORT/REMOVE</xsd1:value>
</xsd1:permissions>
</xsd1:permissionAndRoleConfig>
<xsd1:inboundProvisioningConfig>
</xsd1:inboundProvisioningConfig>
<xsd1:outboundProvisioningConfig>
</xsd1:outboundProvisioningConfig>
</xsd:serviceProvider>
</xsd:updateApplication>
</soapenv:Body>
</soapenv:Envelope>
BILL/ADD & BILL/REMOVE 已被删除。但是更新成功后,"BILL"仍然存在于权限列表中。
更新后:
BILL
REPORT/ADD
REPORT/REMOVE
有时,adding/removing 多个权限会折叠其他权限节点
应用程序中的 add/remove 资源将解决此问题,而不是更新应用程序。
例如应用示例,
肥皂 API URL :
/services/ResourceAdminService.ResourceAdminServiceHttpsSoap12Endpoint/
添加资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:addCollection>
<!--Optional:-->
<ser:parentPath>/_system/governance/permission/applications/sample/REPORT</ser:parentPath>
<!--Optional:-->
<ser:collectionName>CREATE</ser:collectionName>
<!--Optional:-->
<ser:mediaType>?</ser:mediaType>
<!--Optional:-->
<ser:description>?</ser:description>
</ser:addCollection>
</soap:Body>
</soap:Envelope>
删除资源:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:delete>
<!--Optional:-->
<ser:pathToDelete>/_system/governance/permission/applications/sample/BILL</ser:pathToDelete>
</ser:delete>
</soap:Body>
</soap:Envelope>