1.1 --- a/epoc32/include/mw/sensoapconstants.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/sensoapconstants.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,202 @@
1.4 -sensoapconstants.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This header provides SOAP specific constants.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +#ifndef SEN_SOAP_CONSTANTS_H
1.30 +#define SEN_SOAP_CONSTANTS_H
1.31 +
1.32 +// CONSTANTS
1.33 +
1.34 +/// Envelope:
1.35 +_LIT8(KSenSoap12ContentTypeHeaderValue, "application/soap+xml; charset=utf-8");
1.36 +_LIT8(KSenSoap12AcceptHeaderValue, "application/soap+xml");
1.37 +_LIT8(KSenSoapEnvelopeName, "Envelope");
1.38 +_LIT8(KSenSoapEnvelopePrefix, "S");
1.39 +_LIT8(KSenSoapEnvelopeQName, "S:Envelope");
1.40 +
1.41 +_LIT8(KSenSoapEnvelopeXmlns, "http://schemas.xmlsoap.org/soap/envelope/");
1.42 +_LIT8(KSenSoap12EnvelopeXmlns, "http://www.w3.org/2003/05/soap-envelope");
1.43 +_LIT8(KSenSoapEnvelopeHeaderName, "Header");
1.44 +_LIT8(KSenSoapEnvelopeHeaderQName, "S:Header");
1.45 +_LIT8(KSenSoapEnvelopeBodyName, "Body");
1.46 +_LIT8(KSenSoapEnvelopeBodyQName, "S:Body");
1.47 +_LIT8(KSenSoapFaultName, "Fault");
1.48 +
1.49 +/// Action
1.50 +_LIT8(KSenSoapActionHeaderName, "SOAPAction");
1.51 +_LIT8(KSenSoapActionHeaderValueEmpty, "\"\"");
1.52 +
1.53 +/// Security
1.54 +_LIT8(KSecurityName, "Security");
1.55 +_LIT8(KBinarySecurityToken, "BinarySecurityToken");
1.56 +_LIT8(KSecurityXmlNs, "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
1.57 +_LIT8(KSecuritySchemeXmlNs, "http://schemas.xmlsoap.org/ws/2003/06/secext");
1.58 +_LIT8(KSecurityXmlNsPrefix, "wsse");
1.59 +
1.60 +_LIT8(KSecurityAttrType, "Type"); // name of the XML attribute
1.61 +_LIT8(KSecurityAttrTypeText, "PasswordText"); // for default type: wsse:PasswordText
1.62 +_LIT8(KSecurityAttrTypeDigest, "PasswordDigest"); // digest type: wsse:Digest
1.63 +
1.64 +_LIT8(KSecurityTokenReference, "SecurityTokenReference");
1.65 +_LIT8(KSecurityUtilityXmlNs, "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
1.66 +_LIT8(KSecurityUtilityXmlNsPrefix, "wsu");
1.67 +
1.68 +_LIT8(KSecurityUtilityId, "Id");
1.69 +_LIT8(KSecurityUtilityWsuId, "wsu:Id");
1.70 +
1.71 +
1.72 +const TInt KStateParsingSoapHeader = 20; // ignore state (even number)
1.73 +const TInt KStateParsingSoapBody = 40; // ignore state (even number)
1.74 +const TInt KStateParsingSoapFault = 5; // save state (odd number)
1.75 +
1.76 +/// Fault
1.77 +// CONSTANTS
1.78 +_LIT8(KFaultCodeLocalname, "faultcode"); // "faultcode" is intended for use by software to
1.79 + // provide an algorithmic mechanism for
1.80 + // identifying the fault.
1.81 +
1.82 +_LIT8(KFaultStringLocalname, "faultstring"); // "faultstring" is intended to provide a human
1.83 + // readable explanation of the fault and is not
1.84 + // intended for algorithmic processing.
1.85 +
1.86 +_LIT8(KFaultActorLocalname, "faultactor"); // "faultactor" is intended to provide information
1.87 + // about which SOAP node on the SOAP message path
1.88 + // caused the fault to happen.
1.89 + // The value of the "faultactor" is a URI
1.90 + // identifying the source of the fault.
1.91 +
1.92 +_LIT8(KDetailLocalname, "detail"); // "detail" is intended for carrying application
1.93 + // specific error information related to the SOAP
1.94 + // Body. It MUST be present when the contents of
1.95 + // the SOAP Body could not be processed
1.96 + // successfully.
1.97 +
1.98 +// SOAP 1.2 (http://www.w3.org/TR/soap12-part1/):
1.99 +_LIT8(KFault12CodeLocalname, "Code"); // "Code" has a mandatory "Value" element
1.100 + // information item and may have an optional
1.101 + // Subcode element information item.
1.102 +
1.103 +_LIT8(KFault12SubcodeLocalname, "Subcode"); // "Subcode" has a mandatory "Value" element
1.104 + // information item and may have an optional
1.105 + // Subcode element information item.
1.106 +
1.107 +_LIT8(KFault12ValueLocalname, "Value"); // In "Code" element:
1.108 + // The type of the Value element information
1.109 + // item is env:faultCodeEnum. SOAP defines a
1.110 + // small set of SOAP fault codes covering high
1.111 + // level SOAP faults.
1.112 + // In "Subcode" element:
1.113 + // The type of the Value element information
1.114 + // item is xs:QName. The value of this element
1.115 + // is an application defined subcategory of
1.116 + // the value of the Value child element
1.117 + // information item of the Subcode element
1.118 + // information item's parent element information
1.119 + // item.
1.120 +
1.121 +_LIT8(KFault12ReasonLocalname, "Reason"); // "Reason" has one or more "Text" element
1.122 + // information item children. Each child "Text"
1.123 + // element information item SHOULD have a
1.124 + // different value for its "xml:lang" attribute
1.125 + // information item.
1.126 +
1.127 +_LIT8(KFault12TextLocalname, "Text"); // "Text" has a mandatory attribute information
1.128 + // item with a [local name] of lang and
1.129 + // [namespace name] of
1.130 + // "http://www.w3.org/XML/1998/namespace".
1.131 + // Note that the definition in of the lang
1.132 + // attribute information item requires that the
1.133 + // [prefix] is "xml" or any capitalization thereof.
1.134 + //
1.135 + // "Text" is similar to the 'Reason-Phrase' defined
1.136 + // by HTTP [RFC 2616] and SHOULD provide
1.137 + // information explaining the nature of the fault.
1.138 + // It is not intended for algorithmic processing.
1.139 +
1.140 +_LIT8(KFault12NodeLocalname, "Node"); // "Node" is intended to provide information about
1.141 + // which SOAP node on the SOAP message path caused
1.142 + // the fault to happen.
1.143 + // "Node" contains the URI of the SOAP node that
1.144 + // generated the fault.
1.145 +
1.146 +_LIT8(KFault12DetailLocalname, "Detail"); // "Detail" MAY be present in a SOAP fault in
1.147 + // which case it carries additional information
1.148 + // relative to the SOAP fault codes describing
1.149 + // the fault. For example, the Detail element
1.150 + // information item might contain information about
1.151 + // a message not containing the proper credentials,
1.152 + // a timeout, etc. The presence of the Detail
1.153 + // element information item has no significance as
1.154 + // to which parts of the faulty SOAP message were
1.155 + // processed.
1.156 +
1.157 +// SOAP Fault Codes in SOAP 1.2 (http://www.w3.org/TR/soap12-part1/):
1.158 +_LIT8(KDataEncodingUnknown, "DataEncodingUnknown");
1.159 + // A SOAP header block or SOAP body child element
1.160 + // information item targeted at the faulting SOAP
1.161 + // node is scoped (see 5.1.1 SOAP encodingStyle
1.162 + // Attribute) with a data encoding that the
1.163 + // faulting node does not support.
1.164 +
1.165 +_LIT8(KMustUnderstand, "MustUnderstand");
1.166 + // An immediate child element information item of
1.167 + // the SOAP Header element information item
1.168 + // targeted at the faulting node that was not
1.169 + // understood by the faulting node contained a SOAP
1.170 + // mustUnderstand attribute information item with a
1.171 + // value of "true".
1.172 +
1.173 +_LIT8(KReceiver, "Receiver"); // The message could not be processed for reasons
1.174 + // attributable to the processing of the message
1.175 + // rather than to the contents of the message
1.176 + // itself. For example, processing could include
1.177 + // communicating with an upstream SOAP node, which
1.178 + // did not respond. The message could succeed if
1.179 + // resent at a later point in time.
1.180 +
1.181 +_LIT8(KSender, "Sender"); // The message was incorrectly formed or did not
1.182 + // contain the appropriate information in order to
1.183 + // succeed. For example, the message could lack the
1.184 + // proper authentication or payment information. It
1.185 + // is generally an indication that the message is
1.186 + // not to be resent without change.
1.187 +
1.188 +_LIT8(KVersionMismatch, "VersionMismatch");
1.189 + // The faulting node found an invalid element
1.190 + // information item instead of the expected
1.191 + // Envelope element information item. The namespace,
1.192 + // local name or both did not match the Envelope
1.193 + // element information item required by this
1.194 + // recommendation.
1.195 +
1.196 +enum TSOAPVersion
1.197 + {
1.198 + ESOAP11 = 1,
1.199 + ESOAP12
1.200 + };
1.201 +
1.202 +#endif // SEN_SOAP_CONSTANTS_H
1.203 +
1.204 +
1.205 +
1.206 +