[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Connecting form omniOrbPy to XMLBlaster
spex66 at gmx.net wrote:
spex66 at gmx.net wrote:
Hi Marcel,
thanks for your response!
Using XmlRpc with scripting languages is much simpler
than using CORBA.
I tried the examples and get them easy to work.
But the xml-rpc demos hasn't the ability for the subsribe (push) services.
But this is the charme of xmlblaster (my actual opinion).
Yes, callbacks are the story ...
You need to start a XmlRpc callback server in your python
code which receives the callback messages.
(If the same client wants to publish and get updates
you probably need two threads).
(In CORBA the same problem arises -> two threads)
Look at the perl code for an example.
With CORBA (omniORBpy) i don't know if anybody has tried.
If you still want to use CORBA (omniORBpy) the steps are
usually like:
[...]
3. Start the server and start your Python client
seems dumb, but starting my client is the problem, I havn't the slightest
idea how (the omniorbpy examples has code like
orb = CORBA.orb_init(sys.argv, 'ominorb4')
and I cannot figure it out, how to connect to the running jacorb server... I
You need to pass the IOR of the server to your Python ORB.
Dump the IOR like this:
java -jar lib/xmlBlaster.jar -ior.file xmlBlaster.ior
or start a namingService or use our internal http server
to download the ior.
Then feed this IOR string from xmlBlaster.ior to your
Python orb, narrow it and you can connect.
think from this point, I know how to handle the interface from xmlblaster
again, then i want to test the subscribe (push) functionality...
actually I'm trying to get this hurdle with xml-rpc, and the twistedmatrix
framework for python (and their caspulating of xml-rpc), but not as easy again
:-/, still hacking...
and still searching the initial key to use xmlblaster and to get to my
application-level-programming!!!
As soon as you have connected to xmlBlaster (using CORBA or XmlRpc)
you have one futher step to solve:
When you receive messages the QoS is XML encoded.
So you need an XML parser to look into the XML markup
or parse the interesting parts out with some string
manipulation or regex.
If you make some progress we are happy for
feedback so other Python coders can benefit from your work,
regards
Marcel
any tips?