Package org.platformlayer.xml

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


        } else {
          throw new OpsException("Incorrect element type: " + xmlElementName + " vs " + nodeName);
        }
      }

      T object = jaxbHelper.unmarshal(element, itemClass);

      if (!(object.getClass().isAssignableFrom(itemClass))) {
        System.out.println("XML = " + ((UntypedItemXml) untypedItem).serialize());
      }
View Full Code Here


  }

  private Action deserializeAction(String xml) throws OpsException {
    try {
      JaxbHelper jaxbHelper = JaxbHelper.get(Action.class);
      return (Action) jaxbHelper.unmarshal(xml);
    } catch (JAXBException e) {
      throw new OpsException("Error deserializing action", e);
    }
  }
View Full Code Here

      if (element == null) {
        links = new Links();
      } else {
        JaxbHelper helper = JaxbHelper.get(Links.class);
        try {
          links = (Links) helper.unmarshal(element);
        } catch (JAXBException e) {
          throw new IllegalStateException("Error parsing tags data", e);
        }
      }
    }
View Full Code Here

      } else {
        String xml = result.getBody();

        JaxbHelper jaxb = JaxbHelper.get(c);
        try {
          return (T) jaxb.unmarshal(xml);
        } catch (JAXBException e) {
          throw new OpenstackException("Error deserializing response", e);
        }
      }
    }
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.