The global variables @@msgheader and @@msgproperties are set with XML <msgheader> and <msgproperties> documents that contain the header and properties of the returned message. This section specifies the format of those documents.
The general format of a <msgheader> and <msgproperties> document for properties named PROPERTY_1, PROPERTY_2, and so on has the form described by the DTD templates in the following syntax section.
<!DOCTYPE msgheader [ <!ELEMENT msgheader EMPTY> <!ATTLIST property_1 CDATA> <!ATTLIST property_2 CDATA> etc. <!DOCTYPE msgproperties [ <!ELEMENT msgproperties EMPTY> <!ATTLIST property_1 CDATA> <!ATTLIST property_2 CDATA>
These examples show <msgheader> or <msgproperties> documents for two select statements:
select msgsend('Sending message with properties', 'my_ems_provider?queue=queue.sample', message property 'color=red, shape=square')
select msgrecv('my_ems_provider?queue=queue.sample')
select rtrim (@@msgproperties)
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <msgproperties RTMS_MSGBODY_FORMAT=''string'' ASE_RTMS_CHARSET='1' ASE_RTMS_VERSION=''1.0'' ASE_VERSION=''12.5.0.0'' shape=''square'' color=''red'' > </msgproperties>
select rtrim (@@msgheader)
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <msgheader type=''null'' timestamp='1080092021000' replyto=''queue.sample'' redelivered='false' priority='4' messageid=''ID:E4EMS-SERVER.73018656B39:1'' ttl='0' destination=''queue.sample'' mode='2' correlation=''null'' encoding=''null'' > </msgheader>
A <msgheader> or <msgproperties> document for a specified message contains one attribute for each property of the message header or the message properties. The name of the attribute is the name of the property, and the value of the attribute is the string value of the property.
The values of attributes in <msgheader> or <msgproperties> documents are replaced with XML entities. msgpropvalue and msgpropname implicitly replace XML entities with attribute values.
A <msgheader> or <msgproperties> document generated by msgrecv or msgconsume has an XML declaration that specifies the character set of the properties.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |