Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

it_bus_config/mq_wsdl_port.h

00001 #ifndef _IT_BUS_CONFIG_MQ_WSDL_PORT_H_
00002 #define _IT_BUS_CONFIG_MQ_WSDL_PORT_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <stdio.h>
00008 #include <it_bus/exception.h>
00009 #include <it_bus/binary_buffer.h>
00010 #include <it_bus/sequence_complex_type.h>
00011 #include <it_bus_pdk/xml_helper.h>
00012 #include <it_bus_pdk/messaging_transport.h>
00013 #include <it_bus_config/endpoint_address.h>
00014 #include <it_bus_config/mq_wsdl_extension_element.h>
00015 
00016 namespace IT_MQ
00017 {
00018     const IT_Bus::QName MQ_CONNECTION_CONTEXT_TYPE("","MQConnectionAttributesType","http://schemas.iona.com/transports/mq");
00019     const IT_Bus::QName MQ_MESSAGE_CONTEXT_TYPE("","MQMessageAttributesType","http://schemas.iona.com/transports/mq");
00020 
00025     class IT_MQ_API MQConfiguration :
00026         public MQWSDLExtensionElement,
00027         public IT_Bus::EndpointAddress,
00028         public IT_Bus::SequenceComplexType
00029     {
00030     public:
00031 
00032         MQConfiguration();
00033 
00034         MQConfiguration(
00035             const IT_Bus::QName& element_name
00036         );
00037 
00038         MQConfiguration(
00039             IT_WSDL::WSDLExtensibleNode* parent
00040         );
00041 
00042         MQConfiguration(
00043             const MQConfiguration& copyThis
00044         );
00045 
00046         virtual
00047         ~MQConfiguration();
00048 
00052         const MQConfiguration&
00053         operator = (
00054             const MQConfiguration& assignThis
00055         );
00056 
00057         //
00058         // AnyType (base of WSDLExtensionElement) methods.
00059         //
00060 
00061         virtual const IT_Bus::QName&
00062         get_type() const;
00063 
00064         virtual void
00065         read(
00066             const IT_Bus::QName& element_name,
00067             IT_Bus::ComplexTypeReader& reader
00068         ) throw((IT_Bus::DeserializationException));
00069 
00070         virtual void
00071         write(
00072             const IT_Bus::QName& element_name,
00073             IT_Bus::ComplexTypeWriter& writer
00074         ) const throw((IT_Bus::SerializationException));
00075 
00076         virtual IT_Bus::AnyType&
00077         copy(
00078             const IT_Bus::AnyType& rhs
00079         );
00080 
00081         //
00082         // WSDLNode (base of WSDLExtensionElement) methods.
00083         //
00084 
00085         virtual void
00086         write(
00087             IT_Bus::XMLOutputStream& stream
00088         ) const throw((IT_Bus::IOException));
00089 
00090         //
00091         // WSDLExtenionsElement methods.
00092         //
00093 
00094         virtual bool
00095         parse(
00096             const IT_Bus::XMLIterator& element_iterator,
00097             const IT_Bus::XMLNode& element,
00098             IT_WSDL::WSDLErrorHandler& error_handler
00099         );
00100 
00101         virtual
00102         IT_WSDL::WSDLExtensionElement*
00103         clone() const;
00104 
00105         virtual
00106         IT_WSDL::WSDLExtensionElement*
00107         clone_unique(
00108             const IT_Bus::QName& name
00109         ) const;
00110 
00111         virtual bool
00112         export_to_client() const;
00113 
00114         //
00115         // XMLNode methods.
00116         //
00117 
00118         virtual void
00119         write_attributes(
00120             IT_Bus::XMLOutputStream& stream
00121         ) const throw((IT_Bus::IOException));
00122 
00123         //
00124         // EndpointAddress methods.
00125         //
00126 
00127         const IT_Bus::String&
00128         get_location() const;
00129 
00130         void
00131         set_location(
00132             const IT_Bus::String& location
00133         );
00134 
00135         //
00136         // SequenceComplexType methods.
00137         //
00138 
00139         virtual void
00140         read_contents(
00141             IT_Bus::ComplexTypeReader& os
00142         ) throw((IT_Bus::DeserializationException));
00143 
00144         virtual void
00145         write_contents(
00146             IT_Bus::ComplexTypeWriter& os
00147         ) const throw((IT_Bus::SerializationException));
00148 
00149         virtual void
00150         write_attributes(
00151             IT_Bus::ComplexTypeWriter& writer
00152         ) const throw((IT_Bus::SerializationException));
00153 
00154         virtual void
00155         read_attributes(
00156             IT_Bus::ComplexTypeReader& reader
00157         ) throw((IT_Bus::DeserializationException));
00158 
00159         //
00160         // MQConfiguration methods.
00161         //
00162 
00163         void initialize(
00164             const IT_Bus::XMLIterator& Configuration
00165         );
00166 
00167         void initialize(
00168             IT_Bus::XMLHelper& Configuration
00169         );
00170 
00171         void
00172         initialize_from_url(
00173             const IT_Bus::String& strURL
00174         );
00175 
00176         void
00177         initialize_from_file(
00178             const IT_Bus::String& strFile
00179         );
00180 
00181         virtual
00182         void set_soap_action(
00183             const IT_Bus::String & action
00184         );
00226         IT_Bus::String       m_ConnectionName;
00227         IT_Bus::String       m_QueueManagerName;
00228         IT_Bus::String       m_IsQueueManagerRemote;
00229         IT_Bus::String       m_QueueName;
00230         IT_Bus::String       m_ReplyQueueManagerName;
00231         IT_Bus::String       m_IsReplyQueueManagerRemote;
00232         IT_Bus::String       m_ReplyQueueName;
00233         IT_Bus::String       m_AliasQueueName;
00234 
00235         IT_Bus::String       m_ApplicationIdData;
00236         IT_Bus::String       m_ApplicationOriginData;
00237         IT_Bus::String       m_UserIdentifier;
00238 
00239         IT_Bus::BinaryBuffer m_MessageId;
00240         IT_Bus::BinaryBuffer m_CorrelationId;
00241 
00242         IT_Bus::String       m_ModelQueueName;
00243         IT_Bus::String       m_Timeout;
00244         IT_Bus::String       m_MessageExpiry;
00245         IT_Bus::String       m_MessagePriority;
00246         IT_Bus::String       m_AccessMode;
00247         IT_Bus::String       m_UsageStyle;
00248         IT_Bus::String       m_KeepReplyQueue;
00249         IT_Bus::String       m_CorrelationStyle;
00250         IT_Bus::String       m_ConnectionFastPath;
00251         IT_Bus::String       m_ConnectionReusable;
00252         IT_Bus::String       m_DeliveryMode;
00253         IT_Bus::String       m_TransactionalParticipation;
00254         IT_Bus::String       m_ReportOption;
00255         IT_Bus::String       m_FormatOption;
00256         IT_Bus::String       m_Convert;
00257         IT_Bus::String       m_AccountingToken;
00258         IT_Bus::String       m_ServerClient;
00259         bool                 m_IsServerTransport;
00260         bool                 m_PropogateTransactions;
00261 
00262       private:
00263         IT_Bus::String       m_location;
00264 
00265         void
00266         initialize_location();
00267     };
00268 
00272     typedef enum
00273     {
00274         usagePeer = 0,
00275         usageRequester = 1,
00276         usageResponder = 2
00277     } UsageStyle;
00278 
00282     typedef enum
00283     {
00284         correlationNone = 0,
00285         correlationMessageId = 1,
00286         correlationId = 2,
00287         correlationNewGUID = 3,
00288         correlationMessageIdCopy = 4
00289     } CorrelationStyle;
00290 
00294     typedef enum
00295     {
00296         mqOpen = 0,
00297         mqClose = 1,
00298         mqRecv = 2,
00299         mqPeek = 3,
00300         mqSend = 4,
00301         mqBegin = 5,
00302         mqCommit = 6,
00303         mqAbort = 7,
00304         mqConnect = 8,
00305         mqDisconnect = 9,
00306         mqShutdown = 10
00307     } MQAction;
00308 
00312     typedef enum
00313     {
00314         resultSuccess = 0,
00315         resultError = 1,
00316         resultShutdown = 2,
00317         resultFatal = 3,
00318         resultPending = 4
00319     } MQThreadResult;
00320 
00324     typedef enum
00325     {
00326         mqtxnNo = 0,
00327         mqtxnYes = 1,
00328         mqtxnXATM = 2
00329     } MQTransactionalParticipation;
00330 
00331     const IT_Long MQ_ERROR_PENDING = -1;
00332     const IT_Long INFINITE_WAIT = -1;
00333 }
00334 
00335 //(SYSTEM.DEFAULT.MODEL.QUEUE) default model queue
00336 
00337 // queue path name
00338 #define ATTRIBUTE_QUEUE_NAME                    "QueueName"
00339 // queue path name
00340 #define ATTRIBUTE_QUEUE_MANAGER                 "QueueManager"
00341 #define ATTRIBUTE_IS_QUEUE_MANAGER_REMOTE       "IsQueueManagerRemote"
00342 // reply queue path name
00343 #define ATTRIBUTE_REPLY_QUEUE_NAME              "ReplyQueueName"
00344 // alias queue path name
00345 #define ATTRIBUTE_ALIAS_QUEUE_NAME              "AliasQueueName"
00346 // reply queue path name
00347 #define ATTRIBUTE_REPLY_QUEUE_MANAGER           "ReplyQueueManager"
00348 #define ATTRIBUTE_IS_REPLY_QUEUE_MANAGER_REMOTE "IsReplyQueueManagerRemote"
00349 // queue path name
00350 #define ATTRIBUTE_MODEL_QUEUE_NAME              "ModelQueueName"
00351 
00352 // connection name (connection ID)
00353 #define ATTRIBUTE_CONNECTION_NAME               "ConnectionName"
00354 // queue access mode
00355 #define ATTRIBUTE_ACCESS_MODE                   "AccessMode"
00356 // enable notification timeout
00357 #define ATTRIBUTE_TIMEOUT                       "Timeout"
00358 // message ID
00359 #define ATTRIBUTE_MSG_ID                        "MessageID"
00360 // correlation ID
00361 #define ATTRIBUTE_COR_ID                        "CorrelationID"
00362 
00363 // application ID data
00364 #define ATTRIBUTE_APPLICATION_ID_DATA           "ApplicationIdData"
00365 
00366 // application origin dara
00367 #define ATTRIBUTE_APPLICATION_ORIGIN_DATA       "ApplicationOriginData"
00368 
00369 // user identifier
00370 #define ATTRIBUTE_USER_IDENTIFIER               "UserIdentifier"
00371 
00372 #define ATTRIBUTE_MESSAGE_EXPIRY                "MessageExpiry"
00373 #define ATTRIBUTE_MESSAGE_PRIORITY              "MessagePriority"
00374 #define ATTRIBUTE_CONVERT                       "Convert"
00375 #define ATTRIBUTE_ACCOUNTING_TOKEN              "AccountingToken"
00376 #define ATTRIBUTE_REPLYQUEUE_KEEP               "ReplyQueueKeep"
00377 #define ATTRIBUTE_SERVER_CLIENT                 "Server_Client"
00378 
00379 #define OUTBOUND_METADATA_NAMESPACE             "OutboundMetaData"
00380 
00381 // Access mode values
00382 
00383 #define ACC_PEEK_MODE                           "peek"
00384 #define ACC_SEND_MODE                           "send"
00385 #define ACC_RECEIVE_MODE                        "receive"
00386 #define ACC_RECEIVE_MODE_EXCLUSIVE              "receive exclusive"
00387 #define ACC_RECEIVE_MODE_SHARED                 "receive shared"
00388 
00389 
00390 // Default timeout value
00391 
00392 #define DEFAULT_TIMEOUT         (-1)
00393 
00394 // Usage Model
00395 #define ATTRIBUTE_USAGE_STYLE           "UsageStyle"
00396 #define USAGE_PEER                      "PEER"
00397 #define USAGE_REQUESTER                 "REQUESTER"
00398 #define USAGE_RESPONDER                 "RESPONDER"
00399 
00400 // Correlation Strategy
00401 #define ATTRIBUTE_CORRELATION_STYLE     "CorrelationStyle"
00402 #define CORRELATION_NONE                "none"
00403 #define CORRELATION_MESSAGEID           "messageId"
00404 #define CORRELATION_ID                  "correlationId"
00405 #define CORRELATION_NEW_GUID            "new guid"
00406 #define CORRELATION_MESSAGEID_COPY      "messageId copy"
00407 
00408 //Connection Style
00409 #define ATTRIBUTE_CONNECTION_REUSABLE   "ConnectionReusable"
00410 #define ATTRIBUTE_CONNECTION_FASTPATH   "ConnectionFastPath"
00411 
00412 //delivery
00413 #define ATTRIBUTE_DELIVERY              "Delivery"
00414 #define DELIVERY_EXPRESS                "not persistent"
00415 #define DELIVERY_RECOVERABLE            "persistent"
00416 
00417 //transactional participation
00418 #define ATTRIBUTE_TRANSACTIONAL         "Transactional"
00419 #define TRANSACTIONAL_NO                "none"
00420 #define TRANSACTIONAL_YES               "internal"
00421 #define TRANSACTIONAL_MANAGER           "xa"
00422 #define PROPOGATE_TRANSACTIONS          "PropogateTransactions"
00423 
00424 //Administrative Acknowledgements
00425 #define ATTRIBUTE_REPORT_OPTION         "ReportOption"
00426 #define REPORT_NONE                     "none"
00427 #define REPORT_COA                      "coa"
00428 #define REPORT_COD                      "cod"
00429 #define REPORT_EXCEPTION                "exception"
00430 #define REPORT_EXPIRATION               "expiration"
00431 #define REPORT_DISCARD                  "discard"
00432 
00433 // Format options
00434 // formatting options for message presently STRING or NONE
00435 #define ATTRIBUTE_FORMAT_OPTION         "Format"
00436 #define FMT_FORMAT_NONE                 "none"
00437 #define FMT_FORMAT_STRING               "string"
00438 #define FMT_FORMAT_EVENT                "event"
00439 #define FMT_FORMAT_PROGRAMMABLE_COMMAND "programmable command"
00440 #define FMT_FORMAT_UNICODE              "unicode"
00441 #define FMT_FORMAT_IMS                  "ims"
00442 #define FMT_FORMAT_IMS_VAR_STRING       "ims_var_string"
00443 
00444 // used for sending SwA messages over MQ.
00445 // Only supported by Artix.
00446 //
00447 #define FMT_FORMAT_SWA                  "IONASWA1"
00448 
00449 #endif  

Generated on Wed Mar 22 12:23:12 2006 for Artix by  doxygen 1.3.9.1