I am trying to communicate with vcenter server using webservices SDK.
I send Login XML and is successful.
I tried RetrieveServiceContent method and is successful and able to get all details.
I tried FetchDvPorts method and is resulting in error (The session is not authenticated).
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>ServerFaultCode</faultcode>
<faultstring>The session is not authenticated.</faultstring>
<detail>
<NotAuthenticatedFault xsi:type="NotAuthenticated" xmlns="urn:vim25">
<object type="ManagedEntity">DistributedVirtualSwitch</object>
<privilegeId>System.View</privilegeId>
</NotAuthenticatedFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I guess this error is due to privilege difference.(RetrieveServiceContent privilege is "System.Anonymous"
and privilege for FetchDvPorts is "System.Read" System.Anonymous )
What should I do to get complete privilege to access all methods successfully.