Exposing COM via XML-RPC or Something Else

Edward Muller edwardam at home.com
Wed Dec 1 21:42:28 EST 1999


Well, one of my thoughts was to pack things in documented Python
Dictionaries. I could then do a lot of stuff on the client side (sorting,
etc,) without having to do something like calling a function to get  a bit
of info from the server, do something, get a bit more etc. etc....

There are two problems with this.
1) I'm stuck in Python. Since the datascructures that Python is sending is a
'python' type it will be sent back to the client. That was If I publish (and
I hope to) the XML-RPC spec as well as reference source code for server and
client. If someone wanted to write a MAPI client (or access to some other
COM object that has been wrapped by an XML-RPC api) in JAVA or perl or C
they could using my published XML-RPC spec. Don't get me wrong, Python is a
great Language, but LOTS of people know Java and C. Not everyone know Python
(although an experienced programmer could pick up the basics in about 10
min) and after a week of working with it should be fairly happy to never
look elsewhere for a language.

2) XML-RPC can't directly map something like this....I can't think of anyway
to wrap this in XML-RPC so that session(DOT)Outbox(DOT)Messages(DOT)Add()
means something like Object.SubObject.SubObject.Method()....

        message = session.Outbox.Messages.Add()


 My Goals Are:
Cross Platform
Cross Language


I think this leaves three options:
1) Write my own wrapper library, port to every language (and on top of that
in a cross platform way) or....
2) use CORBA, or
3) write an XML-RPC Server/API for each COM component I want to 'expose'.

Toby Dickenson wrote:

> Edward Muller <edwardam at home.com> wrote:
>
> >I'm playing around with a way to expose Windows COM object via
> >XML-RPC (or something else).
>
> ...
>
> >OR should I shot for the stars and try to write
> >an abtraction layer allowing us to expose MS COM objects with something
> >like Corba, ILU or PYRO? This (if it worked) would allow us all to use
> >COM objects from other platforms that support whatever library I've used
> >to abstract/expose the COM object(s). This all assumes someone is
> >running a COM server on the machine the client would connect to...
>
> I've written a general purpose gateway going the other direction (ie
> exposing xmlrpc objects in an IDispatch disguise) by mixing pythoncom
> and xmlrpclib.py.
>
> Assuming you don't mind the mismatch in capabilities (xmlrpc can
> return 'structures', IDispatch has named parameters) its a
> straightforward exercise.
>
> hth,
>
> Toby Dickenson
> htrd90 at zepler.org





More information about the Python-list mailing list