Hi All,
I've downloaded vSphere Management SDK for vSphere 5.5.
I am using VS 2008 for this test.
I'm using the C# dotnet samples.
We have two ESXi 5.5 hosts that are in one cluster.
I've created the the following files using WSDL tools according to the instructions:
1. Vim25Service2008.dll
2. Vim25Service2008.XmlSerializers.dll
3. STSService.dll
I've changed the references in order to make the build pass.
After that I tried to run the Simple Client example.
I get the following error:
[ 23/06/16 10:23:37 AM ] Begin Log.
Started
System.Web.Services.Protocols.SoapException: Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/addressi
ng}Address'
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response,
Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at STSService.Issue(RequestSecurityTokenType RequestSecurityToken)
at AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(String[] args) in C:\Work\VMW
are\SDK\vsphere-ws\dotnet\cs\samples\AcquireBearerTokenByUserCredentialSample\AcquireBearerTokenByUserCredential.cs:line
151
Caught Exception : Name : SoapException Message : Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/adhttp://schemas.xmlsoap.org/ws/2004/08/adhttp://schemas.xmlsoap.org/ws/2004/08/ad
dressing}Address' Trace : at AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(Str
ing[] args) in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AcquireBearerTokenByUserCredentialSample\AcquireBearerTok
enByUserCredential.cs:line 160
at AppUtil.ServiceUtil.ClientConnectSSO() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:l
ine 60
Exception running : SimpleClient
Caught Exception : Name : SoapException Message : Unsupported nested context '{http://schemas.xmlsoap.org/ws/2004/08/ad
dressing}Address' Trace : at AppUtil.ServiceUtil.ClientConnectSSO() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\sample
s\AppUtil\ServiceUtil.cs:line 81
at AppUtil.ServiceUtil.ClientConnect() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:line
41
at AppUtil.AppUtil.connect() in C:\Work\VMWare\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\AppUtil.cs:line 656
[ 23/06/16 10:23:40 AM ] End Log.
Caught SoapException - Actor : Code : ServerFaultCode Detail XML : <detail><RuntimeFaultFault xsi:type="vim25:InvalidR
equest" xmlns="urn:vim25" xmlns:vim25="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></detail>
These are the command line arguments I pass to the application:
--url https://10.161.47.213/sdk --username administrator@vsphere.local --password ****** --ssoUrl https://10.161.47.213:7444/sso-adminserver/sdk/vsphere.local
I'm not sure about the url and the ssoUrl.
However the 10.161.47.213 is the ip address of the vCenter.
Any help will be appreciated.
Thanks,
Dudi.