src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java

Print this page
rev 447 : 8029237: Update copyright year to match last edit in jdk8 jaxws repository (2013)
Summary: Fixing Copyrights for year 2013
Reviewed-by: chegar
rev 472 : 8036030: Update JAX-WS RI integration to latest version
   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  90         return doGetDocumentElement();
  91     }
  92 
  93     protected Element doGetDocumentElement() {
  94         return super.getDocumentElement();
  95     }
  96 
  97     public Element createElement(String tagName) throws DOMException {
  98         return ElementFactory.createElement(
  99             this,
 100             NameImpl.getLocalNameFromTagName(tagName),
 101             NameImpl.getPrefixFromTagName(tagName),
 102             null);
 103     }
 104 
 105     public DocumentFragment createDocumentFragment() {
 106         return new SOAPDocumentFragment(this);
 107     }
 108 
 109     public org.w3c.dom.Text createTextNode(String data) {
 110         return new TextImpl(this, data);
 111     }
 112 
 113     public Comment createComment(String data) {
 114         return new CommentImpl(this, data);
 115     }
 116 
 117     public CDATASection createCDATASection(String data) throws DOMException {
 118         return new CDATAImpl(this, data);
 119     }
 120 
 121     public ProcessingInstruction createProcessingInstruction(
 122         String target,
 123         String data)
 124         throws DOMException {
 125         log.severe("SAAJ0542.soap.proc.instructions.not.allowed.in.docs");
 126         throw new UnsupportedOperationException("Processing Instructions are not allowed in SOAP documents");
 127     }
 128 
 129     public Attr createAttribute(String name) throws DOMException {
 130         boolean isQualifiedName = (name.indexOf(":") > 0);
 131         if (isQualifiedName) {
 132             String nsUri = null;
 133             String prefix = name.substring(0, name.indexOf(":"));
 134             //cannot do anything to resolve the URI if prefix is not


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  90         return doGetDocumentElement();
  91     }
  92 
  93     protected Element doGetDocumentElement() {
  94         return super.getDocumentElement();
  95     }
  96 
  97     public Element createElement(String tagName) throws DOMException {
  98         return ElementFactory.createElement(
  99             this,
 100             NameImpl.getLocalNameFromTagName(tagName),
 101             NameImpl.getPrefixFromTagName(tagName),
 102             null);
 103     }
 104 
 105     public DocumentFragment createDocumentFragment() {
 106         return new SOAPDocumentFragment(this);
 107     }
 108 
 109     public org.w3c.dom.Text createTextNode(String data) {
 110         return new SOAPTextImpl(this, data);
 111     }
 112 
 113     public Comment createComment(String data) {
 114         return new SOAPCommentImpl(this, data);
 115     }
 116 
 117     public CDATASection createCDATASection(String data) throws DOMException {
 118         return new CDATAImpl(this, data);
 119     }
 120 
 121     public ProcessingInstruction createProcessingInstruction(
 122         String target,
 123         String data)
 124         throws DOMException {
 125         log.severe("SAAJ0542.soap.proc.instructions.not.allowed.in.docs");
 126         throw new UnsupportedOperationException("Processing Instructions are not allowed in SOAP documents");
 127     }
 128 
 129     public Attr createAttribute(String name) throws DOMException {
 130         boolean isQualifiedName = (name.indexOf(":") > 0);
 131         if (isQualifiedName) {
 132             String nsUri = null;
 133             String prefix = name.substring(0, name.indexOf(":"));
 134             //cannot do anything to resolve the URI if prefix is not