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