/// <summary> /// Renders request XML for sending to storage. /// </summary> /// <param name="request">Request instance to render.</param> /// <returns>XML request as string.</returns> private string renderRequest(CPS_Request request) { Dictionary<string, string> envelopeFields = new Dictionary<string, string>(); envelopeFields["storage"] = this.p_storageName; envelopeFields["user"] = this.p_username; envelopeFields["password"] = this.p_password; envelopeFields["command"] = request.getCommand(); foreach (KeyValuePair<string, string> cep in this.p_customEnvelopeParams) envelopeFields[cep.Key] = cep.Value; if (request.getRequestId().Length > 0) envelopeFields["requestid"] = request.getRequestId(); if (this.p_applicationId.Length > 0) envelopeFields["application"] = this.p_applicationId; if (request.getRequestType().Length > 0) envelopeFields["type"] = request.getRequestType(); if (request.getClusterLabel().Length > 0) envelopeFields["label"] = request.getClusterLabel(); return request.getRequestXML(this.p_documentRootXpath, this.p_documentIdXpath, envelopeFields, this.p_docid_resetting); }