00001 #ifndef _IT_BUS_REFERENCE_H_ 00002 #define _IT_BUS_REFERENCE_H_ 00003 00004 00005 #ifndef IT_MINIMISE_INCLUDES 00006 #include <it_bus/any.h> 00007 #include <it_bus/array_t.h> 00008 #include <it_bus/complex_type_reader.h> 00009 #include <it_bus/complex_type_writer.h> 00010 #endif 00011 #include <it_bus/sequence_complex_type.h> 00012 #include <it_bus/wsaddressing_xsdTypes.h> 00013 #include <it_cal/auto_ptr.h> 00014 00015 #include <it_bus/reflect/element_list_impl_t.h> 00016 #include <it_bus/reflect/model_group_impl.h> 00017 #include <it_bus/reflect/complex_type_impl.h> 00018 #include <it_bus/reflect/reflected_nillable_value.h> 00019 #include <it_bus/reflect/reflected_nillable_ptr.h> 00020 00021 namespace WSDL_Schema 00022 { 00023 class tService; 00024 } 00025 00026 namespace WS_Addressing 00027 { 00028 class EndpointReferenceUtil; 00029 } 00030 00031 namespace IT_Bus 00032 { 00033 class Any; 00034 class AnyType; 00035 class AnyList; 00036 class ReferencePort; 00037 class IT_ReferencePortReflection; 00038 typedef IT_Reflect::ReflectedNillableValue<ReferencePort> ReferencePortNillable; 00039 typedef IT_Reflect::ReflectedNillablePtr<ReferencePort> ReferencePortNillablePtr; 00040 class Reference; 00041 class IT_ReferenceReflection; 00042 typedef IT_Reflect::ReflectedNillableValue<Reference> ReferenceNillable; 00043 typedef IT_Reflect::ReflectedNillablePtr<Reference> ReferenceNillablePtr; 00044 00062 class IT_AFC_API ReferencePort : public IT_Bus::SequenceComplexType 00063 { 00064 00065 public: 00066 00067 static const IT_Bus::QName& 00068 get_static_type(); 00069 00070 typedef IT_ReferencePortReflection IT_ReflectionType; 00071 friend class IT_ReferencePortReflection; 00072 00076 ReferencePort(); 00077 00081 ReferencePort(const ReferencePort & copy); 00082 00086 virtual ~ReferencePort(); 00087 00088 IT_Bus::AnyType & 00089 copy(const IT_Bus::AnyType & rhs); 00090 00091 ReferencePort & 00092 operator=(const ReferencePort & rhs); 00093 00094 virtual const IT_Bus::QName & 00095 get_type() const; 00096 00097 virtual void 00098 write_attributes( 00099 IT_Bus::ComplexTypeWriter & writer 00100 ) const IT_THROW_DECL((IT_Bus::SerializationException)); 00101 00102 virtual void 00103 read_attributes( 00104 IT_Bus::ComplexTypeReader & reader 00105 ) IT_THROW_DECL((IT_Bus::DeserializationException)); 00106 00107 00108 virtual void 00109 write_contents( 00110 IT_Bus::ComplexTypeWriter & writer 00111 ) const IT_THROW_DECL((IT_Bus::SerializationException)); 00112 00113 virtual void 00114 read_contents( 00115 IT_Bus::ComplexTypeReader & reader 00116 ) IT_THROW_DECL((IT_Bus::DeserializationException)); 00117 00125 IT_Bus::AnyList & 00126 get_any(); 00127 00135 const IT_Bus::AnyList & 00136 get_any() const; 00137 00146 void 00147 set_any(const IT_Vector<IT_Bus::Any> & val); 00148 00155 IT_Bus::NCName & 00156 get_name(); 00157 00164 const IT_Bus::NCName & 00165 get_name() const; 00166 00174 void 00175 set_name(const IT_Bus::NCName & val); 00176 00183 IT_Bus::QName & 00184 get_binding(); 00185 00192 const IT_Bus::QName & 00193 get_binding() const; 00194 00202 void 00203 set_binding(const IT_Bus::QName & val); 00204 00205 virtual IT_Reflect::Reflection* 00206 get_reflection() IT_THROW_DECL((IT_Reflect::ReflectException)); 00207 00208 virtual const IT_Reflect::Reflection* 00209 get_reflection() const IT_THROW_DECL((IT_Reflect::ReflectException)); 00210 00211 00212 private: 00213 00214 IT_Bus::AnyList *m_any; 00215 IT_Bus::NCName m_name; 00216 IT_Bus::QName m_binding; 00217 }; 00218 00219 typedef IT_AutoPtr<ReferencePort> ReferencePortPtr; 00220 00221 class IT_AFC_API IT_ReferencePortReflection : 00222 public IT_Reflect::ReflectionImplT<IT_Bus::ReferencePort>, 00223 public IT_Reflect::ComplexTypeImpl, 00224 public IT_Reflect::ModelGroupImpl 00225 { 00226 public: 00227 00228 IT_ReferencePortReflection( 00229 const IT_Bus::ReferencePort* value 00230 ); 00231 00232 ~IT_ReferencePortReflection() IT_THROW_DECL(()); 00233 00234 const IT_Reflect::Reflection* 00235 get_element( 00236 size_t i 00237 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00238 00239 const IT_Reflect::Reflection* 00240 get_element( 00241 const IT_Bus::QName& name 00242 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00243 00244 const IT_Reflect::Reflection* 00245 get_attribute_value( 00246 const IT_Bus::QName& name 00247 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00248 00249 IT_Reflect::Reflection* 00250 use_attribute_value( 00251 const IT_Bus::QName& name 00252 ) IT_THROW_DECL((IT_Reflect::ReflectException)); 00253 00254 void 00255 remove_attribute( 00256 const IT_Bus::QName& name 00257 ) IT_THROW_DECL((IT_Reflect::ReflectException)); 00258 00259 private: 00260 00261 IT_Reflect::Traits<IT_Bus::NCName >::ReflectionType m_name; 00262 IT_Reflect::Traits<IT_Bus::QName >::ReflectionType m_binding; 00263 class IT_ElementNames : 00264 public IT_Vector<IT_Bus::QName> 00265 { 00266 public: 00267 00268 IT_ElementNames(); 00269 00270 }; 00271 00272 static IT_ElementNames _it_sm_element_names; 00273 class IT_AttributeNames : 00274 public IT_Vector<IT_Bus::QName> 00275 { 00276 public: 00277 00278 IT_AttributeNames(); 00279 00280 }; 00281 00282 static IT_AttributeNames _it_sm_attribute_names; 00283 }; 00284 00297 class IT_AFC_API Reference : public IT_Bus::SequenceComplexType 00298 { 00299 00300 public: 00301 00302 static const IT_Bus::QName& 00303 get_static_type(); 00304 00305 typedef IT_ReferenceReflection IT_ReflectionType; 00306 friend class IT_ReferenceReflection; 00307 00311 Reference(); 00312 00313 Reference( 00314 const WS_Addressing::EndpointReferenceType& epr 00315 ); 00316 00317 00321 Reference( 00322 const Reference & copy 00323 ); 00324 00325 00329 virtual ~Reference(); 00330 00331 IT_Bus::AnyType & 00332 copy(const IT_Bus::AnyType & rhs); 00333 00334 Reference & 00335 operator=(const Reference & rhs); 00336 00337 Reference & 00338 operator=( 00339 const WS_Addressing::EndpointReferenceType & rhs 00340 ); 00341 00342 virtual const IT_Bus::QName & 00343 get_type() const; 00344 00345 virtual void 00346 write_attributes( 00347 IT_Bus::ComplexTypeWriter & writer 00348 ) const IT_THROW_DECL((IT_Bus::SerializationException)); 00349 00350 virtual void 00351 read_attributes( 00352 IT_Bus::ComplexTypeReader & reader 00353 ) IT_THROW_DECL((IT_Bus::DeserializationException)); 00354 00355 00356 virtual void 00357 write_contents( 00358 IT_Bus::ComplexTypeWriter & writer 00359 ) const IT_THROW_DECL((IT_Bus::SerializationException)); 00360 00361 virtual void 00362 read_contents( 00363 IT_Bus::ComplexTypeReader & reader 00364 ) IT_THROW_DECL((IT_Bus::DeserializationException)); 00365 00372 IT_Bus::ElementListT<IT_Bus::ReferencePort> & 00373 get_port(); 00374 00381 const IT_Bus::ElementListT<IT_Bus::ReferencePort> & 00382 get_port() const; 00383 00391 void 00392 set_port(const IT_Vector<IT_Bus::ReferencePort> & val); 00393 00401 IT_Bus::QName & 00402 get_service(); 00403 00411 const IT_Bus::QName & 00412 get_service() const; 00413 00421 void 00422 set_service(const IT_Bus::QName & val); 00423 00431 IT_Bus::String & 00432 get_wsdl_location(); 00433 00441 const IT_Bus::String & 00442 get_wsdl_location() const; 00443 00451 void 00452 set_wsdl_location(const IT_Bus::String & val); 00453 00454 virtual IT_Reflect::Reflection* 00455 get_reflection() IT_THROW_DECL((IT_Reflect::ReflectException)); 00456 00457 virtual const IT_Reflect::Reflection* 00458 get_reflection() const IT_THROW_DECL((IT_Reflect::ReflectException)); 00459 00460 private: 00461 00462 const WS_Addressing::EndpointReferenceType& 00463 get_endpoint_reference() const; 00464 00465 WS_Addressing::EndpointReferenceType& 00466 get_endpoint_reference(); 00467 00468 void 00469 get_service_from_epr(); 00470 00471 IT_Bus::ElementListT<IT_Bus::ReferencePort> & 00472 get_port_from_epr(); 00473 00474 void 00475 populate_epr_metadata_from_reference( 00476 WS_Addressing::EndpointReferenceType& epr 00477 ); 00478 00479 IT_Bus::ElementListT<IT_Bus::ReferencePort> m_port; 00480 IT_Bus::QName m_service_name; 00481 IT_Bus::String m_wsdl_location; 00482 WSDL_Schema::tService* m_service; 00483 WS_Addressing::EndpointReferenceType m_endpoint_reference; 00484 bool m_populate_epr_from_reference; 00485 00486 friend class WS_Addressing::EndpointReferenceUtil; 00487 }; 00488 00489 typedef IT_AutoPtr<Reference> ReferencePtr; 00490 00491 class IT_AFC_API IT_ReferenceReflection : 00492 public IT_Reflect::ReflectionImplT<IT_Bus::Reference>, 00493 public IT_Reflect::ComplexTypeImpl, 00494 public IT_Reflect::ModelGroupImpl 00495 { 00496 public: 00497 00498 IT_ReferenceReflection( 00499 const IT_Bus::Reference* value 00500 ); 00501 00502 ~IT_ReferenceReflection() IT_THROW_DECL(()); 00503 00504 const IT_Reflect::Reflection* 00505 get_element( 00506 size_t i 00507 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00508 00509 const IT_Reflect::Reflection* 00510 get_element( 00511 const IT_Bus::QName& name 00512 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00513 00514 const IT_Reflect::Reflection* 00515 get_attribute_value( 00516 const IT_Bus::QName& name 00517 ) const IT_THROW_DECL((IT_Reflect::ReflectException)); 00518 00519 IT_Reflect::Reflection* 00520 use_attribute_value( 00521 const IT_Bus::QName& name 00522 ) IT_THROW_DECL((IT_Reflect::ReflectException)); 00523 00524 void 00525 remove_attribute( 00526 const IT_Bus::QName& name 00527 ) IT_THROW_DECL((IT_Reflect::ReflectException)); 00528 00529 private: 00530 00531 IT_Reflect::Traits<IT_Bus::ElementListT<IT_Bus::ReferencePort> >::ReflectionType m_port; 00532 IT_Reflect::Traits<IT_Bus::QName >::ReflectionType m_service_name; 00533 IT_Reflect::Traits<IT_Bus::String >::ReflectionType m_wsdl_location; 00534 class IT_ElementNames : 00535 public IT_Vector<IT_Bus::QName> 00536 { 00537 public: 00538 00539 IT_ElementNames(); 00540 00541 }; 00542 00543 static IT_ElementNames _it_sm_element_names; 00544 class IT_AttributeNames : 00545 public IT_Vector<IT_Bus::QName> 00546 { 00547 public: 00548 00549 IT_AttributeNames(); 00550 00551 }; 00552 00553 static IT_AttributeNames _it_sm_attribute_names; 00554 }; 00555 00556 bool 00557 IT_AFC_API operator==( 00558 const IT_Bus::ReferencePort & lhs, 00559 const IT_Bus::ReferencePort & rhs 00560 ); 00561 00562 bool 00563 IT_AFC_API operator!=( 00564 const IT_Bus::ReferencePort & lhs, 00565 const IT_Bus::ReferencePort & rhs 00566 ); 00567 00568 bool 00569 IT_AFC_API operator==( 00570 const IT_Bus::Reference & lhs, 00571 const IT_Bus::Reference & rhs 00572 ); 00573 00574 bool 00575 IT_AFC_API operator!=( 00576 const IT_Bus::Reference & lhs, 00577 const IT_Bus::Reference & rhs 00578 ); 00579 00580 bool 00581 IT_AFC_API operator==( 00582 const WS_Addressing::EndpointReferenceType & lhs, 00583 const WS_Addressing::EndpointReferenceType & rhs 00584 ); 00585 } 00586 #endif 00587