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

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