SOAP items
There are some bugs concerning SOAP services and WSDL :
Typos and type problems:
- a getCookieResponse returns an element 'error', but WSDL mentions 'errorCode'. I think we should keep 'errorCode', since it is a number.
- isAuthorizedURIResponse result's type is 'boolean' in WSDL, but 'int' in real life
Features:
- assume cookieName is 'lemon', a getCookieResponse return an element
<lemonupdate xsi:type="xsd:int" xmlns:xsi="(...)">[unix timestamp]</lemonupdate>
There are implementation bugs : type of this element is 'int' in response, but 'string' in WSDL ; name is $cookieName."update" in response, but 'lemonldapupdate' in WSDL.
Besides, I don't see the point, and it is not documented. Is it really useful ? Maybe we could remove it.
-
in case of auth failure, getCookieResponse returns an error code and 'cookie' elements with value = 0. There are two bugs: type of this element is 'int' in response, but 'string' in WSDL ; and in case there are several cookies, it tries to get the different names (eg 'lemon', 'lemonhttp') by split $self->{cookieName}, but $self->{cookieName} contains only one name (that is, 'lemon'). Any way, I don't really see the point of sending void cookies (that is with value = '0'), since the client will probably not consider them. The only reason I see to send these cookies, is it is mandatory in WSDL ; but it is easy to make it optional, with wsdl attribute 'minOccurs="0"'.
-
'groups' element is sent in a getAttributeResponse, but it is missing in WSDL, as same as loginHistory _timezone, _auth, _password and some others. Actually, it is quite hard to have a complete list of available data sessions (because of different Auth* modules, UserDB* modules and so). Hence, the best way to be sure that getAttributeResponse matches WSDL is to call exportedAttr in both generating WSDL and running getAttributeResponse. If not defined, exportedAttr must be set as $portal->{exportedVar} keys + $portal->{macros} keys + 'groups' + '_utime' + 'startTime' + 'ipAddr' + 'xForwardedForAddr' + 'authenticationLevel'. Do you see any other interesting data ?