Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-27-2007, 04:01 AM
New Member
 
Posts: 3
Default LmcGetInfoRequest.java update

Hi all,

It seems that the GetInfoRequest's xml response has been changed but the LmcGetInfoRequest.java does not reflect the changes.

the parseResponseXML method must be updated as follows:
Code:
protected LmcSoapResponse parseResponseXML(Element responseXML)
			throws ServiceException {
		HashMap prefMap = new HashMap();
		LmcGetInfoResponse response = new LmcGetInfoResponse();

		// iterate over all the elements we received
		for (Iterator it = responseXML.elementIterator(); it.hasNext();) {
			Element e = (Element) it.next();

			// find out what element it is and go process that
			String elementType = e.getQName().getName();
			if (elementType.equals(AccountConstants.E_NAME)) {
				response.setAcctName(e.getText());
			} else if (elementType.equals(AccountConstants.E_LIFETIME)) {
				response.setLifetime(e.getText());
			} else if (elementType.equals(AccountConstants.E_PREFS)) {
				// add child preferences to our map
				for (Iterator prefsIt = e.elementIterator(); prefsIt.hasNext();) {
					Element pref = (Element) prefsIt.next();

					addPrefToMultiMap(prefMap, pref);
				}
			}
		}

		if (!prefMap.isEmpty())
			response.setPrefMap(prefMap);

		return response;
	}
The changes are from
Code:
            } else if (elementType.equals(AccountConstants.E_PREF)) {
                // add this preference to our map
                addPrefToMultiMap(prefMap, e);
            }
to
Code:
			} else if (elementType.equals(AccountConstants.E_PREFS)) {
				// add child preferences to our map
				for (Iterator prefsIt = e.elementIterator(); prefsIt.hasNext();) {
					Element pref = (Element) prefsIt.next();

					addPrefToMultiMap(prefMap, pref);
				}
			}
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.