CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
soap_message.h
1
2#pragma once
3
4#include <net/web/services/protocol/soap_exception.h>
5#include <net/web/services/protocol/soap_message_stage.h>
6#include <net/web/services/protocol/soap_protocol_version.h>
7#include <net/web/services/protocol/soap_header_collection.h>
8#include <net/web/services/protocol/soap_header_direction.h>
9#include <cstdint>
10#include <system/array.h>
11#include <system/io/stream.h>
12#include <system/object.h>
13#include <system/shared_ptr.h>
14#include <system/string.h>
15#include <system/type_info.h>
16
17namespace System { namespace Web { namespace Services { namespace Protocols {
18
19class SoapHttpClientProtocol;
20class SoapHeaderCollection;
21class SoapHeaderMapping;
22
27class ABSTRACT ASPOSECPP_SHARED_CLASS SoapMessage : public System::Object
28{
29
30public:
45 ASPOSECPP_SHARED_API virtual String get_Action() = 0;
48 ASPOSECPP_SHARED_API String get_ContentType();
51 ASPOSECPP_SHARED_API void set_ContentType(String value);
57 ASPOSECPP_SHARED_API SoapMessageStage get_Stage();
63 ASPOSECPP_SHARED_API void SetStream(System::SharedPtr<System::IO::Stream> stream);
66 ASPOSECPP_SHARED_API virtual String get_Url() = 0;
69 ASPOSECPP_SHARED_API String get_ContentEncoding();
72 ASPOSECPP_SHARED_API void set_ContentEncoding(String value);
75 ASPOSECPP_SHARED_API bool get_IsSoap12();
78 ASPOSECPP_SHARED_API virtual SoapProtocolVersion get_SoapVersion();
82
84 ASPOSECPP_SHARED_API SoapMessage();
85
88 ASPOSECPP_SHARED_API void SetStage(SoapMessageStage stage);
92 ASPOSECPP_SHARED_API System::SharedPtr<Object> GetInParameterValue(int32_t index);
96 ASPOSECPP_SHARED_API System::SharedPtr<Object> GetOutParameterValue(int32_t index);
102 ASPOSECPP_SHARED_API void SetHeaders(System::SharedPtr<SoapHeaderCollection> headers);
105 ASPOSECPP_SHARED_API void SetException(SoapException ex);
108 ASPOSECPP_SHARED_API SoapException get_Exception();
113 ASPOSECPP_SHARED_API void CollectHeaders(System::SharedPtr<Object> target,
118 ASPOSECPP_SHARED_API void UpdateHeaderValues(System::SharedPtr<Object> target,
125 const TypeInfo& headerType);
126
127protected:
129 virtual void EnsureInStage() = 0;
131 virtual void EnsureOutStage() = 0;
136
137private:
139 String content_type;
141 String content_encoding;
143 SoapException exception = nullptr;
147 SoapMessageStage stage;
155 SoapProtocolVersion soapVersion;
156};
157
158}}}} // namespace System::Web::Services::Protocols
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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 a particular type and provides information about it.
Definition: type_info.h:109
Represent the SOAP message. Objects of this class should only be allocated using System::MakeObject()...
Definition: soap_message.h:28
virtual void EnsureInStage()=0
Checks if the current stage contains input parameters.
System::SharedPtr< Object > GetInParameterValue(int32_t index)
Gets the input parameter value at the specified index.
System::ArrayPtr< System::SharedPtr< Object > > get_InParameters()
Gets the parameters that are passed into the XML Web service method.
void set_InternalStream(System::SharedPtr< System::IO::Stream > value)
Sets the stream that contains the SOAP message data.
virtual void EnsureOutStage()=0
Checks if the current stage contains output parameters.
System::SharedPtr< Object > GetOutParameterValue(int32_t index)
Gets the output parameter value at the specified index.
virtual SoapProtocolVersion get_SoapVersion()
Returns the SOAP version that is used.
System::SharedPtr< SoapHeaderMapping > FindHeader(System::ArrayPtr< System::SharedPtr< SoapHeaderMapping > > headersInfo, const TypeInfo &headerType)
Find the header mapping by specified header type.
String get_ContentType()
Gets a value of the 'Content-Type' header.
void set_ContentType(String value)
Sets a value of the 'Content-Type' header.
String get_ContentEncoding()
Gets a value of the 'Content-Encoding' header.
void SetHeaders(System::SharedPtr< SoapHeaderCollection > headers)
Sets the collection of the SOAP headers.
System::SharedPtr< SoapHeaderCollection > get_Headers()
Returns the collection of the SOAP headers.
System::SharedPtr< Object > GetReturnValue()
Gets the return value of the XML Web service method.
void set_InParameters(System::ArrayPtr< System::SharedPtr< Object > > value)
Sets the parameters that are passed into the XML Web service method.
SoapMessageStage get_Stage()
Gets the processing stage of a SOAP message.
bool get_IsSoap12()
Returns a value that indicates if SOAP version 1.2 is used.
void SetStream(System::SharedPtr< System::IO::Stream > stream)
Sets the stream that contains the SOAP message data.
System::ArrayPtr< System::SharedPtr< Object > > get_OutParameters()
Gets the output parameters passed into the XML Web service method.
void EnsureStage(SoapMessageStage stage)
Checks if the current stage is equal to the specified one.
void set_OutParameters(System::ArrayPtr< System::SharedPtr< Object > > value)
Sets the output parameters passed into the XML Web service method.
void SetException(SoapException ex)
Sets the exception that is thrown by the XML Web service method.
void set_ContentEncoding(String value)
Sets a value of the 'Content-Encoding' header.
virtual String get_Url()=0
Returns the XML Web service URL.
void SetStage(SoapMessageStage stage)
Sets the processing stage of the SOAP message.
SoapException get_Exception()
Gets the exception that is thrown by the XML Web service method.
void CollectHeaders(System::SharedPtr< Object > target, System::ArrayPtr< System::SharedPtr< SoapHeaderMapping > > headers, SoapHeaderDirection direction)
Sets the internal collection of the SOAP headers.
SoapMessage()
Constructs a new instance.
System::SharedPtr< System::IO::Stream > get_Stream()
Gets the stream that contains the SOAP message data.
void UpdateHeaderValues(System::SharedPtr< Object > target, System::ArrayPtr< System::SharedPtr< SoapHeaderMapping > > headersInfo)
Updates the internal collection of the SOAP headers.
virtual String get_Action()=0
Returns a value of the 'SOAPAction' attribute.
SoapHeaderDirection
Enumerates the SOAP header directions.
Definition: soap_header_direction.h:9
SoapProtocolVersion
Enumerates the versions of SOAP.
Definition: soap_protocol_version.h:7
SoapMessageStage
Enumerates the processing stages of the SOAP messages.
Definition: soap_message_stage.h:10
Definition: db_command.h:9