зеркало из https://github.com/mozilla/pjs.git
update of test. NOT PART OF THE BUILD
This commit is contained in:
Родитель
840ba819dd
Коммит
886d8a0052
|
@ -2,10 +2,7 @@
|
|||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
const factoryClass = Components.classes["@mozilla.org/xmlextras/proxy/webserviceproxyfactory;1"];
|
||||
const factoryID = Components.interfaces.nsIWebServiceProxyFactory;
|
||||
|
||||
var factory = factoryClass.getService(factoryID);
|
||||
var factory = new WebServiceProxyFactory();
|
||||
|
||||
const IDL_GENERATOR =
|
||||
new Components.Constructor("@mozilla.org/interfaceinfotoidl;1",
|
||||
|
@ -21,6 +18,8 @@ const IInfoNamed = new Components.Constructor("@mozilla.org/scriptableInterfaceI
|
|||
|
||||
var listener = {
|
||||
onLoad : function(proxy) {
|
||||
var name;
|
||||
var ask = window.ask;
|
||||
//alert("happy"); return;
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
@ -34,37 +33,48 @@ var listener = {
|
|||
// writing to our document whacks the preexisting stuff...
|
||||
document.write("<pre>");
|
||||
|
||||
document.write(gen.generateIDL(proxy.primaryIID, true, true));
|
||||
|
||||
var list = gen.getReferencedInterfaceNames(proxy.primaryIID, {});
|
||||
document.write("\n#include \"nsISupports.h\"\n\n");
|
||||
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var iface = new IInfoNamedCtor(list[i]);
|
||||
if(iface.name == primaryIface.name)
|
||||
document.write("// forward declarations...\n");
|
||||
for(var name in proxy.interfaces) {
|
||||
if(name == "nsISupports")
|
||||
continue;
|
||||
document.write("interface "+name+";\n");
|
||||
}
|
||||
|
||||
document.write("\n");
|
||||
|
||||
for(var name in proxy.interfaces) {
|
||||
var id = proxy.interfaces[name];
|
||||
|
||||
if(0 == id.name.indexOf("nsI"))
|
||||
continue;
|
||||
|
||||
document.write("\n//-------------------------------------\n");
|
||||
document.write("//-------------------------------------");
|
||||
|
||||
document.write(gen.generateIDL(iface.interfaceID, false, false));
|
||||
document.write(gen.generateIDL(Components.ID(id.number), false, false));
|
||||
}
|
||||
|
||||
|
||||
document.write("</pre>");
|
||||
document.close();
|
||||
},
|
||||
onError : function(e) {
|
||||
// alert("sad"); return;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
// writing to our document whacks the preexisting stuff...
|
||||
document.write(e);
|
||||
document.write("<pre>");
|
||||
document.write("error: "+e);
|
||||
document.close();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//const ISPRIMEURL = "http://green.nscp.aoltw.net/vidur/wsdl/statistics.wsdl";
|
||||
const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics.wsdl";
|
||||
//const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics2.wsdl";
|
||||
//const ISPRIMEURL = "http://213.23.125.181:8080/statistics.wsdl";
|
||||
|
||||
const ISPRIMEPORT = "SpheonJSAOPStatisticsPort";
|
||||
|
||||
factory.createProxyAsync(ISPRIMEURL, ISPRIMEPORT, "foo", true, listener);
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
const factoryClass = Components.classes["@mozilla.org/xmlextras/proxy/webserviceproxyfactory;1"];
|
||||
const factoryID = Components.interfaces.nsIWebServiceProxyFactory;
|
||||
|
||||
var factory = factoryClass.getService(factoryID);
|
||||
var factory = new WebServiceProxyFactory();
|
||||
|
||||
const IDL_GENERATOR =
|
||||
new Components.Constructor("@mozilla.org/interfaceinfotoidl;1",
|
||||
|
@ -21,6 +18,8 @@ const IInfoNamed = new Components.Constructor("@mozilla.org/scriptableInterfaceI
|
|||
|
||||
var listener = {
|
||||
onLoad : function(proxy) {
|
||||
var name;
|
||||
var ask = window.ask;
|
||||
//alert("happy"); return;
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
@ -34,37 +33,48 @@ var listener = {
|
|||
// writing to our document whacks the preexisting stuff...
|
||||
document.write("<pre>");
|
||||
|
||||
document.write(gen.generateIDL(proxy.primaryIID, true, true));
|
||||
|
||||
var list = gen.getReferencedInterfaceNames(proxy.primaryIID, {});
|
||||
document.write("\n#include \"nsISupports.h\"\n\n");
|
||||
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var iface = new IInfoNamedCtor(list[i]);
|
||||
if(iface.name == primaryIface.name)
|
||||
document.write("// forward declarations...\n");
|
||||
for(var name in proxy.interfaces) {
|
||||
if(name == "nsISupports")
|
||||
continue;
|
||||
document.write("interface "+name+";\n");
|
||||
}
|
||||
|
||||
document.write("\n");
|
||||
|
||||
for(var name in proxy.interfaces) {
|
||||
var id = proxy.interfaces[name];
|
||||
|
||||
if(0 == id.name.indexOf("nsI"))
|
||||
continue;
|
||||
|
||||
document.write("\n//-------------------------------------\n");
|
||||
document.write("//-------------------------------------");
|
||||
|
||||
document.write(gen.generateIDL(iface.interfaceID, false, false));
|
||||
document.write(gen.generateIDL(Components.ID(id.number), false, false));
|
||||
}
|
||||
|
||||
|
||||
document.write("</pre>");
|
||||
document.close();
|
||||
},
|
||||
onError : function(e) {
|
||||
// alert("sad"); return;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
// writing to our document whacks the preexisting stuff...
|
||||
document.write(e);
|
||||
document.write("<pre>");
|
||||
document.write("error: "+e);
|
||||
document.close();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//const ISPRIMEURL = "http://green.nscp.aoltw.net/vidur/wsdl/statistics.wsdl";
|
||||
const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics.wsdl";
|
||||
//const ISPRIMEURL = "http://bugsfree.nscp.aoltw.net/pub/statistics2.wsdl";
|
||||
//const ISPRIMEURL = "http://213.23.125.181:8080/statistics.wsdl";
|
||||
|
||||
const ISPRIMEPORT = "SpheonJSAOPStatisticsPort";
|
||||
|
||||
factory.createProxyAsync(ISPRIMEURL, ISPRIMEPORT, "foo", true, listener);
|
||||
|
|
Загрузка…
Ссылка в новой задаче