J
Joxean Koret
Hi to all!
I'm having troubles to make my XMLRPC application working with non
ASCII characters.
Example:
1.- In one terminal run the following script:
-----------XMLRPC Server-------------
import SimpleXMLRPCServer
server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost",8003))
def test():
return "Test with the non ascii character 'ñ'"
server.register_function(test)
server.serve_forever()
-----------XMLRPC Server-------------
2.- In a second terminal run this:
-----------XMLRPC Client-------------
import xmlrpclib
server = xmlrpclib.Server(("localhost", 8003))
server.test()
-----------XMLRPC Client-------------
When you runs the XMLRPC Client script the following error is raised:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/xmlrpclib.py", line 1032, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.3/xmlrpclib.py", line 1319, in __request
verbose=self.__verbose
File "/usr/lib/python2.3/xmlrpclib.py", line 1083, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.3/xmlrpclib.py", line 1217, in _parse_response
p.feed(response)
File "/usr/lib/python2.3/xmlrpclib.py", line 528, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5,
column 50
Any ideas of what can I do?
Regards,
Joxean Koret
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBCwqCmU6rFMEYDrlERAs7xAJ9MbhuB1flFuvg2Ja131yMjNH94MACfQhY6
E9/JrSUX6sfVWWc4HOjUc2E=
=jA9n
-----END PGP SIGNATURE-----
I'm having troubles to make my XMLRPC application working with non
ASCII characters.
Example:
1.- In one terminal run the following script:
-----------XMLRPC Server-------------
import SimpleXMLRPCServer
server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost",8003))
def test():
return "Test with the non ascii character 'ñ'"
server.register_function(test)
server.serve_forever()
-----------XMLRPC Server-------------
2.- In a second terminal run this:
-----------XMLRPC Client-------------
import xmlrpclib
server = xmlrpclib.Server(("localhost", 8003))
server.test()
-----------XMLRPC Client-------------
When you runs the XMLRPC Client script the following error is raised:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/xmlrpclib.py", line 1032, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.3/xmlrpclib.py", line 1319, in __request
verbose=self.__verbose
File "/usr/lib/python2.3/xmlrpclib.py", line 1083, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.3/xmlrpclib.py", line 1217, in _parse_response
p.feed(response)
File "/usr/lib/python2.3/xmlrpclib.py", line 528, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5,
column 50
Any ideas of what can I do?
Regards,
Joxean Koret
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBCwqCmU6rFMEYDrlERAs7xAJ9MbhuB1flFuvg2Ja131yMjNH94MACfQhY6
E9/JrSUX6sfVWWc4HOjUc2E=
=jA9n
-----END PGP SIGNATURE-----