Package org.platformlayer.xml

Examples of org.platformlayer.xml.JaxbHelper.marshal()


            if (debug != null) {
              debug.println("Data: [XML Content]");
            }

            JaxbHelper jaxbHelper = JaxbHelper.get(sendData.getClass());
            String xml = jaxbHelper.marshal(sendData, false);
            httpRequest.setRequestContent(new Utf8StringByteSource(xml));
            // jaxbHelper.marshal(sendData, false, getOutputStream());
            break;
          case JSON:
            if (debug != null) {
View Full Code Here


    String path = getBackupId() + ".backup.xml";

    JaxbHelper jaxb = JaxbHelper.get(BackupData.class);
    String xml;
    try {
      xml = jaxb.marshal(data, true);
    } catch (JAXBException e) {
      throw new OpsException("Error serializing metadata", e);
    }
    byte[] data = Utf8.getBytes(xml);
View Full Code Here

      }
    } else {
      try {
        JaxbHelper jaxb = JaxbHelper.get(response.getClass());
        boolean formatted = false;
        jaxb.marshal(response, formatted, baos);
      } catch (Exception e) {
        log.error("Error serializing value", e);
        httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        return;
      }
View Full Code Here

      CurlRequest request = new CurlRequest(resourceUrl);
      if (body != null) {
        JaxbHelper jaxb = JaxbHelper.get(body.getClass());
        String xml;
        try {
          xml = jaxb.marshal(body, false);
        } catch (JAXBException e) {
          throw new OpenstackException("Error serializing request body", e);
        }
        request.body = xml;
      }
View Full Code Here

      }

      JaxbHelper jaxbHelper = JaxbHelper.get(SettingCollection.class);
      String xml;
      try {
        xml = jaxbHelper.marshal(settings, false);
      } catch (JAXBException e) {
        throw new IllegalArgumentException("Error converting JSON to XML", e);
      }
      authorization.data = xml;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.