By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,483 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,483 IT Pros & Developers. It's quick & easy.

Passing com object from simple xmlrpc server to client

P: n/a
Hello python users,

I am just learning on how to use xmlrpc and stumbled upon how to pass
com object
from server to client side.

The client side complain about can't marshall the com object. I don't
know what type
of marshall command I should use to pass the object.

Below are my scripts, any help / comments are greatly appreciated:

# Server Side script
# ===============

import win32com.client
import SimpleXMLRPCServer
import pythoncom

class ServerFunctions(object):

def call_com_object(self):
pythoncom.CoInitialize()
return win32com.client.Dispatch('excel.application')

if __name__ == '__main__'
server =
SimpleXMLRPCServer.SimpleXMLROCServer(('hostname', portnumber))
server.register_instance(ServerFunctions())
# Client Side Script
# ==============

import xmlrpclib
client = xmlrpclib.Server('http://hostname:portname")
excel_object = client.call_com_object()

Regards,
Tanto Sugiarto

Nov 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
tsjuan schrieb:
Hello python users,

I am just learning on how to use xmlrpc and stumbled upon how to pass
com object
from server to client side.

The client side complain about can't marshall the com object. I don't
know what type
of marshall command I should use to pass the object.
you can't do that. COM is a interprocess-communication facility that
doesn't have a value - which is what marshalling tries to accomplish:
create a wire-representation of a value.

If you are using COM anyway, why don't you use DCOM instead of XMLRPC -
then things could work.

Diez
Nov 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.