[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-07-24 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Can somebody please point to a current version of the Apache documentation? The 
link in msg106322 does not work anymore.

I'm tempted to close this as invalid: Apache is clearly violating the XML-RPC 
specification, so the bug is theirs.

As a work-around, adding this to dispatch in your own application seems like a 
good solution to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-07-23 Thread Bhargav

Bhargav bhar...@bluejeansnet.com added the comment:

I am seeing the same exception when the server returns ex:nil, even when I 
enable allow_none.

The library only accepts 'nil' not 'ex:nil'

As a workaround, I have added dispatch[ex:nil] to my local library (which is 
obviously not a solution)

--
nosy: +bhargav

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-05-29 Thread Brian Quinlan

Brian Quinlan br...@sweetapp.com added the comment:

A few notes:
1. these types are *not* part of the XML-RPC specification, they are Apache 
extensions
2. these types seem designed to accommodate Java
3. some of these types would be very possible to accommodate e.g. 
ex:serializable which contains a serialized Java object

--
nosy: +bquinlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-05-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +loewis
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-05-22 Thread Attila Nagy

New submission from Attila Nagy b...@fsn.hu:

When talking to an Apache XML-RPC library based application via python 2.6.5 
xmlrpclib, I get this exception:
Traceback (most recent call last):
  File prb.py, line 4, in module
proxy.catv.getEndpointIdByIp('1.1.1.1')
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 1199, in __call__
return self.__send(self.__name, args)
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 1491, in __request
verbose=self.__verbose
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 1253, in request
return self._parse_response(h.getfile(), sock)
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 1389, in _parse_response
p.feed(response)
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 601, in feed
self._parser.Parse(data, 0)
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 868, in end
return f(self, join(self._data, ))
  File /tmp/Python-2.6.5/Lib/xmlrpclib.py, line 935, in end_struct
dict[_stringify(items[i])] = items[i+1]
IndexError: list index out of range

The exception is caused by the XML response, which includes a value with 
ex:i8 type. According to this: http://ws.apache.org/xmlrpc/types.html, there 
are a lot more types, which are not understood by python's xmlrpclib.

It's easy to fix the above by adding ex:i8 to the list of end_int dispatcher:
def end_int(self, data):
self.append(int(data))
self._value = 0
dispatch[i4] = end_int
dispatch[i8] = end_int
dispatch[ex:i8] = end_int
dispatch[int] = end_int

This makes the error disappear (and the program to work).
Of course, it would be nice to support all other types as well (in both 
directions).

--
components: XML
messages: 106322
nosy: bra
priority: normal
severity: normal
status: open
title: xmlrpclib compatibility issues with Apache XML-RPC library
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com