KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > soap > SOAP12Constants


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.soap;
17
18 import org.apache.axis.Constants;
19
20 import javax.xml.namespace.QName JavaDoc;
21
22 /**
23  * SOAP 1.2 constants
24  *
25  * @author Glen Daniels (gdaniels@apache.org)
26  * @author Andras Avar (andras.avar@nokia.com)
27  */

28 public class SOAP12Constants implements SOAPConstants {
29     private static QName JavaDoc headerQName = new QName JavaDoc(Constants.URI_SOAP12_ENV,
30                                                  Constants.ELEM_HEADER);
31     private static QName JavaDoc bodyQName = new QName JavaDoc(Constants.URI_SOAP12_ENV,
32                                                Constants.ELEM_BODY);
33     private static QName JavaDoc faultQName = new QName JavaDoc(Constants.URI_SOAP12_ENV,
34                                                 Constants.ELEM_FAULT);
35     private static QName JavaDoc roleQName = new QName JavaDoc(Constants.URI_SOAP12_ENV,
36                                                 Constants.ATTR_ROLE);
37     
38     // Public constants for SOAP 1.2
39

40     /** MessageContext property name for webmethod */
41     public static final String JavaDoc PROP_WEBMETHOD = "soap12.webmethod";
42
43     public String JavaDoc getEnvelopeURI() {
44         return Constants.URI_SOAP12_ENV;
45     }
46
47     public String JavaDoc getEncodingURI() {
48         return Constants.URI_SOAP12_ENC;
49     }
50
51     public QName JavaDoc getHeaderQName() {
52         return headerQName;
53     }
54
55     public QName JavaDoc getBodyQName() {
56         return bodyQName;
57     }
58
59     public QName JavaDoc getFaultQName() {
60         return faultQName;
61     }
62
63     /**
64      * Obtain the QName for the role attribute (actor/role)
65      */

66     public QName JavaDoc getRoleAttributeQName() {
67         return roleQName;
68     }
69
70     /**
71      * Obtain the MIME content type
72      */

73     public String JavaDoc getContentType() {
74         return "application/soap+xml";
75     }
76
77     /**
78      * Obtain the "next" role/actor URI
79      */

80     public String JavaDoc getNextRoleURI() {
81         return Constants.URI_SOAP12_NEXT_ROLE;
82     }
83
84     /**
85      * Obtain the ref attribute name
86      */

87     public String JavaDoc getAttrHref() {
88         return Constants.ATTR_REF;
89     }
90
91     /**
92      * Obtain the item type name of an array
93      */

94     public String JavaDoc getAttrItemType() {
95         return Constants.ATTR_ITEM_TYPE;
96     }
97
98     /**
99      * Obtain the Qname of VersionMismatch fault code
100      */

101     public QName JavaDoc getVerMismatchFaultCodeQName() {
102         return Constants.FAULT_SOAP12_VERSIONMISMATCH;
103     }
104
105     /**
106      * Obtain the Qname of Mustunderstand fault code
107      */

108     public QName JavaDoc getMustunderstandFaultQName() {
109         return Constants.FAULT_SOAP12_MUSTUNDERSTAND;
110     }
111
112     /**
113      * Obtain the QName of the SOAP array type
114      */

115     public QName JavaDoc getArrayType() {
116         return Constants.SOAP_ARRAY12;
117     }
118 }
119
Popular Tags