00001 #ifndef _IT_BUS_CONFIG_HTTP_WSDL_ADDRESS_H_
00002 #define _IT_BUS_CONFIG_HTTP_WSDL_ADDRESS_H_
00003
00004
00005
00006
00007 #include <it_ts/mutex.h>
00008 #include <it_bus_config/http_wsdl_extension_element.h>
00009 #include <it_bus_config/endpoint_address.h>
00010 #include <it_wsdl/wsdl_port.h>
00011 #include <it_bus/sequence_complex_type.h>
00012
00013 namespace IT_HTTP
00014 {
00015 class HttpWSDLExtensionFactory;
00016
00021 class IT_BUS_API HTTPWSDLAddress :
00022 public IT_HTTP::HttpWSDLExtensionElement,
00023 public IT_Bus::EndpointAddress,
00024 public IT_Bus::SequenceComplexType
00025 {
00026
00027 public:
00028 HTTPWSDLAddress(
00029 IT_HTTP::HttpWSDLExtensionFactory * factory,
00030 IT_WSDL::WSDLExtensibleNode * parent
00031 );
00032
00033 HTTPWSDLAddress();
00034
00035 virtual
00036 ~HTTPWSDLAddress();
00037
00038 bool
00039 parse(
00040 const IT_Bus::XMLIterator & element_iterator,
00041 const IT_Bus::XMLNode & element,
00042 IT_WSDL::WSDLErrorHandler & error_handler
00043 );
00044
00052 const IT_Bus::String&
00053 get_url() const;
00054
00060 void
00061 set_url(
00062 const IT_Bus::String & location
00063 );
00064
00065 const IT_Bus::String&
00066 get_method() const;
00067
00068 void
00069 set_method(
00070 const IT_Bus::String & method
00071 );
00072
00079 virtual void
00080 write(
00081 IT_Bus::XMLOutputStream & stream
00082 ) const throw((IT_Bus::IOException));
00083
00089 virtual void
00090 write_attributes(
00091 IT_Bus::XMLOutputStream & stream
00092 ) const throw((IT_Bus::IOException));
00093
00094 virtual bool
00095 export_to_client() const
00096 {
00097 return true;
00098 }
00099
00106 virtual void
00107 read(
00108 const IT_Bus::QName& element_name,
00109 IT_Bus::ComplexTypeReader & reader
00110 ) throw((IT_Bus::DeserializationException));
00111
00118 virtual void
00119 write(
00120 const IT_Bus::QName& element_name,
00121 IT_Bus::ComplexTypeWriter & writer
00122 ) const throw((IT_Bus::SerializationException));
00123
00124
00125
00126
00127
00128 virtual void
00129 read_contents(
00130 IT_Bus::ComplexTypeReader & os
00131 ) throw((IT_Bus::DeserializationException));
00132
00133 virtual void
00134 write_contents(
00135 IT_Bus::ComplexTypeWriter & os
00136 ) const throw((IT_Bus::SerializationException));
00137
00138 virtual void
00139 write_attributes(
00140 IT_Bus::ComplexTypeWriter & writer
00141 ) const throw((IT_Bus::SerializationException));
00142
00143 virtual void
00144 read_attributes(
00145 IT_Bus::ComplexTypeReader & reader
00146 ) throw((IT_Bus::DeserializationException));
00147
00148 virtual const IT_Bus::QName &
00149 get_type() const;
00150
00151 virtual
00152 IT_Bus::AnyType&
00153 copy(
00154 const IT_Bus::AnyType & rhs
00155 );
00156
00157 HTTPWSDLAddress& operator=(
00158 const HTTPWSDLAddress& rhs
00159 );
00160
00174 virtual
00175 IT_WSDL::WSDLExtensionElement*
00176 clone() const;
00177
00193 virtual
00194 IT_WSDL::WSDLExtensionElement*
00195 clone_unique(
00196 const IT_Bus::QName& name
00197 ) const;
00198
00206 static HTTPWSDLAddress*
00207 get_from_port(
00208 const IT_WSDL::WSDLPort& wsdl_port
00209 );
00210
00218 virtual const IT_Bus::String&
00219 get_location() const
00220 {
00221 return get_url();
00222 }
00223
00224 void
00225 set_location(
00226 const IT_Bus::String& location
00227 );
00228
00229 void
00230 set_default_port(
00231 unsigned long default_port
00232 );
00233
00234 unsigned long
00235 get_default_port() const;
00236
00237 protected:
00238
00239 void
00240 replace_zero_port_in_url();
00241
00242 IT_Bus::String m_url;
00243 IT_Bus::String m_method;
00244 unsigned long m_default_port;
00245
00246 IT_Mutex m_lock;
00247 };
00248 }
00249
00250 #endif