Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

VMware VI SDK 5.0 GuestAuthManager methods are not working.

$
0
0

Hi,

 

I am using the ValidateCredentialsInGuest method of GuestAuthManager to validate the credential against a virtual machine, but I am getting below erro.

 

"

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: The guest authentication being used does not have sufficient permissions to perform the operation.

    at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:190)

    at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:131)

    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:120)

    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:90)

    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:119)

    at $Proxy33.validateCredentialsInGuest(Unknown Source)

    at ValidateCredential.main(ValidateCredential.java:39)

 

"

 

Please find the code that I have written.

 

ManagedObjectReference authManager = new ManagedObjectReference();

            processManager.setType("GuestAuthManager");

            processManager.setValue("guestOperationsAuthManager");

 

 

NamePasswordAuthentication authNP = new NamePasswordAuthentication();

            authNP.setUsername("Domain1\\Administrator");

            authNP.setPassword("************");

 

        List<ManagedObjectReference> vmRefList = null;

            try {

                vmRefList = con.getVimPortType().findAllByUuid(con.getServiceContent().getSearchIndex(), null,

                        "5016b3a1-c7b5-694d-2a6c-0900909000", true, true);

            } catch (RuntimeFaultFaultMsg e) {

                e.printStackTrace();

            }

           

       try {

 

              con.getVimPortType().validateCredentialsInGuest(authManager, vmRefList.get(0), authNP);

 

       } catch (GuestOperationsFaultFaultMsg e) {

            e.printStackTrace();

        } catch (InvalidStateFaultMsg e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        } catch (RuntimeFaultFaultMsg e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        } catch (TaskInProgressFaultMsg e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        }   

 

in above code I am getting the virtual machine Manged Object Reference correctly but code is failing at   con.getVimPortType().validateCredentialsInGuest(authManager, vmRefList.get(0), authNP);

 

Please suggest the solution for this issue.

 

Thanks

Mohd Siddique Bagwan.


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>