View Javadoc

    1   /***
    2    *
    3    * Copyright 2004 Protique Ltd
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    * http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   *
    17   **/
    18  package org.codehaus.xfire.soap;
    19
    20  import javax.xml.namespace.QName;
    21
    22  /***
    23   * Represents the SOAP 1.2 version
    24   *
    25   * @version $Revision: 1.3 $
    26   */
    27  public class Soap12 implements SoapVersion
    28  {
    29      private static Soap12 instance = new Soap12();
    30
    31      private final double version = 1.2;
    32
    33      private final String namespace = "http://www.w3.org/2003/05/soap-envelope";
    34
    35      private final String prefix = "soap";
    36
    37      private final String noneRole = namespace + "/role/none";
    38
    39      private final String ultimateReceiverRole = namespace + "/role/ultimateReceiver";
    40
    41      private final String nextRole = namespace + "/role/next";
    42
    43      private final String soapEncodingStyle = "http://www.w3.org/2003/05/soap-encoding";
    44
    45      private final QName envelope = new QName(namespace, "Envelope", prefix);
    46
    47      private final QName header = new QName(namespace, "Header", prefix);
    48
    49      private final QName body = new QName(namespace, "Body", prefix);
    50
    51      private final QName fault = new QName(namespace, "Fault", prefix);
    52
    53      public static Soap12 getInstance()
    54      {
    55          return instance;
    56      }
    57
    58      public double getVersion()
    59      {
    60          return version;
    61      }
    62
    63      public String getNamespace()
    64      {
    65          return namespace;
    66      }
    67
    68      public String getPrefix()
    69      {
    70          return prefix;
    71      }
    72
    73      public QName getEnvelope()
    74      {
    75          return envelope;
    76      }
    77
    78      public QName getHeader()
    79      {
    80          return header;
    81      }
    82
    83      public QName getBody()
    84      {
    85          return body;
    86      }
    87
    88      public QName getFault()
    89      {
    90          return fault;
    91      }
    92
    93      public String getSoapEncodingStyle()
    94      {
    95          return soapEncodingStyle;
    96      }
    97
    98      // Role URIs
    99      // -------------------------------------------------------------------------
    100     public String getNoneRole()
    101     {
    102         return noneRole;
    103     }
    104
    105     public String getUltimateReceiverRole()
    106     {
    107         return ultimateReceiverRole;
    108     }
    109
    110     public String getNextRole()
    111     {
    112         return nextRole;
    113     }
    114 }