|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ReadUTF() problem |
« View previous topic :: View next topic » |
Author |
Message
|
Srinivasavs |
Posted: Wed Aug 27, 2003 4:38 am Post subject: ReadUTF() problem |
|
|
Newbie
Joined: 27 Aug 2003 Posts: 5
|
Hi,
i am having a Java agent which is trying to get the messages from a Queue and create documents in Domino.
I am able to get the messages but they are truncated.
Here is the code.
String msgText = new String();
.
.
MQQueue mqQ = qMgr.accessQueue(mqQname, openOptions); .
.
mqQ.get(retrievedMessage,gmo);
msgText = retrievedMessage.readUTF();
Are there any know problems with readUTF(). Is there any limitation on the number of characters that it will return? If so how can I overcome that problem and get the full mesage instead of truncated message?
Thanks in advance |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 27, 2003 5:52 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Srinivas:
Use readString method like this.
Code: |
mqQ.get(retrievedMessage,gmo);
int msgLength = retrievedMessage.getMessageLength() ;
String msgText = retrievedMessage.readString(msgLength);
|
-------
Venny |
|
Back to top |
|
 |
Srinivasavs |
Posted: Thu Aug 28, 2003 12:13 am Post subject: |
|
|
Newbie
Joined: 27 Aug 2003 Posts: 5
|
Thanks for the reply..
It works. But if there is an "enter"/new line in the message. the message is getting truncated. Any solutions?
Thanks again |
|
Back to top |
|
 |
EddieA |
Posted: Thu Aug 28, 2003 6:08 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
MQ won't truncate the message.
My guess is that some code processing the message after retreival thinks that a cr/lf is the end of the data.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Aug 28, 2003 7:31 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You can use the amqsbcg sample program to confirm what the messages are on the queue. It will help point out where the CRLF is getting misplaced. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|