Topic
  • 3 replies
  • Latest Post - ‏2013-07-01T07:01:15Z by EGWM_世梨_伍
SystemAdmin
SystemAdmin
757 Posts

Pinned topic Getting Javascript SOAP client to work with BigFix 8.1 webreport

‏2011-05-04T22:12:07Z |
1. I got BESmonitor gadget installed on my win7 and it can query our 8.1 report server with http address and account/password.

2. Very excited so I went on to type all the following text.html according to the video in R1.

<html>
<head>
<script type="text/javascript" src="soapclient.js"></script>
<script type="text/javascript" src="RelevanceLogic.js"></script>
<script type="text/javascript">
function testRelevance(){
var rl = new RelevanceLogic("http://bf.test.com/webreports","ADdomain\name","password");
rl.sendQuery(txt.value,callback);
<!-- send the text directly.
rl.sendQuery("number of bes computers",callback);
-->

}
function callback(error,result){
lbl.innerText = "Result:" + result;
}
</script>
</head>

<body>
<textarea id="txt"></textarea>


<button id="btn" onclick="testRelevance()">Evalute</button>


<label id="lbl">Result:</label>
</body>
</html>

3. following is the directory layout

F:\Downloads\BESMonitor-1.2.1\BESMonitor\test>dir
dir
Volume in drive F is WD2TB
Volume Serial Number is 6C0E-C40C

Directory of F:\Downloads\BESMonitor-1.2.1\BESMonitor\test

05/04/2011 03:02 PM <DIR> .
05/04/2011 03:02 PM <DIR> ..
05/29/2008 06:12 PM 3,542 RelevanceLogic.js
05/29/2008 05:13 PM 13,071 soapclient.js
05/04/2011 05:12 PM 772 test.html
05/04/2011 03:01 PM 2,253 test.html~
4 File(s) 19,638 bytes
2 Dir(s) 1,542,118,162,432 bytes free

F:\Downloads\BESMonitor-1.2.1\BESMonitor\test>

4. I read another post on the forum saying that SOAP API changes in RelevanceService got changed to RelevanceBind . So does that mean *.js I copied from the (old, for 7.0 api)example need to be updated as well ?
R1: http://support.bigfix.com/bes/misc/soapapi/DeveloperVideo.html
  • Lee Wei
    Lee Wei
    143 Posts

    Re: Getting Javascript SOAP client to work with BigFix 8.1 webreport

    ‏2011-05-05T18:26:41Z  
    I created a directory with the 3 files you have RelevanceLogic.js, soapclient.js and duplicated your test.html.

    It works correct for me on IE8 with BES 8.1.
    I notice that the JavaScript uses an ActiveX component, which means that it will only work in IE.

    What is the error you are getting?
  • SystemAdmin
    SystemAdmin
    757 Posts

    Re: Getting Javascript SOAP client to work with BigFix 8.1 webreport

    ‏2011-05-05T21:47:00Z  
    Lee Wei
    I created a directory with the 3 files you have RelevanceLogic.js, soapclient.js and duplicated your test.html.

    It works correct for me on IE8 with BES 8.1.
    I notice that the JavaScript uses an ActiveX component, which means that it will only work in IE.

    What is the error you are getting?
    The error message is not important now because I made two mistakes.
    1. I was using Chrome browser.
    2. Need to escape domain\account string passing

    ie, From

    "ADdomain\name"

    to

    "ADdomain\\name"

    The two javascript.js are for IE browser only.

    Again, Thanks for your help Wei.

    tj
  • EGWM_世梨_伍
    EGWM_世梨_伍
    2 Posts

    Re: Getting Javascript SOAP client to work with BigFix 8.1 webreport

    ‏2013-07-01T07:01:15Z  
    Lee Wei
    I created a directory with the 3 files you have RelevanceLogic.js, soapclient.js and duplicated your test.html.

    It works correct for me on IE8 with BES 8.1.
    I notice that the JavaScript uses an ActiveX component, which means that it will only work in IE.

    What is the error you are getting?
    The error message is not important now because I made two mistakes.
    1. I was using Chrome browser.
    2. Need to escape domain\account string passing

    ie, From

    "ADdomain\name"

    to

    "ADdomain\\name"

    The two javascript.js are for IE browser only.

    Again, Thanks for your help Wei.

    tj

    I've tried, can not run in the JSP