New BES Monitor Gadget and SOAP API!

(imported topic written by BenKus)

Hi everybody,

This stuff is cool… prepare yourself!

BES 7.0 introduces a new SOAP API that allows outside tools to connect directly to retrieve data from BigFix (without having to directly access the database).

We have released documentation and instructions on the new SOAP API and we have built an example application that uses the SOAP API called the “BES Monitor Gadget” that allows you to get constant status updates on your computer using the Windows Sidebar in Vista.

Check it out (watch the videos on both these pages for a demonstration):

http://support.bigfix.com/bes/misc/besmonitorgadget.html

http://support.bigfix.com/bes/misc/soapapi.html

Post questions or if you make a cool application built on the SOAP API, please post it.

Ben

(imported comment written by BenKus)

Here is an example picture of the Windows sidebar:

http://support.bigfix.com/images/pictures/besmonitorgadget-example.jpg

Ben

(imported comment written by SystemAdmin)

This is so cool! I am the envy of everyone here - who is not running Vista. Thanks for this.

Mike

(imported comment written by StacyLee)

I have the gadget installed and am not getting any data which i think is due to my connection.

I have a standalone server with only the web reports service installed and using SSL. The URL for the gadget I am using is https://<reportingserver.domain>/webreports?wsdl

If I enter the URL in directly into my web browser I can see the XML document refrencing my main BES Server https://mainBESserver.domain:443/webreports?wsdl

(The main servers has web reports installed but is stopped and disabled and the ports are blocked on our firewall)

I tried to search for this XML doc onthe reporting server thinking maybe if i changed the reference to my reporting server that might work but i couldn’t find it.

Any ideas?

Will it work in this configuration - standalone and SSL?

(imported comment written by BenKus)

Hmmm… I will check with the developer and see if the gadget supports HTTPS…

Ben

(imported comment written by BenKus)

One of our interns updated it to have an option to use HTTPS… Try using this version and let us know if it works:

http://support.bigfix.com/download/bes/misc/BESMonitor-1.2.1.zip

Ben

(imported comment written by StacyLee)

How should the URL format be entered?

I checked SSL and entered both

https//:servername.domain/webreports?wsdl

https//:servername.domain:443/webreports?wsdl

with no luck.

My quetione wasn’t answered as to the XML data on my standalone reporting server is referencing my main BES not the reporting server itself. Is this going to be an issue?

(imported comment written by BenKus)

Hi Stacy,

Try only:

servername.domain

For your question regarding your reporting server: Any active Web Reports instance will work with the SOAP queries (regardless of if it was on a standalone server or not)… Did that answer the question?

Thanks,

Ben

(imported comment written by StacyLee)

thanks that worked.

(imported comment written by lmpymilk91)

Around line 158 of the file soapclient.js at SOAPClient._onLoadWsdl

I return Null

Can you tell me why I would keep getting this?

Thank you

SOAPClient._onLoadWsdl = function(url, method, parameters, async, callback, req, registerXHR) 
{ var wsdl = req.responseXML; 
/******* Added code *******/ 

if (wsdl.documentElement == 

null) 
{ callback(

new Error(500, 
"Server WSDL lookup failed."), 

null); 

return; 
} 
/**************************/ SOAPClient_cacheWsdl[= wsdl;     
// save a copy in cache 

return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl, registerXHR); 
}

(imported comment written by BenKus)

Can you tell us exactly what version of the BigFix Server you are using?

Thanks,

Ben

(imported comment written by lmpymilk91)

Ben Kus

Can you tell us exactly what version of the BigFix Server you are using?

Thanks,
Ben

version 7.0.9.164

I just built a vm running Vista and the gadget looks to be working but the .hta is where I get the null.

RelevanceLogic.js, soapclient.js and my foo.htaare all in the same folder.

here is the code from the .hta

<html> <head> <script type=
"text/javascript" src=
"soapclient.js"></script> <script type=
"text/javascript" src=
"RelevanceLogic.js"></script> <script type=
"text/javascript">   var rl = 

new RelevanceLogic(
"http://<BES_Server>/webreports?wsdl", 
"MyUserName", 
"MyPassword"); rl.sendQuery(
"number of bes computers", callback);   function callback(error, result) 
{ lbl.innerText = result 
} </script> </head>   <body> <!-- --> <table> <tr> <th style=
"width: 200px"><div align=
"left" style=
"text-align: right">Number of bes computers:</div></th><th style=
"width: 21; height: 21px"><div align=
"left" style=
"text-align: center"></div></th><th width=
"82"><div align=
"right" style=
"text-align: right"><label id=
"lbl"></label></div></th> </tr> </table> </body>     </html>

(imported comment written by lmpymilk91)

Hey Ben, I just wanted to let you know first thing, it’s not the server. I think it’s the version of jscript on my xp machine. I tried the same hta file on vista last night and it worked great. I will let you know if I find anything out about the jscript.

Thanks

(imported comment written by lmpymilk91)

Well it wasn’t the jscript either.

Here is the fix…

I tested this on our Win2kSP4, WinxpSP2, WinXPSP3 and Vista machines.

find the line

var progids = [
"Msxml2.XMLHTTP.5.0", 
"Msxml2.XMLHTTP.4.0", 
"MSXML2.XMLHTTP.3.0", 
"MSXML2.XMLHTTP", 
"Microsoft.XMLHTTP"];

replace the line with

var progids = [
"MSXML2.XMLHTTP.3.0", 
"MSXML2.XMLHTTP", 
"Microsoft.XMLHTTP"];

and removing from the line

"Msxml2.XMLHTTP.5.0", 
"Msxml2.XMLHTTP.4.0",

Without doing this my system would always use “Msxml2.XMLHTTP.5.0” and return “null”

edit

typo

(imported comment written by wnolan91)

Where is the WebReports Server URL getting pulled from. We have the WebReports running on a different box then what is getting placed there by default. And we use a different port. I can get this to work by putting the servername.domain:port but constantly have to modify it if I change my monitor or add a new one.

Thanks

Bill

(imported comment written by chris_lindsay91)

Hi Bill,

I’m the developer that built the BESMonitor Gadget, so hopefully I’ll be able to help you fix your problem.

First, the Web Reports Server URL should by default be filled with the URL of your BES root server. The most common configuration is that your root server is also your web reports server, which is why we chose to make this the default.

However, if you enter your own Web Reports Server URL, it should save it, and you shouldn’t have to enter it again. The URL is saved in a file in the folder where the BESMonitor is installed, usually “C:\Users<UserName>\AppData\Local\Microsoft\Windows Sidebar\Gadgets\BESMonitor.gadget\connection.ini”

My guess would be that somehow this file ended up being read-only. Hopefully making that not read-only should fix the problem.

Let me know if that works for you.

Chris