SchemaCompiler compiler = XJC.createSchemaCompiler(); compiler.setErrorListener(errorListener); compiler.parseSchema(new InputSource(url.toExternalForm()));
J2SJAXBModel model = XJC.createJavaCompiler().bind( classesToBeIncluded,Collections.<QName,Reference>emptyMap(),null,env);
protected String getJavaPackage() { String jaxwsPackage = null; JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); if (jaxwsCustomization != null && jaxwsCustomization.getJaxwsPackage() != null) { jaxwsPackage = jaxwsCustomization.getJaxwsPackage().getName(); } if (jaxwsPackage != null) { return jaxwsPackage; } String wsdlUri = document.getDefinitions().getTargetNamespaceURI(); return XJC.getDefaultPackageName(wsdlUri); }
protected String getJavaPackage() { String jaxwsPackage = null; JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); if (jaxwsCustomization != null && jaxwsCustomization.getJaxwsPackage() != null) { jaxwsPackage = jaxwsCustomization.getJaxwsPackage().getName(); } if (jaxwsPackage != null) { return jaxwsPackage; } String wsdlUri = document.getDefinitions().getTargetNamespaceURI(); return XJC.getDefaultPackageName(wsdlUri); }
public SchemaMetadata(DynamicClassLoader dynamicClassLoader, Map<String, Object> properties, Node node, EntityResolver resolver) throws JAXBException { this(dynamicClassLoader, properties); Element element; if (node.getNodeType() == Node.DOCUMENT_NODE) { element = ((Document) node).getDocumentElement(); } else if (node.getNodeType() == Node.ELEMENT_NODE) { element = (Element) node; } else { throw new JAXBException(org.eclipse.persistence.exceptions.JAXBException.cannotInitializeFromNode()); } // Use XJC API to parse the schema and generate its JCodeModel schemaCompiler = XJC.createSchemaCompiler(); schemaCompiler.setEntityResolver(resolver); schemaCompiler.setErrorListener(new XJCErrorListener()); schemaCompiler.parseSchema(DEFAULT_SYSTEM_ID, element); }
protected String getJavaPackage() { String jaxwsPackage = null; JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); if (jaxwsCustomization != null && jaxwsCustomization.getJaxwsPackage() != null) { jaxwsPackage = jaxwsCustomization.getJaxwsPackage().getName(); } if (jaxwsPackage != null) { return jaxwsPackage; } String wsdlUri = document.getDefinitions().getTargetNamespaceURI(); return XJC.getDefaultPackageName(wsdlUri); }
J2SJAXBModel model = XJC.createJavaCompiler().bind( classesToBeIncluded,Collections.<QName,Reference>emptyMap(),null,env);
SchemaCompiler compiler = XJC.createSchemaCompiler(); compiler.setErrorListener(errorListener); compiler.parseSchema(new InputSource(url.toExternalForm()));
protected String getJavaPackage() { String jaxwsPackage = null; JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); if (jaxwsCustomization != null && jaxwsCustomization.getJaxwsPackage() != null) { jaxwsPackage = jaxwsCustomization.getJaxwsPackage().getName(); } if (jaxwsPackage != null) { return jaxwsPackage; } String wsdlUri = document.getDefinitions().getTargetNamespaceURI(); return XJC.getDefaultPackageName(wsdlUri); }
J2SJAXBModel model = XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env); if(model==null) return; // error
schemaCompiler = XJC.createSchemaCompiler(); schemaCompiler.setErrorListener(er);
J2SJAXBModel model = XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env); if(model==null) return; // error
protected JCodeModel generateXsdDataBinding(File schemaFile, File outputDir, GenTemplateTrace xsdTraces) throws GenerationException { SchemaCompiler schemaCompliler = XJC.createSchemaCompiler();
public void initialize(ToolContext c) throws ToolException { this.context = c; checkEncoding(c); SchemaCompiler schemaCompiler = XJC.createSchemaCompiler(); Bus bus = context.get(Bus.class); OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
public void initialize(ToolContext c) throws ToolException { this.context = c; checkEncoding(c); SchemaCompiler schemaCompiler = XJC.createSchemaCompiler(); Bus bus = context.get(Bus.class); OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
public SchemaMetadata(DynamicClassLoader dynamicClassLoader, Map<String, Object> properties, Source metadataSource, EntityResolver resolver) throws JAXBException { this(dynamicClassLoader, properties); try { InputSource schemaInputSource = createInputSourceFromSource(metadataSource); if (schemaInputSource.getSystemId() == null) { schemaInputSource.setSystemId(DEFAULT_SYSTEM_ID); } // Use XJC API to parse the schema and generate its JCodeModel schemaCompiler = XJC.createSchemaCompiler(); schemaCompiler.setEntityResolver(resolver); schemaCompiler.setErrorListener(new XJCErrorListener()); if (externalBindings != null) { for (InputSource xjbSource : externalBindings) { schemaCompiler.parseSchema(xjbSource); } } schemaCompiler.parseSchema(schemaInputSource); } catch (XMLPlatformException xpe) { // This will occur when trying to refreshMetadata from a closed stream (non-XML Node metadata) if (xpe.getCause() instanceof TransformerException) { TransformerException te = (TransformerException) xpe.getCause(); if (te.getCause() instanceof IOException) { throw org.eclipse.persistence.exceptions.JAXBException.cannotRefreshMetadata(); } } } catch (Exception e) { throw new JAXBException(org.eclipse.persistence.exceptions.JAXBException.errorCreatingDynamicJAXBContext(e)); } }
schemaIter.hasNext();) { SchemaCompiler sc = XJC.createSchemaCompiler(); if (bindingFileName != null){ if (bindingFileName.endsWith(".jar")) {
SchemaCompiler sc = XJC.createSchemaCompiler(); if (bindingFileName != null){ if (bindingFileName.endsWith(".jar")) {
@SuppressWarnings("unchecked") private void buildJaxbModel() { SchemaCompiler schemaCompiler = XJC.createSchemaCompiler(); ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classColletor); schemaCompilerGenCode = XJC.createSchemaCompiler(); schemaCompilerGenCode.setClassNameAllocator(allocator); schemaCompilerGenCode.setErrorListener(this);