ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » TextMessage is NULL

Post new topic  Reply to topic
 TextMessage is NULL « View previous topic :: View next topic » 
Author Message
andrewhirst
PostPosted: Tue Oct 26, 2004 9:17 am    Post subject: TextMessage is NULL Reply with quote

Apprentice

Joined: 06 Jul 2004
Posts: 33
Location: UK

Hello,

A partner's VB app (on NT) is replying to my JMS app (on W2K) via WMQI broker (on Solaris). Using MQExplorer, the message seems to have the XML payload, but when I try and getText() on the message it's null.

The VB app is creating the RFH header.

What is the best practice:

    The VB app should format the reply message to suit the JMS app?
    Let the broker produce a message to suit JMS?
    Don't bother with any formatting and read the message as ByteMessage?

Given the circumstances, what sort of situation would prevent the JMS app from accessing the message body?
My thoughts are some sort of codepage/encoding incompatibility.....

Here is the MQMD of the incoming message:
Code:

****Message descriptor****

  StrucId  : 'MD  '  Version : 2
  Report   : 0  MsgType : 8
  Expiry   : -1  Feedback : 0
  Encoding : 546  CodedCharSetId : 850
  Format : 'MQHRF2  '
  Priority : 0  Persistence : 0
  MsgId : X'414D51204E564953525030312020202078DD774120006701'
  CorrelId : X'414D512047423330363532443120202012EC7D4120001401'
  BackoutCount : 0
  ReplyToQ       : '                                                '
  ReplyToQMgr    : 'NVISRP01                                        '
  ** Identity Context
  UserIdentifier : 'mqm         '
  AccountingToken :
   X'0000000000000000000000000000000000000000000000000000000000000000'
  ApplIdentityData : '                                '
  ** Origin Context
  PutApplType    : '11'
  PutApplName    : ':\DEVELOPMENT\APPS\mqapp.exe'
  PutDate  : '20041026'    PutTime  : '14213011'
  ApplOriginData : '    '

  GroupId : X'000000000000000000000000000000000000000000000000'
  MsgSeqNumber   : '1'
  Offset         : '0'
  MsgFlags       : '0'
  OriginalLength : '-1'


Here is the MQMD for the outgoing request:
Code:

****Message descriptor****

  StrucId  : 'MD  '  Version : 2
  Report   : 0  MsgType : 1
  Expiry   : -1  Feedback : 0
  Encoding : 273  CodedCharSetId : 819
  Format : 'MQHRF2  '
  Priority : 4  Persistence : 1
  MsgId : X'414D512047423330363532443120202012EC7D4120001501'
  CorrelId : X'000000000000000000000000000000000000000000000000'
  BackoutCount : 0
  ReplyToQ       : 'Q.ISR.VEH.DET.RPLY                              '
  ReplyToQMgr    : 'GB30652D1                                       '
  ** Identity Context
  UserIdentifier : 'andrew.hirst'
  AccountingToken :
   X'16010515000000D931F8424D64492E828BA628620B000000000000000000000B'
  ApplIdentityData : '                                '
  ** Origin Context
  PutApplType    : '11'
  PutApplName    : 'es_v4\java\jre\bin\javaw.exe'
  PutDate  : '20041026'    PutTime  : '16420194'
  ApplOriginData : '    '

  GroupId : X'000000000000000000000000000000000000000000000000'
  MsgSeqNumber   : '1'
  Offset         : '0'
  MsgFlags       : '0'
  OriginalLength : '-1'


Many thanks in advance.
_________________
Andrew Hirst
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Oct 26, 2004 9:33 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

We need to see the RFH2 headers as well.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Oct 26, 2004 2:57 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Why have the VB programmer code RFH2 stuff? Have the VB program write JUST the XML payload and set the MQMD.Format to MQSTR.

In the web application's JNDI tree, set the MQQueue's attribute of 'TargClient' to MQ (rather than JMS).

Now the JMS app will get a JMS message (i.e. getText()) with the correct XML payload.

The WMQ JMS libraries will do the converting for you.
Although, your option #2, 'let the broker do it' is just as good.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
andrewhirst
PostPosted: Thu Oct 28, 2004 12:26 am    Post subject: Fixed: Reply with quote

Apprentice

Joined: 06 Jul 2004
Posts: 33
Location: UK

Thanks for your help.

It works, although eventually I had to use BytesMessage because the partner application did not include the format and the developer went on holiday....
_________________
Andrew Hirst
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » TextMessage is NULL
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.