3 var factory
= new WebServiceProxyFactory();
7 onLoad : function(proxy
) {
11 onError : function(e
) {
19 isPrimeNumberCallback : function(isPrime
, cx
) {
20 // just a stupid test of the (ignorable) callcontext...
21 if(cx
.methodName
!= "isPrimeNumber")
22 alert("I'm very confused");
28 onError : function(e
, cx
) {
35 str
= ""+lastNumber
+ (lastAnswer
? " is prime" : " is not prime")+"\n\n";
37 str
+= "Enter number (0 to quit)";
39 var number
= prompt(str
, "");
41 number
= parseInt(number
, 10);
42 if(number
&& !isNaN(number
)) {
44 netscape
.security
.PrivilegeManager
.enablePrivilege("UniversalBrowserRead");
45 talkToMe
.number
= number
;
46 proxy
.setListener(talkToMe
);
47 proxy
.isPrimeNumber(number
);
56 const ISPRIMEURL
= "http://green.nscp.aoltw.net/vidur/wsdl/statistics.wsdl";
57 //const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics.wsdl";
58 //const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics2.wsdl";
59 //const ISPRIMEURL = "http://213.23.125.181:8080/statistics.wsdl";
61 const ISPRIMEPORT
= "SpheonJSAOPStatisticsPort";
63 factory
.createProxyAsync(ISPRIMEURL
, ISPRIMEPORT
, "foo", true, listener
);
64 //factory.createProxyAsync(ISPRIMEURL, ISPRIMEPORT, "foo", false, listener);