我正在尝试使用VIM25库检查 vCenter 用户是否对根文件夹具有权限。我正在使用hasPrivilegeOnEntity方法。
vimport.hasPrivilegeOnEntity(authorizationManager, rootFolder, userSessionKey, privilages);
以上代码适用于 vCenter Server 6.0,但不适用于 5.5,出现以下异常。
com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: A general system error occurred: Authorize Exception Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:124)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy37.hasPrivilegeOnEntity(Unknown Source)
详细消息:发生一般系统错误:授权异常