10 martin 1.4 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
22 martin 1.4 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
29 kumpf 1.2 //
30 //%////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_WsmFault_h
33 #define Pegasus_WsmFault_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/String.h>
38 #include <Pegasus/Common/ContentLanguageList.h>
39 #include <Pegasus/Common/MessageLoader.h>
40 #include <Pegasus/WsmServer/WsmRequest.h>
41 #include <Pegasus/WsmServer/WsmUtils.h>
42
43 PEGASUS_NAMESPACE_BEGIN
44
45
46 class PEGASUS_WSMSERVER_LINKAGE WsmFault
47 {
48 public:
49
50 kumpf 1.2 enum Code
51 {
52 s_Sender,
53 s_Receiver
54 };
55
56 enum Subcode
57 {
58 wsman_AccessDenied,
59 wsa_ActionNotSupported,
60 wsman_AlreadyExists,
61 wsen_CannotProcessFilter,
62 wsman_Concurrency,
63 wse_DeliveryModeRequestedUnavailable,
64 wsman_DeliveryRefused,
65 wsa_DestinationUnreachable,
66 wsman_EncodingLimit,
67 wsa_EndpointUnavailable,
68 wse_EventSourceUnableToProcess,
69 wsen_FilterDialectRequestedUnavailable,
70 wse_FilteringNotSupported,
71 kumpf 1.2 wsen_FilteringNotSupported,
72 wse_FilteringRequestedUnavailable,
73 wsman_InternalError,
74 wsman_FragmentDialectNotSupported,
75 wsman_InvalidBookmark,
76 wsen_InvalidEnumerationContext,
77 wse_InvalidExpirationTime,
78 wsen_InvalidExpirationTime,
79 wse_InvalidMessage,
80 wsa_InvalidMessageInformationHeader,
81 wsman_InvalidOptions,
82 wsman_InvalidParameter,
83 wxf_InvalidRepresentation,
84 wsman_InvalidSelectors,
85 wsa_MessageInformationHeaderRequired,
86 wsman_NoAck,
87 wsman_QuotaLimit,
88 wsman_SchemaValidationError,
89 wsen_TimedOut,
90 wsman_TimedOut,
91 wse_UnableToRenew,
92 kumpf 1.2 wse_UnsupportedExpirationType,
93 wsen_UnsupportedExpirationType,
|
96 kumpf 1.2 };
97
98 struct FaultTableEntry
99 {
100 Code code;
101 Subcode subcode;
102 WsmNamespaces::Type nsType;
103 const char* subcodeStr;
104 };
105
106 WsmFault(
107 Subcode subcode,
108 const MessageLoaderParms& msgParms,
109 const String& faultDetail = String::EMPTY);
110
111 WsmFault(
112 Subcode subcode,
113 const String& reason = String::EMPTY,
114 const ContentLanguageList& reasonLanguage = ContentLanguageList(),
115 const String& faultDetail = String::EMPTY);
116
117 kumpf 1.2 WsmFault(const WsmFault& fault);
118
119 ~WsmFault()
120 {
121 }
122
123 const char* getAction() const;
124 String getCode() const;
125 String getSubcode() const;
126 String getReason() const;
127 ContentLanguageList getReasonLanguage() const;
128 String getFaultDetail() const;
129 // Note: Other types of s:Detail data are not supported.
130
131 private:
132
133 static FaultTableEntry _faultTable[];
134
135 Subcode _subcode;
136 String _reason;
137 ContentLanguageList _reasonLanguage;
138 kumpf 1.2 String _faultDetail;
139 };
140
141 class PEGASUS_WSMSERVER_LINKAGE SoapNotUnderstoodFault
142 {
143 public:
144
|