src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2010, 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
*** 24,42 **** */ package com.sun.tools.internal.ws.wsdl.parser; import com.sun.istack.internal.NotNull; ! import com.sun.tools.internal.ws.resources.WscompileMessages; ! import com.sun.tools.internal.ws.wscompile.AbortException; ! import com.sun.tools.internal.ws.wscompile.DefaultAuthenticator; import com.sun.tools.internal.ws.wscompile.ErrorReceiver; import com.sun.tools.internal.ws.wscompile.WsimportOptions; import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants; import com.sun.tools.internal.xjc.reader.internalizer.LocatorTable; import com.sun.xml.internal.bind.marshaller.DataWriter; - import com.sun.xml.internal.ws.util.JAXWSUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.ContentHandler; import org.xml.sax.*; --- 24,39 ---- */ package com.sun.tools.internal.ws.wsdl.parser; import com.sun.istack.internal.NotNull; ! import com.sun.tools.internal.ws.util.xml.XmlUtil; import com.sun.tools.internal.ws.wscompile.ErrorReceiver; import com.sun.tools.internal.ws.wscompile.WsimportOptions; import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants; import com.sun.tools.internal.xjc.reader.internalizer.LocatorTable; import com.sun.xml.internal.bind.marshaller.DataWriter; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.ContentHandler; import org.xml.sax.*;
*** 49,61 **** import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXResult; - import javax.net.ssl.HttpsURLConnection; - import javax.net.ssl.HostnameVerifier; - import javax.net.ssl.SSLSession; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.*; --- 46,55 ----
*** 117,131 **** this.options = options; this.entityResolver = entityResolver; this.errorReceiver = errReceiver; this.logic = logic; try { ! DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); this.documentBuilder = dbf.newDocumentBuilder(); ! this.parserFactory = SAXParserFactory.newInstance(); this.parserFactory.setNamespaceAware(true); } catch (ParserConfigurationException e) { throw new AssertionError(e); } } --- 111,127 ---- this.options = options; this.entityResolver = entityResolver; this.errorReceiver = errReceiver; this.logic = logic; try { ! // secure xml processing can be switched off if input requires it ! boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; ! DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); dbf.setNamespaceAware(true); this.documentBuilder = dbf.newDocumentBuilder(); ! this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled); this.parserFactory.setNamespaceAware(true); } catch (ParserConfigurationException e) { throw new AssertionError(e); } }
*** 366,376 **** * This is a debug method. As such, error handling is sloppy. */ public void dump(OutputStream out) throws IOException { try { // create identity transformer ! Transformer it = TransformerFactory.newInstance().newTransformer(); for (Map.Entry<String, Document> e : core.entrySet()) { out.write(("---<< " + e.getKey() + '\n').getBytes()); DataWriter dw = new DataWriter(new OutputStreamWriter(out), null); --- 362,375 ---- * This is a debug method. As such, error handling is sloppy. */ public void dump(OutputStream out) throws IOException { try { // create identity transformer ! // secure xml processing can be switched off if input requires it ! boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; ! TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled); ! Transformer it = tf.newTransformer(); for (Map.Entry<String, Document> e : core.entrySet()) { out.write(("---<< " + e.getKey() + '\n').getBytes()); DataWriter dw = new DataWriter(new OutputStreamWriter(out), null);