jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
changeset 43852 93a527059d8a
parent 33547 e4c76ac38b12
child 45678 65fdff10664d
equal deleted inserted replaced
43752:3c68ef249093 43852:93a527059d8a
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    40 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
    40 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
    41 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
    41 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
    42 import com.sun.xml.internal.messaging.saaj.soap.impl.*;
    42 import com.sun.xml.internal.messaging.saaj.soap.impl.*;
    43 import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
    43 import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
    44 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
    44 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
       
    45 import org.w3c.dom.Element;
    45 
    46 
    46 
    47 
    47 public class Fault1_2Impl extends FaultImpl {
    48 public class Fault1_2Impl extends FaultImpl {
    48 
    49 
    49     protected static final Logger log =
    50     protected static final Logger log =
    64         super(ownerDoc, NameImpl.createFault1_2Name(name, prefix));
    65         super(ownerDoc, NameImpl.createFault1_2Name(name, prefix));
    65     }
    66     }
    66 
    67 
    67     public Fault1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
    68     public Fault1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
    68         super(ownerDocument, NameImpl.createFault1_2Name(null, prefix));
    69         super(ownerDocument, NameImpl.createFault1_2Name(null, prefix));
       
    70     }
       
    71 
       
    72     public Fault1_2Impl(Element domElement, SOAPDocumentImpl ownerDoc) {
       
    73         super(ownerDoc, domElement);
    69     }
    74     }
    70 
    75 
    71     protected NameImpl getDetailName() {
    76     protected NameImpl getDetailName() {
    72         return NameImpl.createSOAP12Name("Detail", getPrefix());
    77         return NameImpl.createSOAP12Name("Detail", getPrefix());
    73     }
    78     }
   519                 log.severe("SAAJ0437.ver1_2.version.mismatch.error");
   524                 log.severe("SAAJ0437.ver1_2.version.mismatch.error");
   520                 throw new SOAPExceptionImpl("Cannot add Detail, Incorrect SOAP version specified for Detail element");
   525                 throw new SOAPExceptionImpl("Cannot add Detail, Incorrect SOAP version specified for Detail element");
   521             }
   526             }
   522         }
   527         }
   523         if (element instanceof Detail1_2Impl) {
   528         if (element instanceof Detail1_2Impl) {
   524             ElementImpl importedElement = (ElementImpl) importElement(element);
   529             Element importedElement = importElement(element);
   525             addNode(importedElement);
   530             addNode(importedElement);
   526             return convertToSoapElement(importedElement);
   531             return convertToSoapElement(importedElement);
   527         } else
   532         } else
   528             return super.addChildElement(element);
   533             return super.addChildElement(element);
   529     }
   534     }