public RegistrationData GetRegistrationDetail(String registrationId) throws Exception {
   ServiceRequest sr = new ServiceRequest(configuration);
   sr.getParameters().add("regid", registrationId);
   Document xmlDoc = sr.callService("rustici.registration.getRegistrationDetail");
   return RegistrationData.parseFromXmlElement(
       XmlUtils.getFirstChildByTagName(xmlDoc.getDocumentElement(), "registration"));
 }
  /// <summary>
  /// Returns the current state of the registration, including completion
  /// and satisfaction type data.  Amount of detail depends on format parameter.
  /// </summary>
  /// <param name="registrationId">Unique Identifier for the registration</param>
  /// <param name="resultsFormat">Degree of detail to return</param>
  /// <returns>Registration data in XML Format</returns>
  public String GetRegistrationResult(
      String registrationId, RegistrationResultsFormat resultsFormat, DataFormat dataFormat)
      throws Exception {
    ServiceRequest request = new ServiceRequest(configuration);
    request.getParameters().add("regid", registrationId);
    request.getParameters().add("resultsformat", resultsFormat.toString().toLowerCase());
    if (dataFormat == DataFormat.JSON) request.getParameters().add("format", "json");

    if (dataFormat == DataFormat.XML) {
      Document response = request.callService("rustici.registration.getRegistrationResult");
      // Return the subset of the xml starting with the top <summary>
      Node reportElem = response.getElementsByTagName("registrationreport").item(0);
      return XmlUtils.getXmlString(reportElem);
    } else {
      return request.getStringFromService("rustici.registration.getRegistrationResult");
    }
  }