it_bus_config/http_wsdl_address.h

00001 #ifndef _IT_BUS_CONFIG_HTTP_WSDL_ADDRESS_H_
00002 #define _IT_BUS_CONFIG_HTTP_WSDL_ADDRESS_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #ifndef IT_MINIMISE_INCLUDES
00008 #include <it_wsdl/wsdl_port.h>
00009 #endif
00010 #include <it_ts/mutex.h>
00011 #include <it_bus_config/http_wsdl_extension_element.h>
00012 #include <it_bus_config/endpoint_address.h>
00013 #include <it_bus/sequence_complex_type.h>
00014 
00015 namespace IT_WSDL
00016 {
00017     class WSDLPort;
00018 }
00019 namespace IT_HTTP
00020 {
00021     class HttpWSDLExtensionFactory;
00022     
00027     class IT_BUS_API HTTPWSDLAddress :
00028         public IT_HTTP::HttpWSDLExtensionElement,
00029         public IT_Bus::EndpointAddress,
00030         public IT_Bus::SequenceComplexType
00031     {
00032 
00033       public: 
00034         HTTPWSDLAddress(
00035             IT_HTTP::HttpWSDLExtensionFactory * factory,
00036             IT_WSDL::WSDLExtensibleNode *      parent
00037         );
00038 
00039         HTTPWSDLAddress();
00040 
00041         virtual
00042         ~HTTPWSDLAddress();
00043 
00044         bool
00045         parse(
00046             const IT_Bus::XMLIterator &         element_iterator,
00047             const IT_Bus::XMLNode &     element,
00048             IT_WSDL::WSDLErrorHandler & error_handler
00049         );
00050 
00058         const IT_Bus::String&
00059         get_url() const;
00060 
00066         void
00067         set_url(
00068             const IT_Bus::String & location
00069         );
00070 
00071         const IT_Bus::String&
00072         get_method() const;
00073 
00074         void
00075         set_method(
00076             const IT_Bus::String & method
00077         );
00078 
00085         virtual void
00086         write(
00087             IT_Bus::XMLOutputStream & stream
00088         ) const throw((IT_Bus::IOException));
00089 
00095         virtual void
00096         write_attributes(
00097             IT_Bus::XMLOutputStream & stream
00098         ) const throw((IT_Bus::IOException));
00099 
00100         virtual bool
00101         export_to_client() const
00102         {
00103             return true;
00104         }
00105 
00112         virtual void
00113         read(
00114             const IT_Bus::QName&        element_name,
00115             IT_Bus::ComplexTypeReader & reader
00116         ) throw((IT_Bus::DeserializationException));
00117 
00124         virtual void
00125         write(
00126             const IT_Bus::QName&        element_name,
00127             IT_Bus::ComplexTypeWriter & writer
00128         ) const throw((IT_Bus::SerializationException));
00129 
00130         /*
00131          * SequenceComplexType virtual methods.
00132          */
00133 
00134         virtual void
00135         read_contents(
00136             IT_Bus::ComplexTypeReader & os
00137         ) throw((IT_Bus::DeserializationException));
00138 
00139         virtual void
00140         write_contents(
00141             IT_Bus::ComplexTypeWriter & os
00142         ) const throw((IT_Bus::SerializationException));
00143 
00144         virtual void
00145         write_attributes(
00146             IT_Bus::ComplexTypeWriter & writer
00147         ) const throw((IT_Bus::SerializationException));
00148 
00149         virtual void
00150         read_attributes(
00151             IT_Bus::ComplexTypeReader & reader
00152         ) throw((IT_Bus::DeserializationException));
00153 
00154         virtual const IT_Bus::QName &
00155         get_type() const;
00156 
00157         virtual
00158         IT_Bus::AnyType&
00159         copy(
00160             const IT_Bus::AnyType & rhs
00161         );
00162 
00163         HTTPWSDLAddress& operator=(
00164             const HTTPWSDLAddress& rhs
00165         );
00166 
00180         virtual
00181         IT_WSDL::WSDLExtensionElement*
00182         clone() const;
00183         
00199         virtual
00200         IT_WSDL::WSDLExtensionElement*
00201         clone_unique(
00202             const IT_Bus::QName& name
00203         ) const;
00204 
00212         static HTTPWSDLAddress*
00213         get_from_port(
00214             const IT_WSDL::WSDLPort& wsdl_port
00215         );
00216 
00224         virtual const IT_Bus::String& 
00225         get_location() const
00226         {
00227           return get_url();
00228         }
00229 
00230         void
00231         set_location(
00232             const IT_Bus::String& location
00233         );
00234         
00235         void
00236         set_default_port(
00237             unsigned long default_port
00238         );
00239 
00240         unsigned long
00241         get_default_port() const;
00242 
00243       protected:
00244 
00245         void
00246         replace_zero_port_in_url();
00247 
00248         IT_Bus::String  m_url;
00249         IT_Bus::String  m_method;
00250         unsigned long   m_default_port;
00251 
00252         IT_Mutex        m_lock;
00253     };
00254 }
00255 
00256 #endif  

Generated on Tue Mar 20 15:27:44 2007 for Artix by  doxygen 1.5.1-p1