Element searchResp = transp.invokeWithoutSession(searchElt);
Element searchResp  = null; try { if (ZimbraLog.index.isInfoEnabled()) ZimbraLog.index.info("Fetching remote search results from "+transp.toString());  searchResp = transp.invokeWithoutSession(searchElt); } catch (SoapFaultException ex) { ZimbraLog.index.warn("Unable to ("+ex.toString()+") fetch search results from remote server "+transp.toString()); mAtEndOfList = true; mBufferEndOffset = mIterOffset; return false; } catch (java.net.ConnectException ex) { ZimbraLog.index.warn("Unable to ("+ex.toString()+") fetch search results from remote server "+transp.toString()); mAtEndOfList = true; mBufferEndOffset = mIterOffset; return false; }
    private boolean bufferNextHits() throws ServiceException     {        if (mAtEndOfList) {            return false;        }        mBufferStartOffset = mIterOffset;        int chunkSizeToUse = mSearchParams.getLimit() * 2;        if (chunkSizeToUse < MIN_BUFFER_CHUNK_SIZE)            chunkSizeToUse = MIN_BUFFER_CHUNK_SIZE;        if (chunkSizeToUse > 500)            chunkSizeToUse = 500;        mBufferEndOffset = mBufferStartOffset + chunkSizeToUse;        mHitBuffer = new ArrayList<ProxiedHit>(chunkSizeToUse);        try {            SoapTransport transp = getTransport();            Element searchElt;            if (isMultipleMailboxes) {                searchElt = Element.create(mResponseProto, AdminService.SEARCH_MULTIPLE_MAILBOXES_REQUEST);            } else {//              searchElt = new Element.XMLElement(MailService.SEARCH_REQUEST);                searchElt = Element.create(mResponseProto, MailService.SEARCH_REQUEST);            }            searchElt.addAttribute(MailService.A_SEARCH_TYPES, mSearchParams.getTypesStr());            searchElt.addAttribute(MailService.A_SORTBY, mSearchParams.getSortByStr());            searchElt.addAttribute(MailService.A_QUERY_OFFSET, mBufferStartOffset);            searchElt.addAttribute(MailService.A_QUERY_LIMIT, chunkSizeToUse);            searchElt.addAttribute(MailService.E_QUERY, mSearchParams.getQueryStr(), Element.DISP_CONTENT);            if (isMultipleMailboxes) {                if (isAllMailboxes) {                    Element mbxElt = searchElt.addElement(MailService.E_MAILBOX);                    ParseMailboxID id = ParseMailboxID.serverAll(mServer);                    mbxElt.addAttribute(MailService.A_ID, id.getString());                 } else {                    for (Iterator iter = mMailboxes.iterator(); iter.hasNext();) {                        ParseMailboxID id = (ParseMailboxID)iter.next();                        //                    assert(!id.isLocal());                        //                    assert(id.getServer().equals(serverID));                        searchElt.addElement(MailService.E_MAILBOX).addAttribute(MailService.A_ID, id.getString());                    }                }            }            // call the remote server now!            transp.setSoapProtocol(searchElt instanceof Element.JavaScriptElement ? SoapProtocol.SoapJS : SoapProtocol.Soap12);            Element searchResp = transp.invokeWithoutSession(searchElt);            int hitOffset = (int) searchResp.getAttributeLong(MailService.A_QUERY_OFFSET);            boolean hasMore = searchResp.getAttributeBool(MailService.A_QUERY_MORE);            assert(mBufferStartOffset == hitOffset);            // put these hits into our buffer!            int bufferIdx = 0;            int stop = mBufferEndOffset - mBufferStartOffset;            for (Iterator iter = searchResp.elementIterator(); iter.hasNext() && bufferIdx < stop;) {                Element e = (Element)iter.next();                mHitBuffer.add(bufferIdx++, new ProxiedHit(this, e));            }            //            // are we at the end of the line here?            //            if ((bufferIdx < stop) || (!hasMore)) {                // update the buffer-end-pointer                 mBufferEndOffset = mBufferStartOffset + bufferIdx;                if (hasMore) {                    assert(!hasMore); // if bufferIdx < stop then !hasMore should be set...server bug!                }                this.mAtEndOfList = true;            } else {                assert(mBufferEndOffset == mBufferStartOffset+bufferIdx);            }            assert(mBufferStartOffset <= mIterOffset);            // OK, we were successful if we managed to buffer the current hit            return (mBufferEndOffset > mIterOffset);        } catch (IOException e) {            throw ServiceException.FAILURE("IOException ", e);        }//        catch (ServiceException e) {//            if (!isMultipleMailboxes) {//                //throw ServiceException.FAILURE("ServiceException ", e);//                e.setArgument(ServiceException.PROXIED_FROM_ACCT, mTargetAcctId);//            }//            throw e;//      }    }