Examples of unmarshal()


Examples of org.hudsonci.utils.marshal.XStreamMarshaller.unmarshal()

        StringWriter buff = new StringWriter();
        marshaller.marshal(doc1, buff);
        System.out.println("XML:\n" + buff);

        Document<Record> doc2 = (Document<Record>) marshaller.unmarshal(new StringReader(buff.toString()));
        assertNotNull(doc2);
        assertNotNull(doc2.records);
        assertEquals(1, doc2.records.size());

        Record rec2 = doc2.records.get(0);
View Full Code Here

Examples of org.jboss.seam.remoting.wrapper.BaseWrapper.unmarshal()

      wrapper.setValue(value);

      assert value.equals(wrapper.getValue());

      // For code-coverage completeness
      wrapper.unmarshal();
      wrapper.setCallContext(null);
      try
      {
         wrapper.serialize(null);
      }
View Full Code Here

Examples of org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal()

      unmarshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      String xml = "<ns1:arrayOfCalendar xmlns:ns1='" + TARGET_NAMESPACE + "'>" + " <value>1968-06-16T14:23:55.000Z</value>"
            + " <value>1969-07-17T15:24:56.000Z</value>" + " <value>1970-08-18T16:25:57.000Z</value>" + "</ns1:arrayOfCalendar>";

      objArr = (Calendar[]) unmarshaller.unmarshal(new ByteArrayInputStream(xml.getBytes()));

      assertNotNull("Resulting obj array cannot be null", objArr);
      assertEquals("Unexpected array length", 3, objArr.length);

      Calendar cal1 = new GregorianCalendar(1968, 5, 16, 14, 23, 55);
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(EjbJar21MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (EjbJar21MetaData) unmarshaller.unmarshal(ejbJarXml, schema);
   }
  
   public void testEJBPermissions() throws Exception
   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(Web24MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (WebMetaData) unmarshaller.unmarshal(webxml, schema);
   }
  
   public void testWebPermissions() throws Exception
   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

   @Override
   protected RepositoryContentMetadata loadMetadata(File metadataStore) throws Exception
   {
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      return (RepositoryContentMetadata) unmarshaller.unmarshal(metadataStore.toURL().openStream(), resolver);
   }

   @Override
   protected void saveMetadata(File metadataStore, RepositoryContentMetadata metadata) throws Exception
   {
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

      // create an instance of ObjectModelFactory
      ObjectModelFactory factory = new ConfigInfoBinding();

      // let the object model factory to create an instance of Book and populate it with data from XML
      ConfigInfo ci = (ConfigInfo)unmarshaller.unmarshal(is, factory, null);

      // close the XML stream
      is.close();

      return ci;
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

      u.setValidation(false);
      u.setEntityResolver(new JBossEntityResolver());

      InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("test/metadata/server.xml");

      ServerMetaData m = ServerMetaData.class.cast(u.unmarshal(is, schema));
      assertNotNull(m);
      assertNotNull(m.getListeners());
      assertNotNull(m.getServices());
     
      assertEquals(2, m.getListeners().size());
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

         if (jbossAppXml != null)
         {
            InputStream in = jbossAppXml.openStream();
            try
            {
               appMetaData = (JBossAppMetaData) unmarshaller.unmarshal(in, resolver);
            }
            finally
            {
               in.close();
            }
View Full Code Here

Examples of org.jboss.xb.binding.Unmarshaller.unmarshal()

            if (is == null)
               is = getClass().getClassLoader().getResourceAsStream(resourceName);

            if (is != null)
               contextMetaData = ContextMetaData.class.cast(u.unmarshal(is, schema));
         }
         finally
         {
            if (is != null)
            {
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.