00001 #ifndef _TRANSPORT_READABLE_MESSAGE_H_
00002 #define _TRANSPORT_READABLE_MESSAGE_H_
00003
00004
00005
00006
00007 #include <it_bus/operation.h>
00008 #include <it_dsa/vector.h>
00009 #include <it_bus/readable_message.h>
00010 #include <it_bus/binary_buffer.h>
00011
00012
00013 namespace IT_WSDL
00014 {
00015 class WSDLOperation;
00016 class WSDLDefinitions;
00017 }
00018
00019 namespace IT_Bus
00020 {
00021 class MessageReader;
00022
00023 class IT_BUS_API TransportReadableMessage : public ReadableMessage
00024 {
00025 public:
00026
00027 TransportReadableMessage(
00028 MessageType message_type,
00029 MessageReader * message_reader,
00030 const IT_WSDL::WSDLOperation& wsdl_operation
00031 );
00032
00033 virtual
00034 ~TransportReadableMessage();
00035
00036 void
00037 read();
00038
00039 void
00040 read_element_type(
00041 IT_Bus::ServerOperation& operation_handler
00042 );
00043
00044 virtual void
00045 read(
00046 const String& name,
00047 BinaryBuffer & response
00048 );
00049
00050 virtual bool
00051 has_fault();
00052
00053 virtual const QName &
00054 get_message_name();
00055
00056 virtual void
00057 read_fault(
00058 UserFaultException& fault
00059 ) throw((DeserializationException));
00060
00061 virtual void
00062 set_wrapper_element_qname(
00063 const QName& name
00064 );
00065
00066 virtual const QName &
00067 get_wrapper_element_qname();
00068
00069 virtual MessageReader *
00070 get_reader();
00071
00072 virtual const BinaryBuffer&
00073 get_data() throw((NoDataException));
00074
00075 virtual void
00076 set_reader(
00077 MessageReader* message_reader
00078 );
00079
00080 private:
00081 const IT_WSDL::WSDLDefinitions& m_wsdl_definition;
00082 MessageReader * m_message_reader;
00083 MessageType m_message_type;
00084 bool m_is_message_empty;
00085
00086
00087
00088 TransportReadableMessage(const TransportReadableMessage& rhs);
00089 void operator=(const TransportReadableMessage& rhs);
00090 };
00091 }
00092
00093 #endif
00094