(file) Return to WsmFault.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / WsmServer

  1 martin 1.4 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.5 //
  3 martin 1.4 // Licensed to The Open Group (TOG) under one or more contributor license
  4            // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5            // this work for additional information regarding copyright ownership.
  6            // Each contributor licenses this file to you under the OpenPegasus Open
  7            // Source License; you may not use this file except in compliance with the
  8            // License.
  9 martin 1.5 //
 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:
 16 martin 1.5 //
 17 martin 1.4 // The above copyright notice and this permission notice shall be included
 18            // in all copies or substantial portions of the Software.
 19 martin 1.5 //
 20 martin 1.4 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.5 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 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.
 27 martin 1.5 //
 28 martin 1.4 //////////////////////////////////////////////////////////////////////////
 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,
 94 kumpf  1.3         wsman_UnsupportedFeature,
 95                    wsmb_PolymorphismModeNotSupported
 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            
145 kumpf  1.6     /**
146                    Constructs a SOAP NotUnderstood fault for a specified element name and
147                    namespace.  If the element is not scoped within a namespace, the
148                    nameSpace parameter must be left blank.
149                */
150 kumpf  1.2     SoapNotUnderstoodFault(
151                    const String& nameSpace,
152                    const String& headerName);
153            
154                String getNamespace() const;
155                String getHeaderName() const;
156                String getMessage() const;
157                ContentLanguageList getMessageLanguage() const;
158            
159            private:
160            
161                String _nameSpace;
162                String _headerName;
163                String _message;
164                ContentLanguageList _messageLanguage;
165            };
166            
167            PEGASUS_NAMESPACE_END
168            
169            #endif /* Pegasus_WsmFault_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2