Hi,
I'm trying to access the WBEM service of the CIMOM on the ESX Server 3i and all my requests end up with this error "(501) not implemented".
What is it?
I use wbemsharp (http://code.google.com/p/wbemtools/wiki/Intro) for my client and the connection is over HTTPS.
Thanks in advance
Hello!
Did you resolved this problem? I get same exception when using wbem-sharp library.
No, I did not
HI,
Did u solve the problem.. do u have any other alternative solutions...
Anand.
HI,
I'm getting the same exception using wbem sharp, do u have any other alternative solutions...
For reasons unknown, wbem-sharp sets the method to "M-POST", change it to "POST" in src/Net/CimomRequest.cs and your 501 should go away.
You are right, and there are a few other things that the old code is referencing which is a bad idea.
I got it to work via http, by changing the httponly setting in the confic file of the cim service on the esx server.
I took out all the name sapces it added in front of stuff using a random number (who knows why they did that? Avoid caching?)
Some headers look like this:
cimReq.Headers.Add("Content-Language", "en-US");
cimReq.Headers.Add("Authorization", "Basic cm9vdDpQYXNzd29yZDE="); // Got this by sniffing packets from CIM Navigator, which worked.
// this code above stopped the unauthorised error.....
cimReq.Headers.Add("Accept-Language", "en-US");
cimReq.Headers.Add("Cache-Control", "no-cache");
Some defaults needed turning off in .Net as well, to stop the Expectancy error in Cimomrequests.cs or something:
// Setup the http request
httpReq.PreAuthenticate = false;
//httpReq.Connection = "Keep-alive";
httpReq.ProtocolVersion = HttpVersion.Version11;
httpReq.Method = "POST";
httpReq.ContentType = "application/xml;charset=\"UTF-8\"";
httpReq.Accept = "text/html, text/xml, application/xml";
ServicePointManager.Expect100Continue = false;
//httpReq.Expect = "false";
// I get an "Unknown Extension URI" when I try to use this URL
//Headers.Add("Man", "http://www.dmtf.org/standards/documents/WBEM/DSP200.html;ns=" + nameSpaceValue);
// Add the Http/CIM headers
//Headers.Add("Man", "http://www.dmtf.org/cim/mapping/http/v1.0;ns=" + nameSpaceValue);
Headers.Add("CIMProtocolVersion", "1.0");
Got a CIM_Fan object back by adding this bit of code right before the other code of the AuthForm.cs
CimClass Class1 = mainWbemClient.GetClass("CIM_Fan");
This calss is populated with 75K of xml data being returned successfully.
The next piece of code will bomb out, as there are allot of new implementations of the latest schema not implemented yet:
classList = mainWbemClient.EnumerateClassHierarchy();
That piece of code reference some classes that needs allot of rework, which is the bit I am about to start on.
Shaun O'Reilly