src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/SchemaCompilerImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 51,60 **** --- 51,61 ---- import com.sun.tools.internal.xjc.reader.internalizer.DOMForest; import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet; import com.sun.tools.internal.xjc.reader.xmlschema.parser.LSInputSAXWrapper; import com.sun.tools.internal.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic; import com.sun.xml.internal.bind.unmarshaller.DOMScanner; + import com.sun.xml.internal.bind.v2.util.XmlFactory; import com.sun.xml.internal.xsom.XSSchemaSet; import org.w3c.dom.Element; import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSResourceResolver;
*** 167,177 **** // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd", // which java.net.URI can't process. So for now, let's fail only if both of them fail. // eventually we need a proper URI class that works for us. try { new URL(systemId); ! } catch( MalformedURLException _ ) { try { new URI(systemId); } catch (URISyntaxException e ) { throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e); } --- 168,178 ---- // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd", // which java.net.URI can't process. So for now, let's fail only if both of them fail. // eventually we need a proper URI class that works for us. try { new URL(systemId); ! } catch( MalformedURLException mue) { try { new URI(systemId); } catch (URISyntaxException e ) { throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e); }
*** 194,204 **** public void setClassNameAllocator(ClassNameAllocator allocator) { opts.classNameAllocator = allocator; } public void resetSchema() { ! forest = new DOMForest(new XMLSchemaInternalizationLogic()); forest.setErrorHandler(this); forest.setEntityResolver(opts.entityResolver); } public JAXBModelImpl bind() { --- 195,205 ---- public void setClassNameAllocator(ClassNameAllocator allocator) { opts.classNameAllocator = allocator; } public void resetSchema() { ! forest = new DOMForest(new XMLSchemaInternalizationLogic(), opts); forest.setErrorHandler(this); forest.setEntityResolver(opts.entityResolver); } public JAXBModelImpl bind() {
*** 214,224 **** // internalization SCDBasedBindingSet scdBasedBindingSet = forest.transform(opts.isExtensionMode()); if (!NO_CORRECTNESS_CHECK) { // correctness check ! SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); // fix for https://jaxb.dev.java.net/issues/show_bug.cgi?id=795 // taken from SchemaConstraintChecker, TODO XXX FIXME UGLY if (opts.entityResolver != null) { sf.setResourceResolver(new LSResourceResolver() { --- 215,225 ---- // internalization SCDBasedBindingSet scdBasedBindingSet = forest.transform(opts.isExtensionMode()); if (!NO_CORRECTNESS_CHECK) { // correctness check ! SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, opts.disableXmlSecurity); // fix for https://jaxb.dev.java.net/issues/show_bug.cgi?id=795 // taken from SchemaConstraintChecker, TODO XXX FIXME UGLY if (opts.entityResolver != null) { sf.setResourceResolver(new LSResourceResolver() {