Re: [Zope] XML-RPC encrypted?
Peter Bengtsson schrieb: > Have you tried > https://user:[EMAIL PROTECTED]:port\folder\method.. > ? > > On 1/25/06, José Carlos Senciales <[EMAIL PROTECTED]> wrote: > >>Hello, >> >>I need to use XML-RPC to call some functions of a product in zope, but all >>my xml-rpc conections >>has user:[EMAIL PROTECTED]:port\folder\method >> I'd use forward-Slashes /// in URLs anyway ;)) And yes, SSL works and you dont send user:password in an url to the server - the client will/should build a real BasicAuth-Header out of it (which you better transport over ssl anyway) HTH Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC encrypted?
Have you tried https://user:[EMAIL PROTECTED]:port\folder\method.. ? On 1/25/06, José Carlos Senciales <[EMAIL PROTECTED]> wrote: > Hello, > > I need to use XML-RPC to call some functions of a product in zope, but all > my xml-rpc conections > has user:[EMAIL PROTECTED]:port\folder\method > > I´m wondering if it´s possible to do a call with xml-rpc with all data > encrypted... with ssl...? > > Thanks. > Jose Carlos > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC encrypted?
Hello, I need to use XML-RPC to call some functions of a product in zope, but all my xml-rpc conections has user:[EMAIL PROTECTED]:port\folder\method I´m wondering if it´s possible to do a call with xml-rpc with all data encrypted... with ssl...? Thanks. Jose Carlos ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC within ZOPE
Jan-Ole Esleben wrote at 2005-12-11 19:10 +0100: >Is it at all impossible to use XML-RPC _within_ a ZOPE architecture? In principle yes. Be careful however: it is easy to introduce deadlocks! When during request processing you call back into the same Zope via XML-RPC, the calling out request will not complete until the XML-RPC returns a result (this always holds for calls, XML-RPC or other, to an external or internal server). Zope has a limited amount of workers (the default is 4) able to execute requests. If there are no free workers, requests have to wait for one. Now imagine that as many requests arrive as there are workers and each of them wants to perform an XML-RPC against the same Zope. Then you have a deadlock: none of the XML-RPC requests will finish, because there are no free workers. An no worker will ever become free again, because each of them waits for its XML-RPC to finish. Therefore, you should directly call internal resources (rather than use XML-RPC). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [ZOPE] XML-RPC within ZOPE
Sorry, it was my mistake. My design actually works (surprise!), but I missed a very obscure non-indented self._p_changed = 1 in a base class for my product. I know, I'm an idiot. But I'm glad it works now. Ole ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [ZOPE] XML-RPC within ZOPE
Chris: the errors I get are always ConflictErrors without any usable tracebacks. I would like to give more information, but it really is very complex when you go a little deeper and would probably not be useful. I'll try to describe it a little better anyway: I have an Object that offers an interface for dispatching methods. It does so by deciding wether the method's object is on the local server or not, and depending on that, calls it via XML-RPC or via the ZOPE context (self). A remote ZOPE server cannot be part of a ZEO backend because there need to be several (hundred) self sustained servers that can act on their own when the connection to the others fails (which is likely rather than possible). But, as I just realised - in an internet context, isn't it possible that something like this could happen without even being part of a design? One ZOPE server's object, say, "LibraryManager", calls an object in another ZOPE server, say "UniversityLibrary", via XML-RPC (because it doesn't even know it's ZOPE). It asks it for a book. The University Library doesn't have it, but it has a service that looks in all the libraries it knows and returns any found occurences. Thus, at some point during that call, it asks the first server's LibraryManager about the book - again, not even knowing that it is a ZOPE server, via XML-RPC. Should this work, and where does it differ from what I'm doing? > > The problem is that it isn't my design, and the design is part of a > > contract. I can't really do anything about that (the major problem is > > that there will be SOAP components that might even need to be > > transparently integrated - which completely excludes ZEO). > Why do you think that? ZEO is simply a single point of persistence for > a group of Zope Application Servers. But what if I don't know which components are ZOPE, and components can be transparently exchanged? Ole ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC within ZOPE
Jan-Ole Esleben wrote: The problem is that it isn't my design, and the design is part of a contract. I can't really do anything about that (the major problem is that there will be SOAP components that might even need to be transparently integrated - which completely excludes ZEO). That depends on your thinking... I tried doing my own commits, but it doesn't work, it just bombs earlier (no matter where I do them). You;re not giving us a lot of info here, but I think you need to read the code in lib/python/ZPublisher in depth if you really need to play at this level... I really don't know why, my only guess is that something about the transaction management breaks terribly when you go back and forth between objects without them being able to track it. Only I cannot figure out what. Well, you could start by showing us the errors you're getting... It is not possible to do _really_ explicit transaction management with ZODB, is it? Of course it is. But you're talking about Zope here, not ZODB. Zope manages transactions so users don't often have to worry about them. If you want to manage transactions within Zope, the nyou have to understadn and co-operate with the transaction management that Zope does... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC within ZOPE
The problem is that it isn't my design, and the design is part of a contract. I can't really do anything about that (the major problem is that there will be SOAP components that might even need to be transparently integrated - which completely excludes ZEO). I tried doing my own commits, but it doesn't work, it just bombs earlier (no matter where I do them). I really don't know why, my only guess is that something about the transaction management breaks terribly when you go back and forth between objects without them being able to track it. Only I cannot figure out what. It is not possible to do _really_ explicit transaction management with ZODB, is it? Ole 2005/12/12, Alan Milligan <[EMAIL PROTECTED]>: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jan-Ole Esleben wrote: > > OK, the following is the case: > > > > The setup is for functions dispatching either locally or via XML-RPC. > > At the moment, the mechanism I use is to detect locality is flawed and > > thus doesn't work well. So I have local XML-RPC calls where I could > > have global ones. But. > > > > 1. I need that possibility for testing the XML-RPC setup. I cannot set > > up multiple instances for every cheap test. At least I shouldn't have > > to. The very important reason, however, is: > > 2. This is a generic call dispatcher. It is used, for example, for > > object name resolution in a widely deployed system. So, what could > > happen and couldn't happen locally is this: > > Zope isn't CORBA. ZEO is the correct way to scale/cluster Zope's. > > > > > 1. Server1 dispatcher calls, via XML-RPC, Server2. > > 2. Server2 dispatcher calls Server1, which does something locally > > (same communication management object as the dispatcher, maybe another > > local call) and then returns > > > > This is the same problem spread out over two servers, where locality > > isn't possible anymore. The call from Server1 to Server2 must be made > > via XML-RPC and I cannot exclude Server2 calling Server1 back. > > If you really must architect your solution this way, then you are going > to have to do your own transaction management. Your 'local' calls need > to do explicit commit() calls and you're going to have to reread > 'tainted' objects. > > Again, it will take you half an hour to modify your design instead of > half a year to get all the bugs out of your implementation. > > Alan > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.2.6 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iD8DBQFDnN2ACfroLk4EZpkRAkQ7AJ4rTWpmldRq1GoPGIV8r0CT7+VPJwCZAbKB > 5PBuLd5sJgh7QZe1ey8lZ9g= > =3TrG > -END PGP SIGNATURE- > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC within ZOPE
OK, the following is the case: The setup is for functions dispatching either locally or via XML-RPC. At the moment, the mechanism I use is to detect locality is flawed and thus doesn't work well. So I have local XML-RPC calls where I could have global ones. But. 1. I need that possibility for testing the XML-RPC setup. I cannot set up multiple instances for every cheap test. At least I shouldn't have to. The very important reason, however, is: 2. This is a generic call dispatcher. It is used, for example, for object name resolution in a widely deployed system. So, what could happen and couldn't happen locally is this: 1. Server1 dispatcher calls, via XML-RPC, Server2. 2. Server2 dispatcher calls Server1, which does something locally (same communication management object as the dispatcher, maybe another local call) and then returns This is the same problem spread out over two servers, where locality isn't possible anymore. The call from Server1 to Server2 must be made via XML-RPC and I cannot exclude Server2 calling Server1 back. Does this make it a little more of a real problem? Ole 2005/12/12, Alan Milligan <[EMAIL PROTECTED]>: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jan-Ole Esleben wrote: > >>It really *is* in your interests to ensure a single request completes > >>all your functional requirements ;) > > > > > > That's not possible unfortunately. The design of the system is rather > > complex, and unalterable in this respect. However, it is not true that > > it is usually possible to fulfil this requirement. What of programs > > running on an operating system that call other programs via that > > operating system? > > > > I don't believe you. > > You have a client application calling your Zope server's bla() > function. It can do this either by HTTP or XML-RPC by choosing the > appropriate Content-Type. > > You've chosen to implement this interface by making other XML-RPC calls > to the same server to complete the task. This is both unnecessary and > bad. Unnecessary because you're doing an RPC when you've got all you > need in local memory. This is bad because you're introducing the > additional overhead of setting up said RPC. Worse, you're now > responsible for your own transaction management because you've split the > task across multiple ZODB connections. > > You need to think about the *correct* way to write your bla() function. > In doing this, you want to be able to take advantage of the automatic > rollback facilities of Zope by keeping all of this in one transaction, > which will also avoid your initial problem of conflict errors. > > Alan > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.2.6 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iD8DBQFDnNZcCfroLk4EZpkRArTDAJ96TGwDy047D09jkmRNbGyD7e+3QgCg0aNZ > lLo0znXi4qvXr5j4SseH2k8= > =hu4V > -END PGP SIGNATURE- > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC within ZOPE
> It really *is* in your interests to ensure a single request completes > all your functional requirements ;) That's not possible unfortunately. The design of the system is rather complex, and unalterable in this respect. However, it is not true that it is usually possible to fulfil this requirement. What of programs running on an operating system that call other programs via that operating system? Given that that is a requirement that needs to be met, do I have any options? Ole ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC within ZOPE
Hi! Is it at all impossible to use XML-RPC _within_ a ZOPE architecture? What I mean is: I have a nested call structure: 1. Python script calls a method from a ZODB object 2. That method calls a Python module function 3. That module function dispatches an XML-RPC call to the same ZODB object called in step 1 4. This last call, which is rather complex, returns, and all the calls leading up to it return, sometimes doing some minor work When I use the same code _without_ any XML-RPC (the Zope server's self instead of the XML-RPC server object for that server), it works just fine. When I use XML-RPC, I get a ConflictError during the final return (from step 1), and I get it if I commit manually beforehand, so it must be the commit triggering it. The tricky thing is: nothing in my ZODB changes. I have several mutable _arguments_ that are passed on, but they are not default arguments and they don't get written to the ZODB. Is what I'm trying to do impossible for some reason? Or can I just make the whole call take place outside any transactions? Thanks in advance for any pointers, I'm really a little desparate at this point. Ole ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC problem solved!!
OK, with help of my boss we were able to get the xmlrpclib patch to work with Authentication. Basically I did as before, with a duplicated, modified version "xmlrpclibx", and used it: import xmlrpclibx t = xmlrpclibx.BasicAuthTransport('myusername','mypassword') # I have to create the new modified transport with this call! s = xmlrpclibx.Server("http://0",t) # and passed t as argument! print s.imin.short() Then it worked. I just didn't create the right object to pass in, that's all. Happy Holidays again, everyone! I-Min ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
A number of folks have asked me about ming-0.0.4 and Zwiff. I have just uploaded a new Zwiff that uses ming-0.0.4+ (there is actually a full ming distribution this time with all the patches needed to work with Zwiff.) Let me know how it goes! http://www.zope.org/Members/sspickle/Zwiff -steve ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
OK... I thought I'd put a little effort into this concept, and out came: http://www.zope.org/Members/sspickle/Zwiff Take a look it's a start at the concept of 'on the fly' swf from Zope. I needed a quick way to get up and running so I sub-classed PythonMethod and used the existing swf library from http://www.opaque.net/ming. Anyway this is another way to do 'flash' with Zope -steve > "Jason" == Jason Cunliffe <[EMAIL PROTECTED]> writes: Jason> Hello Jason> I am missing the start of this thread, so I may be off Jason> topic, but you might want to look seriously at Flash5 for Jason> the client side programming and graphics. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
Hi Jason, I've been working with Flash some lately as well.. with an eye toward useful vector graphics for Zope. There is a library called ming (http://www.opaque.net/ming) with a (SWIG'ed) python extension that I've been slowing working through, adding wrapping fuctions and getting to the point of Zope'ability. Ming is a 'swf' creation library with no connection to Macromedia. Something like this would free folks from the need to buy 'MM Flash' to work with swf output. It also would make a great way to generate swf 'on the fly' within Zope.. I'll try to get a proof of concept working -steve > "Jason" == Jason Cunliffe <[EMAIL PROTECTED]> writes: Jason> Hello Jason> I am missing the start of this thread, so I may be off Jason> topic, but you might want to look seriously at Flash5 for Jason> the client side programming and graphics. Jason> PROS: Jason> 1. Flash5 ActionScript is _very_ close to JavaScript Jason> 2. Flash Player/Plugin is much smaller than SVG 300Kb Jason> vs. 13Mb I think + large user installed base. Jason> 3. Flash5 has new XML and XMLSockets objects which should Jason> integrate nicely with XMLRPC and Zope via some smooth Jason> Python external method programming. Jason> 4. Flash will allow _much_ more client side interactivity Jason> than SVG Jason> 5. You can port SVG graphics to Flash using various tools Jason> [or even write your own]. Jason> 6. You can still use SVG JavaScript and do some comparisons Jason> where appropriate... Jason> 7. Flash is more mature than SVG, though I agree SVG is Jason> developing very well. I expect we shall see some serious Jason> applications during next 12 months with it. Jason> 8. Flash is very object-oriented once you grok to its Jason> design. Thus mirrors Zope very well. Jason> CONS: Jason> A. Flash has steepish learning curve, but high payback and Jason> reusability. [Not as tough as Zope :-) ] B. SVG is fully Jason> open; the Flash spec is 'published' but not open in the Jason> same way. C. must be more but cant thing of them right now Jason> If you are interested contact me - I have lots of useful Jason> research on this topic. Jason> - Jason Jason> ___ Jason> Jason Cunliffe = Nomadics['Interactive Art+Technology'] >> - Original Message - From: "Hannu Krosing" >> <[EMAIL PROTECTED]> To: "David Nimmons" <[EMAIL PROTECTED]> >> | David Nimmons wrote: >> | > >> | > I am trying to develop a web based interface to automation >> equipment (Allen | > Bradley plc's in this case) to use for an >> operator interface. I am Jason> using >> | > SVG to develop graphics and want to use javascript to >> manipulate the | > graphics based on data from the plc. I am >> looking for a way to pull Jason> more >> | > data from the server without having to reload the page. My >> question is will | > XML-RPC allow this. Or does Zope have some >> other mechanism that would allow | > this. Thanks for any help. >> | >> | Actually this is mainly a client-side problem, on server side >> you have | total | freedom to serve any protocol ;) >> | >> | Often this kind of problem is solved by having twho frames >> and data is | aquired | by reloading the "data-page" which then >> manipulates the | "presentation-page" | using javascript, >> possibly in its onLoad method. Jason> ___ Zope Jason> maillist - [EMAIL PROTECTED] Jason> http://lists.zope.org/mailman/listinfo/zope ** No cross Jason> posts or HTML encoding! ** (Related lists - Jason> http://lists.zope.org/mailman/listinfo/zope-announce Jason> http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
Hello I am missing the start of this thread, so I may be off topic, but you might want to look seriously at Flash5 for the client side programming and graphics. PROS: 1. Flash5 ActionScript is _very_ close to JavaScript 2. Flash Player/Plugin is much smaller than SVG 300Kb vs. 13Mb I think + large user installed base. 3. Flash5 has new XML and XMLSockets objects which should integrate nicely with XMLRPC and Zope via some smooth Python external method programming. 4. Flash will allow _much_ more client side interactivity than SVG 5. You can port SVG graphics to Flash using various tools [or even write your own]. 6. You can still use SVG JavaScript and do some comparisons where appropriate... 7. Flash is more mature than SVG, though I agree SVG is developing very well. I expect we shall see some serious applications during next 12 months with it. 8. Flash is very object-oriented once you grok to its design. Thus mirrors Zope very well. CONS: A. Flash has steepish learning curve, but high payback and reusability. [Not as tough as Zope :-) ] B. SVG is fully open; the Flash spec is 'published' but not open in the same way. C. must be more but cant thing of them right now If you are interested contact me - I have lots of useful research on this topic. - Jason ___ Jason Cunliffe = Nomadics['Interactive Art+Technology'] > - Original Message - > From: "Hannu Krosing" <[EMAIL PROTECTED]> > To: "David Nimmons" <[EMAIL PROTECTED]> > | David Nimmons wrote: > | > > | > I am trying to develop a web based interface to automation equipment > (Allen > | > Bradley plc's in this case) to use for an operator interface. I am using > | > SVG to develop graphics and want to use javascript to manipulate the > | > graphics based on data from the plc. I am looking for a way to pull more > | > data from the server without having to reload the page. My question is > will > | > XML-RPC allow this. Or does Zope have some other mechanism that would > allow > | > this. Thanks for any help. > | > | Actually this is mainly a client-side problem, on server side you have > | total > | freedom to serve any protocol ;) > | > | Often this kind of problem is solved by having twho frames and data is > | aquired > | by reloading the "data-page" which then manipulates the > | "presentation-page" > | using javascript, possibly in its onLoad method. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
Another possibility is to use IE on the client side and use one of the COM interfaces to XML-RPC. You could then use javascript/vbscript to get data as required. hth Phil - Original Message - From: "Hannu Krosing" <[EMAIL PROTECTED]> To: "David Nimmons" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 08, 2000 10:16 PM Subject: Re: [Zope] XML-RPC | David Nimmons wrote: | > | > I am trying to develop a web based interface to automation equipment (Allen | > Bradley plc's in this case) to use for an operator interface. I am using | > SVG to develop graphics and want to use javascript to manipulate the | > graphics based on data from the plc. I am looking for a way to pull more | > data from the server without having to reload the page. My question is will | > XML-RPC allow this. Or does Zope have some other mechanism that would allow | > this. Thanks for any help. | | Actually this is mainly a client-side problem, on server side you have | total | freedom to serve any protocol ;) | | Often this kind of problem is solved by having twho frames and data is | aquired | by reloading the "data-page" which then manipulates the | "presentation-page" | using javascript, possibly in its onLoad method. | | | Hannu | | ___ | Zope maillist - [EMAIL PROTECTED] | http://lists.zope.org/mailman/listinfo/zope | ** No cross posts or HTML encoding! ** | (Related lists - | http://lists.zope.org/mailman/listinfo/zope-announce | http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC
David Nimmons wrote: > > I am trying to develop a web based interface to automation equipment (Allen > Bradley plc's in this case) to use for an operator interface. I am using > SVG to develop graphics and want to use javascript to manipulate the > graphics based on data from the plc. I am looking for a way to pull more > data from the server without having to reload the page. My question is will > XML-RPC allow this. Or does Zope have some other mechanism that would allow > this. Thanks for any help. Actually this is mainly a client-side problem, on server side you have total freedom to serve any protocol ;) Often this kind of problem is solved by having twho frames and data is aquired by reloading the "data-page" which then manipulates the "presentation-page" using javascript, possibly in its onLoad method. Hannu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC
I am trying to develop a web based interface to automation equipment (Allen Bradley plc's in this case) to use for an operator interface. I am using SVG to develop graphics and want to use javascript to manipulate the graphics based on data from the plc. I am looking for a way to pull more data from the server without having to reload the page. My question is will XML-RPC allow this. Or does Zope have some other mechanism that would allow this. Thanks for any help. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC vs External method?
Kapil, Thank you for this simple solution! I'm new to XML and Zope and sometimes I get caught in learning too many new things at once, we forget to think "simply":-) Thanks to you, I don't need to use either External method, or XML-RPC. The following simple DTML method works: Thanks again! --irene Ender wrote: > > if the xml format is simple you could just do it dtml, it would end up > with some extra white space but it would still be valid. > > a dtml method akin to > > > > > > > > > > kapil > > Irene Barg wrote: > > > > Hello all, > > > > I have setup a query form to query a small MySQL database using > > Zope. It consists of: > > > > 1. ZMySQL Database Connection (ZMySQLDA) > > 2. ZSQL method > > 3. A search interface. > > > > Now, what I want is the user to have the option of viewing the > > results in HTML or raw XML. I think there can be two approaches > > to this: 1. External method, or 2. XML-RPC. > > > > 1. External method: Replaces the ZMySQL database connection > > with an external Python function called 'mysqldb_XML', pieces > > of which follow: > > > > def mysqldb_XML(self,query): > > """ > > Use a MySQL SAX driver to map relational data to XML. > > Hacked from PyXML saxdemo.py. The MySQL driver is a modified > > version of Sean McGrath's drv_mysql.py ("XML Processing with > > Python"). > > """ > > from xml.sax import saxexts, saxlib, saxutils, writer > > import sys,urllib > > > > #Our MySQLdb XML driver; > > driver="xml.sax.drivers.drv_mysqldb" > > . > > out = sys.stdout; > > p=saxexts.make_parser(driver) > > dh=writer.PrettyPrinter(out,dtdinfo=info) > > try: > > p.setDocumentHandler(dh) > > return p.parse(query) > > except IOError,e: > > return in_sysID+": "+str(e) > > except saxlib.SAXException,e: > > return str(e) > > > > Inside Zope, I get the ZSQL 'query' and do something like: > > > > > > > > > > > > > > 2. XML-RPC: It seems to me XML-RPC could do this too, but > > I don't know how one would print out the raw XML response. > > Could I have a Zope client request the ZSQL method above, > > but instead of sending it to my output DTML method, I just > > print the raw-XML stream? Examples would be helpful:-) > > > > It seems to me if XML-RPC already produces an XML formatted > > stream, it would be more efficient to just use it (unless > > there is yet another way in Zope I'm not aware of). Is it > > possible? Is there any reason to want to use the external > > method instead? > > > > Thanks for your comments, > > > > --irene > > > > -- > > Irene Barg Email: [EMAIL PROTECTED] > > Steward Observatory Phone: 520-621-2602 > > 933 N. Cherry Ave. > > University of Arizona FAX:520-621-1891 > > Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg > > -- > > > > ___ > > Zope maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope-dev ) -- -- Irene Barg Email: [EMAIL PROTECTED] Steward Observatory Phone: 520-621-2602 933 N. Cherry Ave. University of Arizona FAX:520-621-1891 Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg -- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC vs External method?
if the xml format is simple you could just do it dtml, it would end up with some extra white space but it would still be valid. a dtml method akin to kapil Irene Barg wrote: > > Hello all, > > I have setup a query form to query a small MySQL database using > Zope. It consists of: > > 1. ZMySQL Database Connection (ZMySQLDA) > 2. ZSQL method > 3. A search interface. > > Now, what I want is the user to have the option of viewing the > results in HTML or raw XML. I think there can be two approaches > to this: 1. External method, or 2. XML-RPC. > > 1. External method: Replaces the ZMySQL database connection > with an external Python function called 'mysqldb_XML', pieces > of which follow: > > def mysqldb_XML(self,query): > """ > Use a MySQL SAX driver to map relational data to XML. > Hacked from PyXML saxdemo.py. The MySQL driver is a modified > version of Sean McGrath's drv_mysql.py ("XML Processing with > Python"). > """ > from xml.sax import saxexts, saxlib, saxutils, writer > import sys,urllib > > #Our MySQLdb XML driver; > driver="xml.sax.drivers.drv_mysqldb" > . > out = sys.stdout; > p=saxexts.make_parser(driver) > dh=writer.PrettyPrinter(out,dtdinfo=info) > try: > p.setDocumentHandler(dh) > return p.parse(query) > except IOError,e: > return in_sysID+": "+str(e) > except saxlib.SAXException,e: > return str(e) > > Inside Zope, I get the ZSQL 'query' and do something like: > > > > > > > 2. XML-RPC: It seems to me XML-RPC could do this too, but > I don't know how one would print out the raw XML response. > Could I have a Zope client request the ZSQL method above, > but instead of sending it to my output DTML method, I just > print the raw-XML stream? Examples would be helpful:-) > > It seems to me if XML-RPC already produces an XML formatted > stream, it would be more efficient to just use it (unless > there is yet another way in Zope I'm not aware of). Is it > possible? Is there any reason to want to use the external > method instead? > > Thanks for your comments, > > --irene > > -- > Irene Barg Email: [EMAIL PROTECTED] > Steward Observatory Phone: 520-621-2602 > 933 N. Cherry Ave. > University of Arizona FAX:520-621-1891 > Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg > -- > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC vs External method?
Hello all, I have setup a query form to query a small MySQL database using Zope. It consists of: 1. ZMySQL Database Connection (ZMySQLDA) 2. ZSQL method 3. A search interface. Now, what I want is the user to have the option of viewing the results in HTML or raw XML. I think there can be two approaches to this: 1. External method, or 2. XML-RPC. 1. External method: Replaces the ZMySQL database connection with an external Python function called 'mysqldb_XML', pieces of which follow: def mysqldb_XML(self,query): """ Use a MySQL SAX driver to map relational data to XML. Hacked from PyXML saxdemo.py. The MySQL driver is a modified version of Sean McGrath's drv_mysql.py ("XML Processing with Python"). """ from xml.sax import saxexts, saxlib, saxutils, writer import sys,urllib #Our MySQLdb XML driver; driver="xml.sax.drivers.drv_mysqldb" . out = sys.stdout; p=saxexts.make_parser(driver) dh=writer.PrettyPrinter(out,dtdinfo=info) try: p.setDocumentHandler(dh) return p.parse(query) except IOError,e: return in_sysID+": "+str(e) except saxlib.SAXException,e: return str(e) Inside Zope, I get the ZSQL 'query' and do something like: 2. XML-RPC: It seems to me XML-RPC could do this too, but I don't know how one would print out the raw XML response. Could I have a Zope client request the ZSQL method above, but instead of sending it to my output DTML method, I just print the raw-XML stream? Examples would be helpful:-) It seems to me if XML-RPC already produces an XML formatted stream, it would be more efficient to just use it (unless there is yet another way in Zope I'm not aware of). Is it possible? Is there any reason to want to use the external method instead? Thanks for your comments, --irene -- Irene Barg Email: [EMAIL PROTECTED] Steward Observatory Phone: 520-621-2602 933 N. Cherry Ave. University of Arizona FAX:520-621-1891 Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg -- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] XML-RPC and Zope
Lots. If you have Zope 2.2, see the API Documentation in the help system. > -Original Message- > From: Gijs Reulen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 02, 2000 8:33 AM > To: Mailinglist Zope > Subject: [Zope] XML-RPC and Zope > > > Hi there > > I am experimenting with XMP-RPC and Zope: I want to > manipulate things from > Borland Delphi. I got the example from the XML-RPC working, > but now I wonder > what other commands besides 'objectIds' are valid for Zope. > For example, how > can I determine which type each object in a folder is and how > can I retrieve > and store (change) the contents of an object ? > > Gijs Reulen > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC and Zope
Hi there I am experimenting with XMP-RPC and Zope: I want to manipulate things from Borland Delphi. I got the example from the XML-RPC working, but now I wonder what other commands besides 'objectIds' are valid for Zope. For example, how can I determine which type each object in a folder is and how can I retrieve and store (change) the contents of an object ? Gijs Reulen ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] (XML-RPC) Calling Database.manage_pack
Hello! I wrote a simple script to pack Data.fs on a regular basis. It is very simple, actually, just urllib.urllretrieve("http://my.zope/Control_Panel/Database/manage_pack?days:float=3") (a little bit harder than that, but I did it) Now I am trying to achieve the same with XML-RPC. No luck. How can I pass "days" parameter? server = xmlrpclib.Server("http://my.zope", BasicAuthTransport(login, password)) server.Control_Panel.Database.manage_pack(3) does not work - Zope returns an error abou invalid value, server.Control_Panel.Database.manage_pack(days=3) does not run at all - args expected to be a list, not a hash... Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] XML-RPC error
Sin Hang Kin wrote: > After failing to use wxLoadSite, which report > > wxloadsite.py, line 164, in onPressCopy > AttributeError: host I'm aware of this error, but due to lack of time haven't had time to investigate. Perhaps try typing the host as "http://zope:8080/" instead of "http://zope:8080"? > Can anyone help me with these? Moreover, it seems that it is not using the > BasicAuthTransport which is mentationed in articles in xml.com, are there > some changes in the xmlrpc code? Yes, I'm using an altered xmlrpclib.py with some additional code which adds the basic authentication. -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC error
Hi, After failing to use wxLoadSite, which report wxloadsite.py, line 164, in onPressCopy AttributeError: host I try to test it by hand, I start up python and >>> zs = xmlrpclib.Server('http://localhost:8080',username='kentsin',password='passwo rd') >>> t = zs.objectIds() Traceback (innermost last): File "", line 1, in ? File "wxLoadSite\xmlrpclib.py", line 550, in __call__ return self.__send(self.__name, args) File "wxLoadSite\xmlrpclib.py", line 644, in __request request File "wxLoadSite\xmlrpclib.py", line 596, in request headers wxLoadSite.xmlrpclib.ProtocolError: I am using Win32 zope 2.2b1 on the same win98. The xmlrpc client is using the same python with the binary zope. (I have the zope1.5.2 install in same box). Can anyone help me with these? Moreover, it seems that it is not using the BasicAuthTransport which is mentationed in articles in xml.com, are there some changes in the xmlrpc code? Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] XML-RPC
Try http://www.zope.org/SiteIndex/search?date%3Adate=1969%2F12%2F31++16%3A00%3A0 0+US%2FPacific&date_usage=range%3Amin&text_content=xmlrpc -Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Budi Wiyono Sent: 14 June 2000 10:34 To: [EMAIL PROTECTED] Subject: [Zope] XML-RPC Hi, Where can I found Zope based XML-RPC example application ? Thanks, Budi Wiyono ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XML-RPC
Hi, Where can I found Zope based XML-RPC example application ? Thanks, Budi Wiyono ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )