<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div><div>Goodmorning dear Team,<br><br>I'm Davide D'Arenzo and I'm working with Python using the standard xmlrpclib library communicating between a JavaServer (that host xmlrpc server) and my python client. I have a problem and I hope that you should solve my issue.<br><br></div>I want to send a DOM instance through xmlrpc protocol. I know that the istance are impossible to manage by xmlrpclib library in Python but this is what I need. I'm trying to understand why is not possible to marshal the class Nodelist and I recognize that the target function is dumps(self, values) in class Marshaller because she couldn't find this type of Python Object.<br><br></div>For Instance, the Fault code is this:<br><br><div><div>Traceback (most recent call last):<br>  File "testRestSwi.py", line 31, in <module><br>    conn.xxx.xxx(dom3,"xxx","xxx")<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__<br>    return self.__send(self.__name, args)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 1572, in __request<br>    allow_none=self.__allow_none)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps<br>    data = m.dumps(params)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps<br>    dump(v, write)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump<br>    f(self, value, write)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 756, in dump_instance<br>    self.dump_struct(value.__dict__, write)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 735, in dump_struct<br>    dump(v, write)<br>  File "/usr/lib/python2.7/xmlrpclib.py", line 646, in __dump<br>    raise TypeError, "cannot marshal %s objects" % type(value)<br>TypeError: cannot marshal <class 'xml.dom.minicompat.NodeList'> objects<br><br></div><div>Now, I would want to solve this problem and for sure there are many solutions. But I don't know how to develop or implement something within the xmlrpclib in order to avoid the "marshalling" problem. Keep in mind that the file object must be a DOM, is aim, uncheangeable.<br><br></div><div>For Instance, I'm developing the following:<br>import xml.dom.minidom as parser<br>import xmlrpclib<br>dom3 = parser.parseString("xxx")<br>conn = xmlrpclib.ServerProxy('xxx',allow_none=True,verbose=True)<br>conn.xxx.xxx(dom3,"xxx","xxx") #<--- The problem Here.<br><br></div><div>Might you help me?<br></div><div>Thank you a lot.<br></div></div></div>
</div><br></div>