Author |
Message
|
Woody |
Posted: Mon Dec 01, 2008 6:42 am Post subject: Unable to retrieve application properties with XMS |
|
|
Newbie
Joined: 01 Dec 2008 Posts: 3
|
I am currently developing a .net application that retrieves JMS messages from a WebsphereMQ queue. The messages are placed onto the queue via a java web service. The messages contain a user-defined application property that is a string. When I get the message off of the using xms the property is no longer in the message. I can browse the message on the queue using MQExplorer and see the property in the message, but when I get it from the queue with XMS the property is no longer in the message. If I make a call to get the string property it just returns null and I can see the property in the properties collection when viewing the message in debug. I have supplied some lines of the trace log below. Can someone please tell me what I am doing wrong or what could cause this issue? Thanks.
I have ran a test app I wrote entirely in .net using XMS to isolate the issue in trace and have the seen the following in the trace logs:
I can see the usr folder when the message is sent to the queue:
Code: |
[28/11/2008 16:21:44:252210 Eastern Standard Time] 00007468 d UOW= source=IBM.XMS.WMQ.WmqMessageBase org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
CreateFolderUsr() : folder value = <usr><SERVICE_NAME>TEST_SERVICE</SERVICE_NAME></usr>
[28/11/2008 16:21:44:252210 Eastern Standard Time] 00007468 < UOW= source=IBM.XMS.WMQ.WmqMessageBase method=CreateFolderUsr() [:] org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
exit
[28/11/2008 16:21:44:252210 Eastern Standard Time] 00007468 d UOW= source=IBM.XMS.WMQ.WmqMessageBase org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
CreateFolderUsrAsBytes() resultant UTF8 byte[]
Length = 0x34 (52) bytes start=0 count=52
offset : 0 1 2 3 4 5 6 7 8 9 A B C D E F
0x00000000 ( 0) : 3c757372 3e3c5345 52564943 455f4e41 : <usr><SERVICE_NA
0x00000010 ( 16) : 4d453e54 4553545f 53455256 4943453c : ME>TEST_SERVICE<
0x00000020 ( 32) : 2f534552 56494345 5f4e414d 453e3c2f : /SERVICE_NAME></
0x00000030 ( 48) : 7573723e : usr> |
When I get the message off of the queue I am seeing the following error in the trace log:
Code: |
[28/11/2008 16:23:35:391413 Eastern Standard Time] 00010348 d UOW= source=IBM.XMS.WMQ.WmqMsg org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
CreateXMSMessage() : No mcd folder found. Not a real JMS message. Trying to create a suitable WmqMessage.
[28/11/2008 16:23:35:391413 Eastern Standard Time] 00010348 d UOW= source=IBM.XMS.WMQ.WmqMsg org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
CreateXMSMessage() : mcd folder does not exist. messageClass set to be 'text'. |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 01, 2008 3:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
CreateXMSMessage() : No mcd folder found. Not a real JMS message. Trying to create a suitable WmqMessage.
[28/11/2008 16:23:35:391413 Eastern Standard Time] 00010348 d UOW= source=IBM.XMS.WMQ.WmqMsg org=IBM prod=WebSphere component=Message Service Client for .NET thread=[1 : 0]
CreateXMSMessage() : mcd folder does not exist. messageClass set to be 'text'. |
I thought the error text was pretty clear.
The message does not appear to have been created by a JMS Application.
However I would not expect this to be a problem...
Have you tried using the properties iterator and printing out property name and value? Possibly the property name you are looking for and the property name that has been passed do not match 100% and Yes CASE DOES MATTER.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Woody |
Posted: Tue Dec 02, 2008 7:08 am Post subject: |
|
|
Newbie
Joined: 01 Dec 2008 Posts: 3
|
The error text is very clear. The problem is the message was sent from a jms application. I also wrote a .net test app that sent the message using XMS with the same result. I did create an iterator and iterated over all of the properties. The name/value pair was not in the collection. The only properties in the collection were the JMSX properties set by the broker.
I have included a message dump from amqsbcg of the test message on the queue:
Code: |
AMQSBCG0 - starts here
**********************
MQOPEN - 'GregTest'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQHRF2 '
Priority : 4 Persistence : 1
MsgId : X'414D5120514D5F7364656D63636564626E1E304920078F02'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QM_sdemccedbld01 '
** Identity Context
UserIdentifier : 'User123 '
AccountingToken :
X'16010515000000190FBE3AAA6C4C88DD4B3215472D000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '11'
PutApplName : 'g\MessageProducer.vshost.exe'
PutDate : '20081202' PutTime : '15290383'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 222 bytes
00000000: 5246 4820 0200 0000 D000 0000 2202 0000 'RFH ........"...'
00000010: B804 0000 4D51 5354 5220 2020 0000 0000 '....MQSTR ....'
00000020: B804 0000 2000 0000 3C6D 6364 3E3C 4D73 '.... ...<mcd><Ms'
00000030: 643E 6A6D 735F 7465 7874 3C2F 4D73 643E 'd>jms_text</Msd>'
00000040: 3C2F 6D63 643E 2020 4C00 0000 3C6A 6D73 '</mcd> L...<jms'
00000050: 3E3C 4473 743E 7175 6575 653A 2F2F 2F47 '><Dst>queue:///G'
00000060: 7265 6754 6573 743C 2F44 7374 3E3C 546D 'regTest</Dst><Tm'
00000070: 733E 3132 3238 3231 3337 3433 3339 343C 's>1228213743394<'
00000080: 2F54 6D73 3E3C 446C 763E 323C 2F44 6C76 '/Tms><Dlv>2</Dlv'
00000090: 3E3C 2F6A 6D73 3E20 3400 0000 3C75 7372 '></jms> 4...<usr'
000000A0: 3E3C 5345 5256 4943 455F 4E41 4D45 3E54 '><SERVICE_NAME>T'
000000B0: 4553 545F 5345 5256 4943 453C 2F53 4552 'EST_SERVICE</SER'
000000C0: 5649 4345 5F4E 414D 453E 3C2F 7573 723E 'VICE_NAME></usr>'
000000D0: 7468 6973 2069 7320 6120 7465 7374 'this is a test '
No more messages
MQCLOSE
MQDISC
C:\Program Files (x86)\ibm\WebSphere MQ\tools\c\Samples\Bin> |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 02, 2008 3:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
<mcd><Ms'
00000030: 643E 6A6D 735F 7465 7874 3C2F 4D73 643E 'd>jms_text</Msd>'
00000040: 3C2F 6D63 643E 2020 4C00 0000 3C6A 6D73 '</mcd> |
Clearly the mcd folder is present here...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Woody |
Posted: Tue Dec 02, 2008 3:30 pm Post subject: |
|
|
Newbie
Joined: 01 Dec 2008 Posts: 3
|
This appears to be an issue with WebsphereMQ 7. I have been running this against a v7 instance of WebsphereMQ even though it was not explicitly listed in the Support Pack as being supported just to see if it would work. Everything appeared to work fine until I tried to use a jms app defined property. I installed WebsphereMQ 6.0.2.5 and the problem was resolved. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 02, 2008 3:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Woody wrote: |
This appears to be an issue with WebsphereMQ 7. I have been running this against a v7 instance of WebsphereMQ even though it was not explicitly listed in the Support Pack as being supported just to see if it would work. Everything appeared to work fine until I tried to use a jms app defined property. I installed WebsphereMQ 6.0.2.5 and the problem was resolved. |
What value had you set the JMS compatibility to on V7?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|