Search the web
Sign In
New User? Sign Up
jsolait
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 276 - 410 of 411   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#410 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Wed Jan 2, 2008 5:14 pm
Subject: no time for jsolait development
keyjaque
Offline Offline
Send Email Send Email
 
Hi all,

I probably should have sent out this mail much earlier.
Unfortunately I just don't have enough free time to work on jsolait
anymore. I have not been able to do any work on it for quite some time
and don't see me being able to do any in the near future :(
Sorry!

So, if anyone fancies taking over the project, give me a shout.

Jan-Klaas Kollhof

#398 From: "Negreanu Marius-Adrian" <groleo@...>
Date: Sat Nov 3, 2007 11:45 am
Subject: XMLRPCMethod sends only the HTTP headers.
groleo
Offline Offline
Send Email Send Email
 
Hi,
I'm jsolait's XMLRPC to implement a manager, but the
request issued to the HTTP server contains only the HTTP headers.
Is this normal ?

Code:
<script type="text/javascript">listTests();</script>
function listTests()
{
var xmlrpc=null;
try{
       xmlrpc = imprt("xmlrpc");
}catch(e){
       alert(e);
       throw "Importing of xmlrpc module failed.";
}
       var methods=["listTests"];
       try{
             //var service = new xmlrpc.ServiceProxy( server, methods);
             //var response = service.listTests();
             var service = new xmlrpc.XMLRPCMethod( server, "listTests");
             var response = service();

             document.write("Common Tests:<br>");
             document.write("<select name='sut_tests'
multiple='multiple' size='5'>");
             for ( test=0;test<  response.length; test++)
             {
                   document.write('<option>' + response[test] +
'</option>');
             }
             document.write('</select>');
       }catch(e){
             var em;
             if(e.toTraceString){
                   em=e.toTraceString();
             }else{
                   em = e.message;
             }
             document.write( "Error trace: <br>" + em+"<br>");
       }
}

jsolait 2.0b (2006-07-12)
Browser: Iceweasel 2.0.0.3

#396 From: "Henry Eko Hapsanto" <dmaster@...>
Date: Wed Oct 31, 2007 3:16 am
Subject: RE: Re: XMLRPCAsyncCallback
dmaster97
Offline Offline
Send Email Send Email
 

Hi, jan

 

I’ve been happy playing with jsolait since. J

 

Apparently, there is small bug with opera browser.

 

Any rpc call back  using async call would have failed in opera, where in other browser does fine.

 

If try to trace it, and find it here in urllib.js, in mod.sendRequest, line 245 (original urllib.js)

Xmlhttp apparently always null when called via opera.

 

This cause callback function cannot retreive return value from rpc calls

 

I havent try jsolait v2 because will require complete rewrite of phpolait

 

Best regards

Henry Eko

 

PS: cut down urllib.js

 

mod.sendRequest=function(type, url, user, pass, data, headers, callback){

198 var async=false;

199 //check if the last argument is a function and treat it as callback;

200 if(arguments[arguments.length-1] instanceof Function){

201 var async=true;

202 callback = arguments[arguments.length-1];

203 }

204 //treat sencond last(if callback)/last(if no callback) argument as headers

205 var headindex=arguments.length-((async || arguments[arguments.length-1] == null) ?2:1);

206 //is it an array then it's headers

207 if(arguments[headindex] instanceof Array){

208 headers=arguments[headindex];

209 }else{

210 headers=[];

211 }

212 //are user AND password not specified then assume data as 3rd argument.

213 if(typeof user == "string" && typeof pass == "string"){

214 if(typeof data != "string"){

215 data="";

216 }

217 }else if (typeof user == "string"){

218 data = user;

219 user=null;

220 pass=null;

221 }else{

222 user=null;

223 pass=null;

224 }

225 var xmlhttp= getHTTP();

226 try{

227 if(user!=null){

228 xmlhttp.open(type, url, async, user, pass);

229 }else{

230 xmlhttp.open(type, url, async);

231 }

232 }catch(e){

233 throw new mod.RequestOpenFailed(e);

234 }

235 //set headers

236 for(var i=0;i< headers.length;i++){

237 try{//opera 8b does not support setRequestHeader todo:

238 xmlhttp.setRequestHeader(headers[i][0], headers[i][1]);

239 }catch(e){

240 }

241 }

242

243 if(async){//set up a callback

244 xmlhttp.onreadystatechange=function(){

245 /*FIXME : Opera cannot do callback here. xmlhttp object always null*/

246 //dojo.debug(p);

247 if (xmlhttp!=null)

248 if (xmlhttp.readyState==4) {

249 callback(xmlhttp);

250 xmlhttp = null; //help IE with garbage collection

251 }else if (xmlhttp.readyState==2){

252 //status property should be available (MS IXMLHTTPRequest documentation)

253 //in Mozilla it is not if the request failed(server not reachable)

254 //in IE it is not available at all ?!

255 try{//see if it is mozilla otherwise don't care.

256 var isNetscape = netscape;

257 try{//if status is not available the request failed.

258 var s=xmlhttp.status;

259 }catch(e){//call the callback because Mozilla will not get to readystate 4

260 callback(xmlhttp);

261 xmlhttp = null;

262 }

263 }catch(e){

264

265 }

266 }

267 }

268 }

269

270 try{

271 xmlhttp.send(data);

272 }catch(e){

273 if(async){

274 callback(xmlhttp, e);

275 xmlhttp=null;

276 }else{

277 throw new mod.SendFailed(e);

278 }

279 }

280 return xmlhttp;

281 }

 

 

 


From: jsolait@yahoogroups.com [mailto:jsolait@yahoogroups.com] On Behalf Of Jan-Klaas Kollhof
Sent: Wednesday, August 22, 2007 15:28
To: jsolait@yahoogroups.com
Subject: [jsolait] Re: XMLRPCAsyncCallback

 


> Can I bundle jsolait in distribution with my modified phpolait?

Yes you can.

Jan


#383 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Wed Aug 22, 2007 8:27 am
Subject: Re: XMLRPCAsyncCallback
keyjaque
Offline Offline
Send Email Send Email
 
> Can I bundle jsolait in distribution with my modified phpolait?

Yes you can.


Jan

#381 From: "Henry Eko Hapsanto" <dmaster@...>
Date: Tue Aug 21, 2007 8:36 am
Subject: RE: Re: XMLRPCAsyncCallback
dmaster97
Offline Offline
Send Email Send Email
 

Hello,

 

Sorry for the long reply.

I finally get it work.

Thank you.

 

I’m working on modified phpolait, and I’m a bit clueless to move from jsolait v.1 to jsolait v2

 

Can I bundle jsolait in distribution with my modified phpolait?

I’m creating a new project in sourceforge called PHPOlaitEx, because I can’t contact the original developer.

 

Best regards

Henry

 

 


From: jsolait@yahoogroups.com [mailto:jsolait@yahoogroups.com] On Behalf Of Jan-Klaas Kollhof
Sent: Wednesday, June 27, 2007 3:18
To: jsolait@yahoogroups.com
Subject: [jsolait] Re: XMLRPCAsyncCallback

 

I think I need some more info on that, maybe some code so I can
reproduce the problem.

There is no reason why the callback should not see the function.
e.g:

function foobar(a){
print(a);
}

var ServiceProxy = imprt("jsonrpc").ServiceProxy
var serviceURL = "http://jsolait.net/services/test.jsonrpc";
var methods = ['echo'];

var service = new ServiceProxy(serviceURL, methods);
service.echo("hello", function(r,e){
foobar(r)
})

works just fine when you run it in
http://jsolait.net/wiki/jsolaitLive

Jan

-- In jsolait@yahoogroups.com, "dmaster97" <dmaster@...> wrote:
>
> Hello,
> i'm new to jsolait.
>
> i've using it like a charm.
> but i have problems with callbacks.
>
> i use json rpc instead of xml rpc, but i think the case would be
the
> same.
>
> the codes inside the callbacks function seems to be blind to other
> methods created in the same script.
> it can only calls javascript builtin methods or dom method only.
>
> supposely there are function like this
> function justAdd(a,b){
> return a+b;
> }
>
> the code inside callback function did not recognise this method.
>
> i do this because i also use other dhtml enricher script such as
dojo
> toolkit and my own libraries with my code. and the callback
function
> cannot call methods from these libraries.
>
> best regards,
> Henry
>
>
> --- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@>
> wrote:
> >
> >
> > --- In jsolait@yahoogroups.com, "n1ywb_1" <jeff.laughlin@g...>
> wrote:
> > >
> > > Can somebody please post an example of how to set up an
> asynchronous
> > > xmlrpc call and callback function? Thanks!
> > >
> >
> >
> > Here the example:
> >
> > var xmlrpc=imprt('xmlrpc');
> >
> > var service = new xmlrpc.ServiceProxy('/test.py', ['echo']);
> >
> > service.echo('Hello jsolait', function(result, error){
> > print(result);
> > });
> >
> > //or
> >
> > function callback(result, error){
> > print(result);
> > }
> >
> > service.echo('Hello jsolait', callback);
> >
> >
> >
> >
> > try it using jsolait-live
> >
>


#349 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Tue Jun 26, 2007 8:18 pm
Subject: Re: XMLRPCAsyncCallback
keyjaque
Offline Offline
Send Email Send Email
 
I think I need some more info on that, maybe some code so I can
reproduce the problem.

There is no reason why the callback should not see the function.
e.g:

function foobar(a){
   print(a);
}

var ServiceProxy = imprt("jsonrpc").ServiceProxy
var serviceURL = "http://jsolait.net/services/test.jsonrpc";
var methods = ['echo'];

var service = new ServiceProxy(serviceURL, methods);
service.echo("hello", function(r,e){
   foobar(r)
})



works just fine when you run it in
http://jsolait.net/wiki/jsolaitLive


Jan

-- In jsolait@yahoogroups.com, "dmaster97" <dmaster@...> wrote:
>
> Hello,
> i'm new to jsolait.
>
> i've using it like a charm.
> but i have problems with callbacks.
>
> i use json rpc instead of xml rpc, but i think the case would be
the
> same.
>
> the codes inside the callbacks function seems to be blind to other
> methods created in the same script.
> it can only calls javascript builtin methods or dom method only.
>
> supposely there are function like this
> function justAdd(a,b){
>   return a+b;
> }
>
> the code inside callback function did not recognise this method.
>
> i do this because i also use other dhtml enricher script such as
dojo
> toolkit and my own libraries with my code. and the callback
function
> cannot call methods from these libraries.
>
> best regards,
> Henry
>
>
> --- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@>
> wrote:
> >
> >
> > --- In jsolait@yahoogroups.com, "n1ywb_1" <jeff.laughlin@g...>
> wrote:
> > >
> > > Can somebody please post an example of how to set up an
> asynchronous
> > > xmlrpc call and callback function? Thanks!
> > >
> >
> >
> > Here the example:
> >
> > var xmlrpc=imprt('xmlrpc');
> >
> > var service = new xmlrpc.ServiceProxy('/test.py', ['echo']);
> >
> > service.echo('Hello jsolait', function(result, error){
> >   print(result);
> > });
> >
> > //or
> >
> > function callback(result, error){
> >  print(result);
> > }
> >
> > service.echo('Hello jsolait', callback);
> >
> >
> >
> >
> > try it using jsolait-live
> >
>

#348 From: "dmaster97" <dmaster@...>
Date: Sat Jun 23, 2007 5:14 am
Subject: Re: XMLRPCAsyncCallback
dmaster97
Offline Offline
Send Email Send Email
 
Hello,
i'm new to jsolait.

i've using it like a charm.
but i have problems with callbacks.

i use json rpc instead of xml rpc, but i think the case would be the
same.

the codes inside the callbacks function seems to be blind to other
methods created in the same script.
it can only calls javascript builtin methods or dom method only.

supposely there are function like this
function justAdd(a,b){
   return a+b;
}

the code inside callback function did not recognise this method.

i do this because i also use other dhtml enricher script such as dojo
toolkit and my own libraries with my code. and the callback function
cannot call methods from these libraries.

best regards,
Henry


--- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@...>
wrote:
>
>
> --- In jsolait@yahoogroups.com, "n1ywb_1" <jeff.laughlin@g...>
wrote:
> >
> > Can somebody please post an example of how to set up an
asynchronous
> > xmlrpc call and callback function? Thanks!
> >
>
>
> Here the example:
>
> var xmlrpc=imprt('xmlrpc');
>
> var service = new xmlrpc.ServiceProxy('/test.py', ['echo']);
>
> service.echo('Hello jsolait', function(result, error){
>   print(result);
> });
>
> //or
>
> function callback(result, error){
>  print(result);
> }
>
> service.echo('Hello jsolait', callback);
>
>
>
>
> try it using jsolait-live
>

#347 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Tue Jun 19, 2007 8:14 pm
Subject: Re: Having problem building from SVN source
keyjaque
Offline Offline
Send Email Send Email
 
Sorry, the build.js in the trunk does not work yet.
either just use the source or use the 2.0 version of jsolait.

--- In jsolait@yahoogroups.com, "oqqalz" <oqqalz@...> wrote:
>
> I just downloaded the latest SVN and when I attempted to build I
> received the following error:
>
> CreateModuleFailed in [module 'jsolait' version: Rev.85]:
>     Failed to create module [module '__main__' version: 0.0.0]
>     name:TypeError
>     message:Object expected
>     number:-2146823281
>     description:Object expected
>
> Does anyone have any ideas?
>

#346 From: "oqqalz" <oqqalz@...>
Date: Tue Jun 19, 2007 4:14 am
Subject: Having problem building from SVN source
oqqalz
Offline Offline
Send Email Send Email
 
I just downloaded the latest SVN and when I attempted to build I
received the following error:

CreateModuleFailed in [module 'jsolait' version: Rev.85]:
     Failed to create module [module '__main__' version: 0.0.0]
     name:TypeError
     message:Object expected
     number:-2146823281
     description:Object expected

Does anyone have any ideas?

#313 From: "Jeff Ondich" <ondich@...>
Date: Thu Apr 26, 2007 6:25 pm
Subject: xmlrpc question
jondich
Offline Offline
Send Email Send Email
 
I am trying to use the jsolait XML-RPC support to communicate with an
XML-RPC I have written.  The problem I'm running into is that my
Javascript and jsolait code are at:

    http://my.domain.com/somepage.html

but my XML-RPC server is accessible via:

    http://my.domain.com:8100/

jsolait (or perhaps the underlying XmlHttpRequest object) seems to
consider my.domain.com:8100 distinct from my.domain.com, and thus
off-limits.

I see that the XML-RPC tester at
http://jsolait.net/wiki/examples/xmlrpc/tester sends its XML-RPC
queries to http://jsolait.net/services/test.xmlrpc rather than to a
separate port from the main web browser.

Can anybody tell me how to set things up like this, so that my
original page and my server use the same domain (with no port number)?
  If it's relevant, I'm using Apache on FreeBSD.

Thanks,

Jeff Ondich
ondich@...

#299 From: "mpbahl" <mpbahl@...>
Date: Mon Feb 26, 2007 8:48 pm
Subject: Mozilla: xmlrpc ServiceProxy RequestOpenFailed, Opening of HTTP request failed.
mpbahl
Offline Offline
Send Email Send Email
 
I getting RequestOpenFailed Opening of HTTP request failed when doing
a xmlrpc ServiceProxy call to a different host in Mozilla.

I've read about the cross-domain security issue and am bypassing it with
netscape.security.PrivilegeManager.enablePrivilege, for now.

This works from my server(localhost:9080/test.html) when the
url=http://jsolait.net/test.py.
But it fails when url=http://localhost:9080/echo.

The code is pretty simple and below.

Thanks for any help

try{
   if (navigator.appName=="Netscape"){
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
   }
   var service = new xmlrpc.ServiceProxy(url, ['echo']);
   var asXml = service.echo(msg);
   result.value = asXml;
}catch(e){

   result.value='Error occured '+printException(e);
}

#295 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Wed Jan 31, 2007 7:10 pm
Subject: Re: Location of jsolait
keyjaque
Offline Offline
Send Email Send Email
 
thanks for the fix, I'll put that into the code.

Jan

--- In jsolait@yahoogroups.com, "johannflori" <johannflori@...> wrote:
>
> I tried your code to guess the position of jsolait (experimental)
> and got nothing. It was because I had positioned some script-text
> inserted directly into the html-head before the script-tag for jsolait.
> That results in src=Null and in an error, leaving the loop.
>
> I extended the code like below and all worked well:
>
>     ///The location where jsolait is installed.
>     mod.baseURI="./jsolait";
>
>     try{// to guess the location where jsolait is installed
>         var elems=document.getElementsByTagName('script');
>         for(var i=0;i<elems.length;i++){
>             var src=elems[i].getAttribute('src');
>
>             if (src==undefined) continue;
>
>             var idx=src.indexOf('jsolait.js');
>             if(idx>0){
>                 mod.baseURI=src.slice(0,idx-1);
>                 break;
>             }
>         }
>     }catch(e){
>
> regards
> Johann
>

#294 From: "johannflori" <johannflori@...>
Date: Fri Jan 26, 2007 10:59 am
Subject: Location of jsolait
johannflori
Offline Offline
Send Email Send Email
 
I tried your code to guess the position of jsolait (experimental)
and got nothing. It was because I had positioned some script-text
inserted directly into the html-head before the script-tag for jsolait.
That results in src=Null and in an error, leaving the loop.

I extended the code like below and all worked well:

     ///The location where jsolait is installed.
     mod.baseURI="./jsolait";

     try{// to guess the location where jsolait is installed
         var elems=document.getElementsByTagName('script');
         for(var i=0;i<elems.length;i++){
             var src=elems[i].getAttribute('src');

             if (src==undefined) continue;

             var idx=src.indexOf('jsolait.js');
             if(idx>0){
                 mod.baseURI=src.slice(0,idx-1);
                 break;
             }
         }
     }catch(e){

regards
Johann

#292 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Thu Nov 2, 2006 11:42 am
Subject: Re: some results from experimental branch
keyjaque
Offline Offline
Send Email Send Email
 
it looks like FF2 fixed the with-statement handling in JavaScript,
the issue described earlier does not occur anymore.

So, I am thinking of adding support for the following in jsolait:

e.g of a module source file

mod.foobar=function(...){

   ...
}

mod.test=function(...){

    foobar();
}


the magic is that 'mod.' is only used to define objects that can be
imported by other modules. Inside the module itself these objects will
look like local objects declared with 'var'. This should make things a
bit more comfortable to write.

I will do some further investigation if there are any issues using
this approach.

Comments are appreciated.

Jan

#291 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Thu Nov 2, 2006 11:37 am
Subject: Re: some results from experimental branch
keyjaque
Offline Offline
Send Email Send Email
 
it looks like FF2 fixed the with-statement handling in JavaScript
The issue described earlier does not occur anymore.

So, I am thinking of adding support for the following in jsolait:

e.g of a module source file

mod.foobar=function(...){


}


mod.test=function(...){

}

#290 From: "coolshare" <markqian@...>
Date: Sat Oct 28, 2006 2:29 am
Subject: Invoke method with HTTPSession or request as parameter using JSON RPC
coolshare
Offline Offline
Send Email Send Email
 
Hi, I am not sure this is the right place to ask.

I am using JSON-RPC-JAVA and wondering how I can Invoke method with
HTTPSession or request as parameters. In other words, how can I pass
HTTPSession as one of the parameter for a java method I like to invoke?

Thanks

mark

#289 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Mon Oct 16, 2006 8:28 am
Subject: Re: The first experience - ServerProxy.
keyjaque
Offline Offline
Send Email Send Email
 
Hey,

> var proxy = new xmlrpc.ServerProxy(...)
> rstl = proxy.getMethotName()

rslt is already converted, i.e.
the server response(xml data) was converted to a javascript object
by the proxy.
In your example rslt would be an Array containing a single item
the item is an Object containing with two properties, FData1 and
Fdata2. The properties have the values FVar1 and FVar2,
you could access them by

rslt[0].FData1
and
rslt[0].FData2
or
rslt[0]['FData1']

If you are working with jsolait2 or the experimental branch you can
use alert(repr(rslt)) to have a look at the rslt's code reprThis might
make things a bit easier if you are not sure what the object is that
is returend from the call.

> For example, I have this XML answer:
> ==
> <methodResponse>
> <params>
> <param>
> <value>
> <array>
> <data>
> <value>
> <struct>
> <member>
> <name>FData1</name>
> <value>FVar1</value>
> </member>
> <member>
> <name>FData2</name>
> <value><int>FVar2</int></value>
> </member>
> </struct>
> </value>
> </data>
> </array>
> </value>
> </param>
> </params>
> </methodResponse>

#288 From: "andrey_zavada" <zavada@...>
Date: Mon Oct 16, 2006 3:35 am
Subject: Re: The first experience - ServerProxy.
andrey_zavada
Offline Offline
Send Email Send Email
 
Hello dear Jan.
Thank you for your answer. It has helped me.
But I have one more question. My server send me an XML-RPC answer, and
I use the DOM model for reception of parameters of the answer. For
example:
==
var proxy = new xmlrpc.ServerProxy(...)
rstl = proxy.getMethotName()

//and next:
xmlrpc.marshall(rstl);
//XML as string and next use DOM
==
May be JavaScript o Lait has functions for getting parameters from an
XML-RPS.
For example, I have this XML answer:
==
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>FData1</name>
<value>FVar1</value>
</member>
<member>
<name>FData2</name>
<value><int>FVar2</int></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
==
How can I get "FData1" and "FVar1" using jsolait?
Thank you!

#287 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Fri Oct 13, 2006 4:43 pm
Subject: Re: Slowdowns
keyjaque
Offline Offline
Send Email Send Email
 
one thing can be memory leaks.
you should be able to see that easyly by looking at the mem the
browser consumes and see if that increases over time.

I don't have links on hand but a google search for html memory leaks
and closures should pop up enough info. there is a neat tool for IE
called drip one can use to check for leaks.


the next thing could be that you have too many requests hanging.
e.g. if you initiate a request every 750ms no matter if prev.
req. have finished. This could leasd to a build up of unanswered
requests. Not sure though if that would have any effect.
When you do a request make sure to set the timeout for the next one
iisode the callback for the current one. this will make sure you only
have one open req.

Instead of polling every 750ms, you can use a hangign get.
i.e. unless something changes or a timeout has been reached the server
will just wait with answering the req. This will lower the number of
req. made to the server but may have other implications as the
connection stays open for quite some time depending on the timeout.


That's my initial thoughts

Jan

#286 From: "Christian Tiberg" <ctiberg@...>
Date: Thu Oct 12, 2006 11:49 am
Subject: Slowdowns
tibbebugg
Offline Offline
Send Email Send Email
 
Hello!

We've built a fairly big intranet system for a local company. They're now reporting that the system slows down more and more if they leave the system running (i.e. the web page visible). This happens on both PC's and one Mac. So now I'm of course wondering whether there's a list of known things that can slow a system down? We've developed using mainly jsolait Javascript. The only exclusion to that is that we're using Rico grids to display some lists. The server side is written in PHP using Ajax. We mainly use urllib.sendRequest() calls to update things and request new content. The thing that worries me is that we've got one central object that's constantly checking for updates (750ms intervals, with setTimeout). Is that likely to be the culprit, or do you have any other ideas?

--
Best regards,
  Christian Tiberg

#285 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Thu Oct 12, 2006 7:46 am
Subject: Re: The first experience - ServerProxy.
keyjaque
Offline Offline
Send Email Send Email
 
>   var rslt = xmlrpc.ServerProxy("http://server:1111", data);

that should be:

var proxy = new xmlrpc.ServerProxy(...)
rstl = proxy.getMethotName()


if that does not work, please put the error message in your post so
one can see whats going on.

Jan

#284 From: "andrey_zavada" <zavada@...>
Date: Wed Oct 11, 2006 9:18 am
Subject: The first experience - ServerProxy.
andrey_zavada
Offline Offline
Send Email Send Email
 
Hello dear members of jsolait group.
I have a small experience  with jsolait.

Main question:
How I can make request to the server.
Request example:
==================
POST / HTTP/1.0
Host: http://server:1111
Content-Type: text/xml; charset=windows-1251
Content-Length: length

<?xml version="1.0" encoding="Windows-1251"?>
<methodCall>
		 <methodName>getMethotName</methodName>
		 <params></params>
</methodCall>

==================

My JavaScript code:
==================
try
{
   var xmlrpc = imprt("xmlrpc");
   var data = ["getMethotName"];
   var rslt = xmlrpc.ServerProxy("http://server:1111", data);
   alert(rslt);
}
catch(e)
{
     alert(e);
};
==================
But it's don't work.
Please help.

#283 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Thu Oct 5, 2006 4:47 pm
Subject: Re: calling handleResponse from an instance function of the XMLRPCMethod?
keyjaque
Offline Offline
Send Email Send Email
 
That should work.

I will have a look and make thwe changes in the trunk

--- In jsolait@yahoogroups.com, "roynos" <roynos@...> wrote:
>
> --- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@> wrote:
>
> >
> > handleResponse is declared with var and therefor enot visible outside
> > of the class.
> >
> > it might be a good idea to handle have it part of the object so one
> > can do things like you describe.
> >
> >
> > Jan
> >
>
> Hi,
>
> I simply went into the xmlrpc.js. I change "var handleResponse" to
> "publ.handleResponse" and located all the calls to "handleResponse"
> and changed it to "this.handleResponse".
>
> Everything else seems to work. Is this the correct way to do what I
> wanted to do? Are you planning to change this in the trunk?
>
> -Roy
>

#282 From: "roynos" <roynos@...>
Date: Mon Oct 2, 2006 8:05 pm
Subject: Re: calling handleResponse from an instance function of the XMLRPCMethod?
roynos
Offline Offline
Send Email Send Email
 
--- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@...> wrote:

>
> handleResponse is declared with var and therefor enot visible outside
> of the class.
>
> it might be a good idea to handle have it part of the object so one
> can do things like you describe.
>
>
> Jan
>

Hi,

I simply went into the xmlrpc.js. I change "var handleResponse" to
"publ.handleResponse" and located all the calls to "handleResponse"
and changed it to "this.handleResponse".

Everything else seems to work. Is this the correct way to do what I
wanted to do? Are you planning to change this in the trunk?

-Roy

#281 From: "Jan-Klaas Kollhof" <keyjaque@...>
Date: Sat Sep 30, 2006 12:34 pm
Subject: Re: calling handleResponse from an instance function of the XMLRPCMethod?
keyjaque
Offline Offline
Send Email Send Email
 
Hi,

> function foo(url)
> {
> var liburl = imprt("urllib");
> var xmlrpc = imprt("xmlrpc");
>
> var resp = postURL(url);
> var obj = new this.xmlrpc.XMLRPCMethod();
>
> test.handleResponse(obj);
> }
>

handleResponse is declared with var and therefor enot visible outside
of the class.

it might be a good idea to handle have it part of the object so one
can do things like you describe.


Jan

#280 From: "Richard D. Spencer" <merdave@...>
Date: Fri Sep 29, 2006 3:38 am
Subject: Version 2.0: Yes!!!!
orchidsonline
Offline Offline
Send Email Send Email
 
Version 2.0 is great!  Now we can get subclasses to retain their
private variable correctly.  You can run the html below to see what I
mean.  Change the jsolait.js path if needed.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-
1">
<title>Test</title>

<script type='text/javascript' src='./jsolait/jsolait.js'></script>
</head>
<body>
<script type='text/javascript'>

Super = Class(function(publ, priv){
	 //  PRIVATE PROPERTIES
	 var sTest = "Super";

	 // CONSTRUCTOR
	 publ.__init__ 	 = function (){
		 this[priv]  = {};
		 this[priv].test = 'In Super';

		 return this;
	 };

	 // ACCESSOR  FUNCTIONS
	 // these next methods can be inherited by subclasses
which will
	 // retain the value for this[priv].test in each subclass
instance properly
	 // but will not retain  var sTest  correctly!
	 publ.setVarTest 	 = function(sNewTest){
		 sTest = sNewTest;
	 };
	 publ.setPrivTest  = function(sNewTest){
		 this[priv].test = sNewTest;
	 };
	 publ.getVarTest 	 = function(){
		 return sTest;
	 };
	 publ.getPrivTest  = function(){
		 return this[priv].test;
	 };

}) // end of class

Sub  = Class(Super, function(publ, priv, supr){
	 //  PRIVATE PROPERTIES
	 var sTest = "Super";

	 // CONSTRUCTOR
	 publ.__init__ 	 = function(){
		 supr.__init__.call(this);
		 this[priv] = {};
		 this[priv].test = 'In Sub';
		 return this;
	 };

	 // ACCESSOR  FUNCTIONS
	 // these are inherited from Super

}) // end of class

var oSub_A = new Sub();
var oSub_B = new Sub();
var oSub_C = new Sub();

oSub_A.setPrivTest("A");
oSub_B.setPrivTest("B");
oSub_C.setPrivTest("C");

oSub_A.setVarTest("A");
oSub_B.setVarTest("B");
oSub_C.setVarTest("C");

alert("Test Results:"+
"\ngetPrivTest():\n"+
oSub_A.getPrivTest()+"  "+oSub_B.getPrivTest()+"  "+oSub_C.getPrivTest
()+
"\ngetPrivTest():\n"+
oSub_A.getVarTest()+"  "+oSub_B.getVarTest()+"  "+oSub_C.getVarTest()
);


</script>
</body>
</html>



The alert will display  "A B C" for  getPrivTest() and
"C C C" for getVarTest()!  This has been a problem
in version 1 but not anymore!

Thanks again,
Dave

#279 From: "Christian Tiberg" <ctiberg@...>
Date: Thu Sep 28, 2006 2:59 pm
Subject: Ellipsifying text in the grid
tibbebugg
Offline Offline
Send Email Send Email
 
Hello!

When the text in a cell of a LiveGrid gets too long, it wraps to the next row, creating a fat cell. This is not looking good - so does anyone know how to avoid this, apart from doing the clipping on the server (which we tried, and it's finicky at different grid widths)?

--
Best regards,
  Christian Tiberg

#278 From: "roynos" <roynos@...>
Date: Thu Sep 28, 2006 12:12 am
Subject: calling handleResponse from an instance function of the XMLRPCMethod?
roynos
Offline Offline
Send Email Send Email
 
I tried using the handleResponse function from the XMLRPCMethod. But I
couldn't get it to work.

I have something like this:

function foo(url)
{
var liburl = imprt("urllib");
var xmlrpc = imprt("xmlrpc");

var resp = postURL(url);
var obj = new this.xmlrpc.XMLRPCMethod();

test.handleResponse(obj);
}

Are functions declared as "var" in the class not callable from outside
the function?

-Roy

#277 From: "roynos" <roynos@...>
Date: Thu Sep 28, 2006 12:07 am
Subject: calling handleResponse from an instance function of the XMLRPCMethod?
roynos
Offline Offline
Send Email Send Email
 
Hi,

I had to bypasss the XML RPC ServiceProxy and HTTP POST directly to a
server. The server returns an XMLRPC response. I want to use the
XMLRPC module to handle the response.

I tried using the handleResponse function from the XMLRPCMethod. But I
couldn't get it to work.

I have something like this:

function foo(url)
{
var liburl = imprt("urllib");
var xmlrpc = imprt("xmlrpc");

var resp = postURL(url);
var obj = new this.xmlrpc.XMLRPCMethod();

test.handleResponse(obj);
}

Are functions declared as "var" in the class not callable from outside
the function?

-Roy

#276 From: "roynos" <roynos@...>
Date: Tue Sep 26, 2006 7:05 pm
Subject: Re: Base64 encode file located on local computer
roynos
Offline Offline
Send Email Send Email
 
Ah.

Another approach that I am considering is to uploat the file to the a
HTTP server and have that XML-RPC over to the XML-RPC server.

I already have to do a PHP proxy all my XML-RPC calls because Firefox
doesn't allow javascript to communicate with XML-RPC servers located
on the same host BUT different port number. So, passing the file to
the proxy first is another viable solution.

--- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@...> wrote:
>
> yes and no,
>
> form within the browser it is not possible as you cannot read local
> files.
> From within windows scripting it should be possible as long as you can
> read the content of the file, which should work fine for text files
> but for binary it would be a bit difficult. Also the base64 encoder is
> not very fast in JS. The best thing would be to take an external
> program that turns your file into base64 encoded file, read the file's
> content into a string store that string inside an object that has a
> toXmlRpc() method which should return the xml-rpc code for base64
> encoded data, i.e. <base64> contentOfYourData </base64>
>
> you can then send the object as a paramert to the xml-rpc service
> like any other object
>
>
> Jan
>
> PS
> this might work as a data class
>
> var Base64Data=Class(function(publ,priv,supr){
>
>     publ.__init__=function(data){
>         this.data=data;
>     }
>
>     publ.toXmlRpc=function(){
>         return "<base64>"+this.data+"</base64>";
>     }
> });
>
>
> to use it just create a new object:
>
> var data = new Base64Data(base64_encoded_data)
> service.handleData(data)
>
>
> PPS: just found a little bug in the xml-rpc module that prevents it
> from receiving base64 encoded data if it is split  up on multiple
> lines. though sending works just fine.
>

Messages 276 - 410 of 411   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help