1 /*
2 * Copyright (c) 1997, 2012, 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
23 * questions.
24 */
25
26 /**
27 *
28 * @author SAAJ RI Development Team
29 */
30 package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
31
32 import java.util.logging.Logger;
33
34 import javax.xml.namespace.QName;
35 import javax.xml.soap.*;
36
37 import org.w3c.dom.Node;
38
39 import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
40 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
41 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
42 import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
43 import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
44
45 public class Body1_2Impl extends BodyImpl {
46
47 protected static final Logger log =
48 Logger.getLogger(Body1_2Impl.class.getName(),
49 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
50
51 public Body1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
52 super(ownerDocument, NameImpl.createBody1_2Name(prefix));
53 }
54
55 protected NameImpl getFaultName(String name) {
56 return NameImpl.createFault1_2Name(name, null);
57 }
58
59 protected SOAPBodyElement createBodyElement(Name name) {
60 return new BodyElement1_2Impl(
61 ((SOAPDocument) getOwnerDocument()).getDocument(),
62 name);
63 }
64 protected SOAPBodyElement createBodyElement(QName name) {
65 return new BodyElement1_2Impl(
66 ((SOAPDocument) getOwnerDocument()).getDocument(),
67 name);
68 }
69
70 protected QName getDefaultFaultCode() {
71 return SOAPConstants.SOAP_RECEIVER_FAULT;
72 }
|
1 /*
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.
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
23 * questions.
24 */
25
26 /**
27 *
28 * @author SAAJ RI Development Team
29 */
30 package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
31
32 import java.util.logging.Logger;
33
34 import javax.xml.namespace.QName;
35 import javax.xml.soap.*;
36
37 import org.w3c.dom.Element;
38 import org.w3c.dom.Node;
39
40 import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
41 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
42 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
43 import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
44 import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
45
46 public class Body1_2Impl extends BodyImpl {
47
48 protected static final Logger log =
49 Logger.getLogger(Body1_2Impl.class.getName(),
50 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
51
52 public Body1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
53 super(ownerDocument, NameImpl.createBody1_2Name(prefix));
54 }
55
56 public Body1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) {
57 super(ownerDoc, domElement);
58 }
59
60 protected NameImpl getFaultName(String name) {
61 return NameImpl.createFault1_2Name(name, null);
62 }
63
64 protected SOAPBodyElement createBodyElement(Name name) {
65 return new BodyElement1_2Impl(
66 ((SOAPDocument) getOwnerDocument()).getDocument(),
67 name);
68 }
69 protected SOAPBodyElement createBodyElement(QName name) {
70 return new BodyElement1_2Impl(
71 ((SOAPDocument) getOwnerDocument()).getDocument(),
72 name);
73 }
74
75 protected QName getDefaultFaultCode() {
76 return SOAPConstants.SOAP_RECEIVER_FAULT;
77 }
|