@POST @ApiIgnore // until documented
  @Consumes({MediaType.TEXT_XML})
  @Produces(MediaType.TEXT_PLAIN)
  public Response createVersionByXml(String body, @Context HttpHeaders headers,
      @Context UriInfo ui) throws Exception {

    String encoded = Base64.encodeBase64String(body.getBytes("UTF-8"));

    JsonObject obj = new JsonObject();
    obj.addProperty(VersionDefinitionResourceProvider.VERSION_DEF_BASE64_PROPERTY, encoded);

    JsonObject payload = new JsonObject();
    payload.add(VersionDefinitionResourceProvider.VERSION_DEF, obj);

    return handleRequest(headers, payload.toString(), ui, Request.Type.POST,
        createResource(null));
  }
Creates a version by directly POSTing the XML body.  Unfortunately the request processor
uses JSON, so an appropriate JSON structure must be made to get to the ResourceProvider.
@param body     the XML
@param headers  the headers
@param ui       the URI info
ambari-server/src/main/java/org/apache/ambari/server/api/services/VersionDefinitionService.java