View Javadoc

1   /*
2    * Copyright  2003-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   */
17  
18  package org.apache.ws.security;
19  
20  import javax.xml.namespace.QName;
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 headerQName = new QName(WSConstants.URI_SOAP12_ENV,
30              WSConstants.ELEM_HEADER);
31      private static QName bodyQName = new QName(WSConstants.URI_SOAP12_ENV,
32              WSConstants.ELEM_BODY);
33      private static QName roleQName = new QName(WSConstants.URI_SOAP12_ENV,
34              WSConstants.ATTR_ROLE);
35      
36      // Public constants for SOAP 1.2
37      
38      /***
39       * MessageContext property name for webmethod
40       */
41      public static final String PROP_WEBMETHOD = "soap12.webmethod";
42  
43      public String getEnvelopeURI() {
44          return WSConstants.URI_SOAP12_ENV;
45      }
46  
47      public QName getHeaderQName() {
48          return headerQName;
49      }
50  
51      public QName getBodyQName() {
52          return bodyQName;
53      }
54  
55      /***
56       * Obtain the QName for the role attribute (actor/role)
57       */
58      public QName getRoleAttributeQName() {
59          return roleQName;
60      }
61  
62      /***
63       * Obtain the "next" role/actor URI
64       */
65      public String getNextRoleURI() {
66          return WSConstants.URI_SOAP12_NEXT_ROLE;
67      }
68  
69      /***
70       * Obtain the Mustunderstand string
71       */
72      public String getMustunderstand() {
73          return "true";
74      }
75  
76  }