epoc32/include/mw/sensoapconstants.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:        This header provides SOAP specific constants.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
#ifndef SEN_SOAP_CONSTANTS_H
williamr@2
    26
#define SEN_SOAP_CONSTANTS_H
williamr@2
    27
williamr@2
    28
// CONSTANTS
williamr@2
    29
williamr@2
    30
/// Envelope:
williamr@2
    31
_LIT8(KSenSoap12ContentTypeHeaderValue, "application/soap+xml; charset=utf-8");
williamr@2
    32
_LIT8(KSenSoap12AcceptHeaderValue,      "application/soap+xml");
williamr@2
    33
_LIT8(KSenSoapEnvelopeName,             "Envelope");
williamr@2
    34
_LIT8(KSenSoapEnvelopePrefix,   	    "S");
williamr@2
    35
_LIT8(KSenSoapEnvelopeQName,            "S:Envelope");
williamr@2
    36
williamr@2
    37
_LIT8(KSenSoapEnvelopeXmlns,            "http://schemas.xmlsoap.org/soap/envelope/");
williamr@2
    38
_LIT8(KSenSoap12EnvelopeXmlns,          "http://www.w3.org/2003/05/soap-envelope");
williamr@2
    39
_LIT8(KSenSoapEnvelopeHeaderName,       "Header");
williamr@2
    40
_LIT8(KSenSoapEnvelopeHeaderQName,      "S:Header");
williamr@2
    41
_LIT8(KSenSoapEnvelopeBodyName,         "Body");
williamr@2
    42
_LIT8(KSenSoapEnvelopeBodyQName,        "S:Body");
williamr@2
    43
_LIT8(KSenSoapFaultName,                "Fault");
williamr@2
    44
williamr@2
    45
/// Action
williamr@2
    46
_LIT8(KSenSoapActionHeaderName,         "SOAPAction");
williamr@2
    47
_LIT8(KSenSoapActionHeaderValueEmpty,   "\"\""); 
williamr@2
    48
williamr@2
    49
/// Security
williamr@2
    50
_LIT8(KSecurityName,                "Security");
williamr@2
    51
_LIT8(KBinarySecurityToken,         "BinarySecurityToken");
williamr@2
    52
