-1
我按照http://docs.wso2.org/display/AM160/User+Roles+in+the+API+Manager 中規定的說明設置'publisher'角色。不幸的是,當我作爲發佈者登錄並嘗試將API的狀態設置爲「已發佈」時,出現權限設置不正確的異常。從屏幕截圖看來,由於屏幕截圖不匹配,文檔已過期。API Manager Publisher發佈API時發生異常
什麼是正確的角色?
Caused by: org.wso2.carbon.governance.api.exception.GovernanceException: Error in updating the artifact, artifact id: 75bbe8ef-c0d4-426e-be9b-703468026d9e.Resource update failed. User publisher is not authorized to update the resource /_system/governance/apimgt/applicationdata/provider/creator/ItemService/3.0/api..
at org.wso2.carbon.governance.api.common.GovernanceArtifactManager.updateGovernanceArtifact(GovernanceArtifactManager.java:457)
at org.wso2.carbon.governance.api.generic.GenericArtifactManager.updateGenericArtifact(GenericArtifactManager.java:181)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateApiArtifact(APIProviderImpl.java:556)
... 64 more
Caused by: org.wso2.carbon.registry.core.secure.AuthorizationFailedException: Resource update failed. User publisher is not authorized to update the resource /_system/governance/apimgt/applicationdata/provider/creator/ItemService/3.0/api.
at org.wso2.carbon.registry.core.jdbc.Repository.update(Repository.java:1084)
at org.wso2.carbon.registry.core.jdbc.Repository.put(Repository.java:288)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:709)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:465)
at org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:657)
at org.wso2.carbon.governance.api.common.GovernanceArtifactManager.updateGovernanceArtifact(GovernanceArtifactManager.java:439)
... 66 more
用哪個用戶創建了api?你是否試圖改變用戶的api狀態與用戶創建的api不同? – Ragavan
是的。我遵循文檔鏈接中的指示,創建了一個具有創作者角色和「發佈者」角色的「創作者」。創建者創建了API,現在我希望發佈者發佈它。我甚至回去更新與創建者用戶(創建者)的API,我得到另一個異常。 '引起:java.io.FileNotFoundException:找不到此文件:file:/registry/resource/_system/governance/apimgt/applicationdata/wsdls/creator--ItemService3.0.wsdl \t at com.ibm.wsdl。 util.StringUtils.getContentAsInputStream(StringUtils.java:173) ' – grbonk