hello there i'me newbie in ironpython. i'm just wondering, is there
any way that ironpython dealing with xml-rpc? cause i had imported
i tried to import xmlrpclib to ironpython with this code
import xmlprclib
server = xmlrpclib.Server("localhost:4567")
month = server.getMonth(2002, 8)
i got this error message :
Traceback (most recent call last):
File System, line unknown, in Read
File System, line unknown, in Receive
File System, line unknown, in Receive
File , line 0, in ##180
File xmlrpclib, line unknown, in __call__
File D:\Python24\Lib\xmlrpclib.py, line 1096, in __call__
File D:\Python24\Lib\xmlrpclib.py, line 1379, in _ServerProxy__request
File D:\Python24\Lib\xmlrpclib.py, line 1147, in request
File D:\Python24\Lib\xmlrpclib.py, line 1276, in _parse_response
File , line 0, in Read##177
File System, line unknown, in Read
IOError: Unable to read data from the transport connection: Cannot access
a disp
osed object.
Object name: 'System.Net.Sockets.Socket'..
the code and the server n client are based on xmlrpc in python
based on http://www.ibm.com/developerworks/library/ws-pyth10.html
the server run on python 2.4
here is the code :
import calendar, SimpleXMLRPCServer
#The server object
class Calendar:
def getMonth(self, year, month):
return calendar.month(year, month)
def getYear(self, year):
return calendar.calendar(year)
calendar_object = Calendar()
server = SimpleXMLRPCServer.SimpleXMLRPCServer(("10.126.11.212", 4567))
server.register_instance(calendar_object)
#Go into the main listener loop
print "Listening on port 4567"
server.serve_forever()
the client run on ironpython 1.1.1 using xmlrpclib on python 2.4.4
import xmlrpclib
server = xmlrpclib.ServerProxy("http://localhost:";)
month = server.getMonth(2002, 8)
print month
can anyone help me with this problem or is there another way to implement
xmlprc client in ironpython ?
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com