-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
None
-
Affects Version/s: 3.2.1
-
Component/s: None
-
Environment:
3.2.1 standalone w/ MySQL, Blackdown 1.4.1b on Debian
-
3.02
I'm using the SOAP interface via Python's SOAPpy library.
As far as I can tell, I should at minimum be able to updateGroup() by simply running a getGroup() – getGroup() returns a RemoteGroup and updateGroup() takes the same. However, I get an error instead:
>>> g = j.getGroup(t, 'lhl')
>>> print g
<SOAPpy.Types.structType multiRef at 1083188620>:
>>> j.updateGroup(t, g)
<Fault soapenv:Server.userException: java.lang.IllegalArgumentException: argument type mismatch: <SOAPpy.Types.structType detail at 1082408364>:
>
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 421, in _call_
return self.__r_call(*args, **kw)
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 443, in __r_call
self._hd, self._ma)
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 357, in __call
raise p
SOAPpy.Types.faultType: <Fault soapenv:Server.userException: java.lang.IllegalArgumentException: argument type mismatch: <SOAPpy.Types.structType detail at 1082408364>:
>
Of course, that's rather pointless. What I want to do is add users to the group. This obviously doesn't work either:
>>> u = j.getUser(t, 'lhl')
>>> print u
<SOAPpy.Types.structType multiRef at 1083188268>:
>>> g['users'].append(u)
>>> print g
<SOAPpy.Types.structType multiRef at 1083188620>: {'name': 'lhl', 'users': [<SOAPpy.Types.structType multiRef at 1083188268>:
]}
>>> j.updateGroup(t, g)
<Fault soapenv:Server.userException: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.: <SOAPpy.Types.structType detail at 1083150188>: {'hostname': 'w4.usc.edu', 'faultData': <SOAPpy.Types.structType faultData at 1082408844>: {'exception': None, 'message': 'SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.'}}>
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 421, in _call_
return self.__r_call(*args, **kw)
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 443, in __r_call
self._hd, self._ma)
File "/usr/lib/python2.3/site-packages/SOAPpy/Client.py", line 357, in __call
raise p
SOAPpy.Types.faultType: <Fault soapenv:Server.userException: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.: <SOAPpy.Types.structType detail at 1083150188>: {'hostname': 'w4.usc.edu', 'faultData': <SOAPpy.Types.structType faultData at 1082408844>: {'exception': None, 'message': 'SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.'}}>
>>>
Am I misunderstanding how I should be passing these? Is there any easier way to add users to groups? (there's unfortunately no addtogroup function like Confluence's API