Package org.jboss.xb.binding

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


      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = null;
      try
      {
         deployment = (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
      }
      catch (JBossXBException e)
      {
         throw new RuntimeException("Failed to parse xml " + url, e);
      }
View Full Code Here


               //
               PortletApplicationModelFactory factory = new PortletApplicationModelFactory();

               // Unmarshal
               PortletApplication10MetaData portletApplicationMD = (PortletApplication10MetaData)unmarshaller.unmarshal(in, new ValueTrimmingFilter(factory), null);

               //
               return portletApplicationMD;
            }
            finally
View Full Code Here

   {
      if(in == null)
         throw new IllegalArgumentException("InputStream may not be null.");
     
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      return (ServiceReferenceHandlerChainsMetaData) unmarshaller.unmarshal(in, resolver);
   }
  
   /**
    * Returns the InputStream of a specified file.
    *
 
View Full Code Here

         unmarshaller.setEntityResolver(new JBossEntityResolver());
         unmarshaller.setNamespaceAware(true);
         unmarshaller.setSchemaValidation(true);
         unmarshaller.setValidation(true);

         dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
      }

      return dd;
   }
View Full Code Here

         try
         {
            InputStream is = wsddUrl.openStream();
            Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
            ObjectModelFactory factory = new WebservicesFactory(wsddUrl);
            webservices = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
            is.close();
         }
         catch (Exception e)
         {
            throw new WebServiceException("Failed to unmarshall webservices.xml:" + e.getMessage());
View Full Code Here

            String namespaceURI = root.getNamespaceURI();
            if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
            {
               Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
               ObjectModelFactory factory = new WebservicesFactory(wsURL);
               wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
               unit.addAttachment(WebservicesMetaData.class, wsMetaData);
            }
         }
         catch (Exception ex)
         {
View Full Code Here

      InputStreamReader xmlReader = loadURL(loginConfigURL);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance()
            .newUnmarshaller();
      unmarshaller.mapFactoryToNamespace(uomf, "http://www.jboss.org/j2ee/schemas/XMLLoginModule");
      Object root = null;
      PolicyConfig config = (PolicyConfig) unmarshaller.unmarshal(xmlReader, lcomf, root);
      configNames.addAll(config.getConfigNames());
      appConfigs.copy(config);
   }

   private InputStreamReader loadURL(URL configURL)
View Full Code Here

      unmarshaller.setSchemaValidation(true);
      URL webXml = getClass().getResource(name);
      if (webXml == null)
         throw new IllegalStateException("Unable to find: "+name);
      SchemaBinding schema = JBossXBBuilder.build(clazz);
      WebMetaData confWebMD = (WebMetaData) unmarshaller.unmarshal(webXml.toString(), schema);
      JBoss50WebMetaData sharedMetaData = new JBoss50WebMetaData();
      sharedMetaData.merge(null, confWebMD);

      return sharedMetaData;
   }
View Full Code Here

      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      unmarshaller.setValidation(false);
      URL url = type.getResource(resource);
      if (url == null)
         throw new IllegalArgumentException("Failed to find resource " + resource);
      return type.cast(unmarshaller.unmarshal(url.toString(), schemaBindingResolver));
   }

}
View Full Code Here

      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      unmarshaller.setSchemaValidation(validateSchema);
      log.debug("Initialized parsing in " + (System.currentTimeMillis() - start) + "ms");
      try
      {
         Object result = unmarshaller.unmarshal(url, resolver);
         log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");
         return result;
      }
      catch (Exception 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.