2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This utility class represents SOAP fault element according to
15 * SOAP fault specification.
26 #ifndef SEN_SOAP_FAULT_H
27 #define SEN_SOAP_FAULT_H
30 #include <SenDomFragmentBase.h>
31 #include <SenSoapConstants.h>
36 * This utility class represents SOAP fault element according to SOAP fault
38 * SOAP fault element has following child elements:
47 class CSenSoapFault2 : public CSenDomFragmentBase
49 public: // Constructors and destructor
52 * Copy constructor, making a copy of the original source element.
54 * @param aElement Element which is copied into SoapFault.
56 IMPORT_C static CSenSoapFault2* NewL(TXmlEngElement& aElement);
59 * Constructor which, takes
60 * 1) TXmlEngElement which is already owned by other Fragment and
61 * 2) RSenDocument which is owned by that same other Fragment.
62 * Constructor takes a copy of RSenDocument => given element
63 * will be destructed when both original Fragment and
64 * CSenSoapFault2 have been destructed. Given element will
65 * be root element of CSenSoapFault2.
68 * @param aElement Soap Fault element.
69 * @param aDocument Original document holding given Soap Fault
72 IMPORT_C static CSenSoapFault2* NewL(TXmlEngElement& aElement,
73 RSenDocument& aDocument);
78 * @param aNsUri is the XML namespace of this SOAP fault
79 * @param aLocalName is the localname for this SOAP fault
80 * @param aQName is the qualifiedname for this SOAP fault
81 * @param aAttributes are the XML attributes for this SOAP fault
82 * Parameters are used to construct the soap fault.
84 IMPORT_C static CSenSoapFault2* NewL(const TDesC8& aNsUri,
85 const TDesC8& aLocalName,
86 const TDesC8& aPrefix,
87 const RAttributeArray& aAttributes,
88 TXmlEngElement& aElement,
89 RSenDocument& aDocument);
94 IMPORT_C virtual ~CSenSoapFault2();
100 * @return the content of <faultcode> element as UTF-8 form string
101 * or KNullDesC8, if element is not available
103 IMPORT_C TPtrC8 FaultCode();
106 * @since Series60 4.0
107 * @return the content of <Subcode> element as UTF-8 form string
108 * or KNullDesC8, if element is not available
110 IMPORT_C TPtrC8 FaultSubcode();
113 * @since Series60 3.0
114 * @return the content of <faultstring> element as UTF-8 form string
115 * or KNullDesC8, if element is not available
117 IMPORT_C TPtrC8 FaultString();
120 * @since Series60 3.0
121 * @return the content of <faultactor> element as UTF-8 form string
122 * or KNullDesC8, if element is not available
124 IMPORT_C TPtrC8 FaultActor();
127 * @since Series60 3.0
128 * @return the content of <detail> element as UTF-8 form string
129 * or KNullDesC8, if element is not available
131 IMPORT_C TPtrC8 Detail();
136 * C++ default constructor
138 IMPORT_C CSenSoapFault2();
141 * Basic ConstructL function
142 * @since Series60 3.0
143 * @param aElement is the TXmlEngElement from which data to this
144 * SOAP fault object is to be copied.
146 IMPORT_C void ConstructL(TXmlEngElement& aElement);
149 * ConstructL method which takes
150 * 1) TXmlEngElement which is already owned by other Fragment and
151 * 2) RSenDocument which is owned by that same other Fragment.
152 * Constructor takes a copy of RSenDocument => given element
153 * will be destructed when both original Fragment and
154 * CSenSoapFault2 have been destructed. Given element will
155 * be root element of CSenSoapFault2.
157 * @since Series60 3.0
158 * @param aElement Soap Fault element.
159 * @param aDocument Original document holding given Soap Fault
162 IMPORT_C void ConstructL(TXmlEngElement& aElement, RSenDocument& aDocument);
165 * Basic ConstructL function
166 * @since Series60 3.0
167 * @param aNsUri is the XML namespace URI of this SOAP fault
168 * @param aLocalName is the XML localname URI of this SOAP fault
169 * @param aQName is the XML qualifiedname URI of this SOAP fault
170 * @param aAttributes are the XML attributes for this SOAP fault
172 IMPORT_C void ConstructL(const TDesC8& aNsUri,
173 const TDesC8& aLocalName,
174 const TDesC8& aPrefix,
175 const RAttributeArray& aAttributes,
176 TXmlEngElement& aElement,
177 RSenDocument& aDocument);
180 #endif // SEN_SOAP_ENVELOPE_H