_LIT8(KSecurityXmlNs,               "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
williamr@2
    53
_LIT8(KSecuritySchemeXmlNs,         "http://schemas.xmlsoap.org/ws/2003/06/secext");
williamr@2
    54
_LIT8(KSecurityXmlNsPrefix,         "wsse");
williamr@2
    55
williamr@2
    56
_LIT8(KSecurityAttrType,            "Type");           // name of the XML attribute 
williamr@2
    57
_LIT8(KSecurityAttrTypeText,        "PasswordText");   // for default type: wsse:PasswordText
williamr@2
    58
_LIT8(KSecurityAttrTypeDigest,      "PasswordDigest"); // digest type: wsse:Digest
williamr@2
    59
williamr@2
    60
_LIT8(KSecurityTokenReference,      "SecurityTokenReference");
williamr@2
    61
_LIT8(KSecurityUtilityXmlNs,        "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
williamr@2
    62
_LIT8(KSecurityUtilityXmlNsPrefix,  "wsu");
williamr@2
    63
williamr@2
    64
_LIT8(KSecurityUtilityId, "Id");
williamr@2
    65
_LIT8(KSecurityUtilityWsuId, "wsu:Id");
williamr@2
    66
williamr@2
    67
williamr@2
    68
const TInt KStateParsingSoapHeader  = 20; // ignore state   (even number)
williamr@2
    69
const TInt KStateParsingSoapBody    = 40; // ignore state   (even number)
williamr@2
    70
const TInt KStateParsingSoapFault   = 5;  // save state     (odd number)
williamr@2
    71
williamr@2
    72
/// Fault
williamr@2
    73
// CONSTANTS
williamr@2
    74
_LIT8(KFaultCodeLocalname,      "faultcode");   // "faultcode" is intended for use by software to
williamr@2
    75
                                                // provide an algorithmic mechanism for
williamr@2
    76
                                                // identifying the fault.
williamr@2
    77
williamr@2
    78
_LIT8(KFaultStringLocalname,    "faultstring"); // "faultstring" is intended to provide a human
williamr@2
    79
                                                // readable explanation of the fault and is not
williamr@2
    80
                                                // intended for algorithmic processing.
williamr@2
    81
williamr@2
    82
_LIT8(KFaultActorLocalname,     "faultactor");  // "faultactor" is intended to provide information
williamr@2
    83
                                                // about which SOAP node on the SOAP message path
williamr@2
    84
                                                // caused the fault to happen.
williamr@2
    85
                                                // The value of the "faultactor" is a URI
williamr@2
    86
                                                // identifying the source of the fault.
williamr@2
    87
                                                
williamr@2
    88
_LIT8(KDetailLocalname,         "detail");      // "detail" is intended for carrying application
williamr@2
    89
                                                // specific error information related to the SOAP
williamr@2
    90
                                                // Body. It MUST be present when the contents of
williamr@2
    91
                                                // the SOAP Body could not be processed
williamr@2
    92
                                                // successfully.
williamr@2
    93
                                                
williamr@2
    94
// SOAP 1.2 (http://www.w3.org/TR/soap12-part1/):
williamr@2
    95
_LIT8(KFault12CodeLocalname,	"Code");		// "Code" has a mandatory "Value" element
williamr@2
    96
                                                // information item and may have an optional
williamr@2
    97
                                                // Subcode element information item.
williamr@2
    98
williamr@2
    99
_LIT8(KFault12SubcodeLocalname,	"Subcode");		// "Subcode" has a mandatory "Value" element
williamr@2
   100
                                                // information item and may have an optional
williamr@2
   101
                                                // Subcode element information item.
williamr@2
   102
williamr@2
   103
_LIT8(KFault12ValueLocalname,	"Value");		// In "Code" element:
williamr@2
   104
                                                //    The type of the Value element information
williamr@2
   105
                                                //    item is env:faultCodeEnum. SOAP defines a
williamr@2
   106
                                                //    small set of SOAP fault codes covering high
williamr@2
   107
                                                //    level SOAP faults.
williamr@2
   108
                                                // In "Subcode" element:
williamr@2
   109
                                                //    The type of the Value element information
williamr@2
   110
                                                //    item is xs:QName. The value of this element
williamr@2
   111
                                                //    is an application defined subcategory of
williamr@2
   112
                                                //    the value of the Value child element
williamr@2
   113
                                                //    information item of the Subcode element
williamr@2
   114
                                                //    information item's parent element information
williamr@2
   115
                                                //    item.
williamr@2
   116
                                                
williamr@2
   117
_LIT8(KFault12ReasonLocalname,	"Reason");		// "Reason" has one or more "Text" element
williamr@2
   118
                                                // information item children. Each child "Text"
williamr@2
   119
                                                // element information item SHOULD have a
williamr@2
   120
                                                // different value for its "xml:lang" attribute
williamr@2
   121
                                                // information item.
williamr@2
   122
                                                
williamr@2
   123
_LIT8(KFault12TextLocalname,	"Text");		// "Text" has a mandatory attribute information
williamr@2
   124
                                                // item  with a [local name] of lang and
williamr@2
   125
                                                // [namespace name] of 
williamr@2
   126
                                                // "http://www.w3.org/XML/1998/namespace".
williamr@2
   127
                                                // Note that the definition in of the lang
williamr@2
   128
                                                // attribute information item requires that the
williamr@2
   129
                                                // [prefix] is "xml" or any capitalization thereof.
williamr@2
   130
                                                //
williamr@2
   131
                                                // "Text" is similar to the 'Reason-Phrase' defined
williamr@2
   132
                                                // by HTTP [RFC 2616] and SHOULD provide
williamr@2
   133
                                                // information explaining the nature of the fault.
williamr@2
   134
                                                // It is not intended for algorithmic processing.
williamr@2
   135
williamr@2
   136
_LIT8(KFault12NodeLocalname,	"Node");		// "Node" is intended to provide information about
williamr@2
   137
                                                // which SOAP node on the SOAP message path caused
williamr@2
   138
                                                // the fault to happen.
williamr@2
   139
                                                // "Node" contains the URI of the SOAP node that
williamr@2
   140
                                                // generated the fault.
williamr@2
   141
williamr@2
   142
_LIT8(KFault12DetailLocalname,	"Detail");		// "Detail" MAY be present in a SOAP fault in
williamr@2
   143
                                                // which case it carries additional information
williamr@2
   144
                                                // relative to the SOAP fault codes describing
williamr@2
   145
                                                // the fault. For example, the Detail element
williamr@2
   146
                                                // information item might contain information about
williamr@2
   147
                                                // a message not containing the proper credentials,
williamr@2
   148
                                                // a timeout, etc. The presence of the Detail
williamr@2
   149
                                                // element information item has no significance as
williamr@2
   150
                                                // to which parts of the faulty SOAP message were
williamr@2
   151
                                                // processed.
williamr@2
   152
williamr@2
   153
// SOAP Fault Codes in SOAP 1.2 (http://www.w3.org/TR/soap12-part1/):
williamr@2
   154
_LIT8(KDataEncodingUnknown,     "DataEncodingUnknown");
williamr@2
   155
                                                // A SOAP header block or SOAP body child element 
williamr@2
   156
                                                // information item targeted at the faulting SOAP
williamr@2
   157
                                                // node is scoped (see 5.1.1 SOAP encodingStyle
williamr@2
   158
                                                // Attribute) with a data encoding that the
williamr@2
   159
                                                // faulting node does not support.
williamr@2
   160
williamr@2
   161
_LIT8(KMustUnderstand,          "MustUnderstand");
williamr@2
   162
                                                // An immediate child element information item of
williamr@2
   163
                                                // the SOAP Header element information item
williamr@2
   164
                                                // targeted at the faulting node that was not
williamr@2
   165
                                                // understood by the faulting node contained a SOAP
williamr@2
   166
                                                // mustUnderstand attribute information item with a
williamr@2
   167
                                                // value of "true".
williamr@2
   168
                                                
williamr@2
   169
_LIT8(KReceiver,                "Receiver");    // The message could not be processed for reasons
williamr@2
   170
                                                // attributable to the processing of the message
williamr@2
   171
                                                // rather than to the contents of the message
williamr@2
   172
                                                // itself. For example, processing could include
williamr@2
   173
                                                // communicating with an upstream SOAP node, which
williamr@2
   174
                                                // did not respond. The message could succeed if
williamr@2
   175
                                                // resent at a later point in time.
williamr@2
   176
                                                
williamr@2
   177
_LIT8(KSender,                  "Sender");      // The message was incorrectly formed or did not
williamr@2
   178
                                                // contain the appropriate information in order to
williamr@2
   179
                                                // succeed. For example, the message could lack the
williamr@2
   180
                                                // proper authentication or payment information. It
williamr@2
   181
                                                // is generally an indication that the message is
williamr@2
   182
                                                // not to be resent without change.
williamr@2
   183
williamr@2
   184
_LIT8(KVersionMismatch,         "VersionMismatch");
williamr@2
   185
                                                // The faulting node found an invalid element
williamr@2
   186
                                                // information item instead of the expected
williamr@2
   187
                                                // Envelope element information item. The namespace,
williamr@2
   188
                                                // local name or both did not match the Envelope
williamr@2
   189
                                                // element information item required by this
williamr@2
   190
                                                // recommendation.
williamr@2
   191
williamr@2
   192
enum TSOAPVersion
williamr@2
   193
        {
williamr@2
   194
        ESOAP11 = 1,
williamr@2
   195
        ESOAP12
williamr@2
   196
        };
williamr@2
   197
williamr@2
   198
#endif // SEN_SOAP_CONSTANTS_H
williamr@2
   199
williamr@2
   200
williamr@2
   201
williamr@2
   202