CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
soap_exception.h
1
2#pragma once
3
4#include <system/exceptions.h>
5#include <system/object.h>
6#include <system/shared_ptr.h>
7#include <system/string.h>
8#include <xml/xml_node.h>
9#include <xml/xml_qualified_name.h>
10
11namespace System { namespace Web { namespace Services { namespace Protocols {
12
13class SoapFaultSubCode;
14
15class Details_SoapException;
17
22{
23 friend class System::ExceptionWrapperHelper;
24 template <typename T> friend class System::ExceptionWrapper;
25 using BaseType = System::Details_SystemException;
26
27public:
39
61
64 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException, CODEPORTING_ARGS(), CODEPORTING_ARGS());
69 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException, CODEPORTING_ARGS(String message, System::SharedPtr<Xml::XmlQualifiedName> code), CODEPORTING_ARGS(message, code));
75 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
76 CODEPORTING_ARGS(
77 String message,
79 Exception innerException
80 ),
81 CODEPORTING_ARGS(message, code, innerException)
82 );
88 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException, CODEPORTING_ARGS(String message, System::SharedPtr<Xml::XmlQualifiedName> code, String actor), CODEPORTING_ARGS(message, code, actor));
95 Exception innerException);
96 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
97 CODEPORTING_ARGS(
98 String message,
100 String actor,
101 Exception innerException
102 ),
103 CODEPORTING_ARGS(message, code, actor, innerException)
104 );
112 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
113 CODEPORTING_ARGS(
114 String message,
116 String actor,
118 ),
119 CODEPORTING_ARGS(message, code, actor, detail)
120 );
128 System::SharedPtr<Xml::XmlNode> detail, Exception innerException);
129 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
130 CODEPORTING_ARGS(
131 String message,
133 String actor,
134 System::SharedPtr<Xml::XmlNode> detail, Exception innerException
135 ),
136 CODEPORTING_ARGS(message, code, actor, detail, innerException)
137 );
144 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
145 CODEPORTING_ARGS(
146 String message,
149 ),
150 CODEPORTING_ARGS(message, code, subcode)
151 );
162 Exception innerException);
163 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
164 CODEPORTING_ARGS(
165 String message,
167 String actor,
168 String role,
171 Exception innerException
172 ), CODEPORTING_ARGS(message, code, actor, role, detail, subcode, innerException)
173 );
185 System::SharedPtr<SoapFaultSubCode> subcode, Exception innerException);
186 MEMBER_FUNCTION_MAKE_OBJECT(Details_SoapException,
187 CODEPORTING_ARGS(
188 String message,
190 String actor,
191 String role,
192 String lang,
195 Exception innerException
196 ), CODEPORTING_ARGS(message, code, actor, role, lang, detail, subcode, innerException)
197 );
198
215
216protected:
218 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override { throw System::ExceptionWrapper<Details_SoapException>(self); }
219
220private:
222 String actor;
228 String lang;
230 String role;
233};
234
235}}}} // namespace System::Web::Services::Protocols
A base class for classes that represent system (rather than application) exceptions....
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents the exception thrown when method is called over SOAP and an error occurs....
Definition: soap_exception.h:22
static bool IsVersionMismatchFaultCode(System::SharedPtr< Xml::XmlQualifiedName > code)
Checks if the specified code is equal to the 'VersionMismatch' SOAP fault code.
static System::SharedPtr< Xml::XmlQualifiedName > ServerFaultCode
A SOAP fault code that represents an error occurred on the server.
Definition: soap_exception.h:36
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code)
Constructs a new instance.
static bool IsClientFaultCode(System::SharedPtr< Xml::XmlQualifiedName > code)
Checks if the specified code is equal to the 'Client' SOAP fault code.
System::SharedPtr< SoapFaultSubCode > get_SubCode()
Returns optional information from the 'subcode' XML element.
static System::SharedPtr< Xml::XmlQualifiedName > VersionMismatchFaultCode
A SOAP fault code that represents an invalid namespace.
Definition: soap_exception.h:38
System::SharedPtr< Xml::XmlQualifiedName > get_Code()
Returns a namespace qualified local name in format 'namespace:localname' that specifies the SOAP faul...
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor, String role, String lang, System::SharedPtr< Xml::XmlNode > detail, System::SharedPtr< SoapFaultSubCode > subcode, Exception innerException)
Constructs a new instance.
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor, String role, System::SharedPtr< Xml::XmlNode > detail, System::SharedPtr< SoapFaultSubCode > subcode, Exception innerException)
Constructs a new instance.
String get_Lang()
Returns the language, which is used to localize exception properties.
String get_Node()
Returns the code piece where the exception is thrown when SOAP version 1.2 is used.
static bool IsMustUnderstandFaultCode(System::SharedPtr< Xml::XmlQualifiedName > code)
Checks if the specified code is equal to the 'MustUnderstand' SOAP fault code.
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor)
Constructs a new instance.
System::SharedPtr< Xml::XmlNode > get_Detail()
Returns details about the thrown exception.
static System::SharedPtr< Xml::XmlQualifiedName > MustUnderstandFaultCode
A SOAP fault code that indicates if the SOAP element marked by the 'MustUnderstand' attribute is not ...
Definition: soap_exception.h:34
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, System::SharedPtr< SoapFaultSubCode > subcode)
Constructs a new instance.
String get_Role()
Returns the role of the XML web service that throws the exception.
void DoThrow(const System::ExceptionPtr &self) const override
Throws exception instance wrapped by exception wrapper.
Definition: soap_exception.h:218
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor, System::SharedPtr< Xml::XmlNode > detail, Exception innerException)
Constructs a new instance.
static bool IsServerFaultCode(System::SharedPtr< Xml::XmlQualifiedName > code)
Checks if the specified code is equal to the 'Server' SOAP fault code.
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, Exception innerException)
Constructs a new instance.
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor, System::SharedPtr< Xml::XmlNode > detail)
Constructs a new instance.
String get_Actor()
Returns the code piece where the exception is thrown when SOAP version 1.1 is used.
Details_SoapException(String message, System::SharedPtr< Xml::XmlQualifiedName > code, String actor, Exception innerException)
Constructs a new instance.
static System::SharedPtr< Xml::XmlQualifiedName > ClientFaultCode
A SOAP fault code that represents a client call that is formatted incorrectly or doesn't contain requ...
Definition: soap_exception.h:30
static System::SharedPtr< Xml::XmlQualifiedName > DetailElementName
A namespace qualified local name in format 'namespace:localname'.
Definition: soap_exception.h:32
Definition: db_command.h:9