public static ApplicationClientDD parse(URL ddResource) throws JBossXBException, IOException { if (ddResource == null) return null; log.debug("found application-client.xml " + ddResource); ApplicationClientDDObjectFactory factory = new ApplicationClientDDObjectFactory(); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); ApplicationClientDD dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); return dd; }
public static ApplicationClientDD parse(URL ddResource) throws JBossXBException, IOException { if (ddResource == null) return null; log.debug("found application-client.xml " + ddResource); ApplicationClientDDObjectFactory factory = new ApplicationClientDDObjectFactory(); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); ApplicationClientDD dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); return dd; }
public static EjbJarDD parse(URL ddResource) throws JBossXBException, IOException { ObjectModelFactory factory = null; Unmarshaller unmarshaller = null; EjbJarDD dd = null; if (ddResource != null) { log.debug("found ejb-jar.xml " + ddResource); factory = new EjbJarDDObjectFactory(); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); } return dd; }
unmarshaller.setSchemaValidation(isUseSchemaValidation()); unmarshaller.setValidation(isUseValidation()); InputStream is = file.openStream();
public static EjbJarDD parse(URL ddResource) throws JBossXBException, IOException { ObjectModelFactory factory = null; Unmarshaller unmarshaller = null; EjbJarDD dd = null; if (ddResource != null) { log.debug("found ejb-jar.xml " + ddResource); factory = new EjbJarDDObjectFactory(); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); } return dd; }
public static ApplicationClientDD parse(URL ddResource, ApplicationClientDD dd) throws JBossXBException, IOException { // TODO: how to properly fix this if (dd == null) dd = new ApplicationClientDD(); if (ddResource == null) return dd; log.debug("found jboss-client.xml " + ddResource); JBossClientDDObjectFactory factory = new JBossClientDDObjectFactory(dd); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); return dd; }
public static ApplicationClientDD parse(URL ddResource, ApplicationClientDD dd) throws JBossXBException, IOException { // TODO: how to properly fix this if (dd == null) dd = new ApplicationClientDD(); if (ddResource == null) return dd; log.debug("found jboss-client.xml " + ddResource); JBossClientDDObjectFactory factory = new JBossClientDDObjectFactory(dd); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); return dd; }
public static EjbJarDD parse(URL ddResource, EjbJarDD dd) throws JBossXBException, IOException { ObjectModelFactory factory = null; Unmarshaller unmarshaller = null; if (ddResource != null) { log.debug("found jboss.xml " + ddResource); if (dd == null) dd = new EjbJarDD(); factory = new JBossDDObjectFactory(dd); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); } return dd; }
public static EjbJarDD parse(URL ddResource, EjbJarDD dd) throws JBossXBException, IOException { ObjectModelFactory factory = null; Unmarshaller unmarshaller = null; if (ddResource != null) { log.debug("found jboss.xml " + ddResource); if (dd == null) dd = new EjbJarDD(); factory = new JBossDDObjectFactory(dd); UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance(); unmarshaller = unmarshallerFactory.newUnmarshaller(); unmarshaller.setEntityResolver(new JBossEntityResolver()); unmarshaller.setNamespaceAware(true); unmarshaller.setSchemaValidation(true); unmarshaller.setValidation(true); dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null); } return dd; }
unmarshaller.setSchemaValidation(false); unmarshaller.setValidation(false);
@Override protected T parse(VFSDeploymentUnit unit, VirtualFile file, T root) throws Exception { if (file == null) throw new IllegalArgumentException("Null file"); Unmarshaller unmarshaller = factory.newUnmarshaller(); unmarshaller.setSchemaValidation(isUseSchemaValidation()); unmarshaller.setValidation(isUseValidation()); Object parsed = null; try { ObjectModelFactory factory = getObjectModelFactory(root); URL url = file.toURL(); parsed = unmarshaller.unmarshal(url.toString(), factory, root); } catch (Throwable t) { DeploymentException.rethrowAsDeploymentException("Error parsing meta data " + file.getPathName(), t); } if (parsed == null) throw new DeploymentException("The xml " + file.getPathName() + " is not well formed!"); return getOutput().cast(parsed); }
unmarshaller.setSchemaValidation(false); unmarshaller.setValidation(false);
u.setSchemaValidation(false); u.setValidation(false); u.setEntityResolver(new JBossEntityResolver());
u.setSchemaValidation(false); u.setValidation(false); u.setEntityResolver(new JBossEntityResolver());