Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.ObjectModelFactory


   public void testObjectModelFactory() throws Exception
   {
      String url = findXML("IgnorableWhitespaceContent.xml");
     
      ObjectModelFactory omf = new OMF();
     
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Object o = unmarshaller.unmarshal(url, omf, null);
     
      assertNotNull(o);
View Full Code Here


   private static final Logger log = Logger.getLogger(EjbJarDDObjectFactory.class);

   public static EjbJarDD parse(URL ddResource) throws JBossXBException, IOException
   {
      ObjectModelFactory factory = null;
      Unmarshaller unmarshaller = null;
      EjbJarDD dd = null;

      if (ddResource != null)
      {
View Full Code Here

         URL wsddUrl = wsdd.toURL();
         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)
         {
View Full Code Here

            Element root = DOMUtils.parse(wsURL.openStream());
            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

      // create unmarshaller
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();

      // 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
View Full Code Here

   public void start()
      throws Exception
   {
      log.debug("Reading resource: '" + notificationMapResName + "'");
     
      ObjectModelFactory omf = new NotificationBinding();
      InputStream is = null;
      try
      {
         // locate notifications.xml
         is = this.getClass().getResourceAsStream(notificationMapResName);
View Full Code Here

   */
  private void initializeBindings() throws Exception
   {
      log.debug("Reading resource: '" + resourceName + "'");
     
      ObjectModelFactory omf = new AttributeMappingsBinding();
      InputStream is = null;
      AttributeMappings mappings = null;
      try
      {
         // locate resource
View Full Code Here

            Element root = DOMUtils.parse(wsURL.openStream());
            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

   /**
    * Test if we can unmarshal a ra.xml without DTD
    */
   public void testRARwithoutDTD() throws Exception
   {
      ObjectModelFactory factory = new ResourceAdapterObjectModelFactory();
      Object metaData = unmarshaller.unmarshal(systemId, factory, null);
      assertNotNull("Null meta data", metaData);
   }
View Full Code Here

   /**
    * Test if we can unmarshal a ra.xml with DTD
    */
   public void testRARwithDTD() throws Exception
   {
      ObjectModelFactory factory = new ResourceAdapterObjectModelFactory();
      Object metaData = unmarshaller.unmarshal(systemId, factory, null);
      assertNotNull("Null meta data", metaData);
   }
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.ObjectModelFactory

Copyright © 2018 www.massapicom. 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.