01: /*
02: * $Id: FaultElementImpl.java,v 1.10 2006/01/27 12:49:35 vj135062 Exp $
03: * $Revision: 1.10 $
04: * $Date: 2006/01/27 12:49:35 $
05: */
06:
07: /*
08: * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
09: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
10: *
11: * This code is free software; you can redistribute it and/or modify it
12: * under the terms of the GNU General Public License version 2 only, as
13: * published by the Free Software Foundation. Sun designates this
14: * particular file as subject to the "Classpath" exception as provided
15: * by Sun in the LICENSE file that accompanied this code.
16: *
17: * This code is distributed in the hope that it will be useful, but WITHOUT
18: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20: * version 2 for more details (a copy is included in the LICENSE file that
21: * accompanied this code).
22: *
23: * You should have received a copy of the GNU General Public License version
24: * 2 along with this work; if not, write to the Free Software Foundation,
25: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26: *
27: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
28: * CA 95054 USA or visit www.sun.com if you need additional information or
29: * have any questions.
30: */
31: package com.sun.xml.internal.messaging.saaj.soap.impl;
32:
33: import java.util.logging.Level;
34:
35: import javax.xml.namespace.QName;
36: import javax.xml.soap.SOAPException;
37: import javax.xml.soap.SOAPElement;
38: import javax.xml.soap.SOAPFaultElement;
39:
40: import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
41: import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
42:
43: public abstract class FaultElementImpl extends ElementImpl implements
44: SOAPFaultElement {
45:
46: protected FaultElementImpl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
47: super (ownerDoc, qname);
48: }
49:
50: protected FaultElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
51: super (ownerDoc, qname);
52: }
53:
54: protected abstract boolean isStandardFaultElement();
55:
56: public SOAPElement setElementQName(QName newName)
57: throws SOAPException {
58: log.log(Level.SEVERE,
59: "SAAJ0146.impl.invalid.name.change.requested",
60: new Object[] { elementQName.getLocalPart(),
61: newName.getLocalPart() });
62: throw new SOAPException("Cannot change name for "
63: + elementQName.getLocalPart() + " to "
64: + newName.getLocalPart());
65: }
66:
67: }
|