Java Code Examples for com.sun.tools.xjc.api.SchemaCompiler#parseSchema()
The following examples show how to use
com.sun.tools.xjc.api.SchemaCompiler#parseSchema() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JAXBDataBinding.java From cxf with Apache License 2.0 | 5 votes |
private void parseSchemas(SchemaCompiler schemaCompiler) { for (String ns : context.getNamespacePackageMap().keySet()) { File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns)); try { InputSource ins = new InputSource(file.toURI().toString()); schemaCompiler.parseSchema(ins); } finally { FileUtils.delete(file); } } if (context.getPackageName() != null) { schemaCompiler.setDefaultPackageName(context.getPackageName()); } }
Example 2
Source File: JAXBDataBinding.java From cxf with Apache License 2.0 | 5 votes |
private void addSchemasForServiceInfos(OASISCatalogManager catalog, List<ServiceInfo> serviceList, Options opts, SchemaCompiler schemaCompiler, SchemaCollection schemaCollection) { Set<String> ids = new HashSet<>(); for (ServiceInfo si : serviceList) { for (SchemaInfo sci : si.getSchemas()) { String key = sci.getSystemId(); if (ids.contains(key)) { continue; } ids.add(key); Element ele = sci.getElement(); if (context.fullValidateWSDL()) { validateSchema(ele, sci.getSystemId(), catalog, schemaCollection); } ele = removeImportElement(ele, key, catalog); InputSource is = new InputSource((InputStream)null); //key = key.replaceFirst("#types[0-9]+$", ""); is.setSystemId(key); is.setPublicId(key); opts.addGrammar(is); try { XMLStreamReader reader = createNoCDATAReader(StaxUtils.createXMLStreamReader(ele, key)); schemaCompiler.parseSchema(key, reader); } catch (XMLStreamException e) { throw new RuntimeException(e); } } } }
Example 3
Source File: CxfWSDLImporter.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, org.w3c.dom.Element rootTypes) { Schema schema = (Schema) types.getExtensibilityElements().get(0); compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes); S2JJAXBModel intermediateModel = compiler.bind(); return intermediateModel; }
Example 4
Source File: WSDLImporter.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, Element rootTypes) { Schema schema = (Schema) types.getExtensibilityElements().get(0); compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes); S2JJAXBModel intermediateModel = compiler.bind(); return intermediateModel; }
Example 5
Source File: CxfWSDLImporter.java From flowable-engine with Apache License 2.0 | 4 votes |
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, org.w3c.dom.Element rootTypes) { Schema schema = (Schema) types.getExtensibilityElements().get(0); compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes); S2JJAXBModel intermediateModel = compiler.bind(); return intermediateModel; }
Example 6
Source File: WSDLImporter.java From flowable-engine with Apache License 2.0 | 4 votes |
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, Element rootTypes) { Schema schema = (Schema) types.getExtensibilityElements().get(0); compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes); S2JJAXBModel intermediateModel = compiler.bind(); return intermediateModel; }