Author |
Message
|
MQSerious |
Posted: Wed Oct 20, 2004 8:23 am Post subject: [SOLVED]^M in UPES Response Message |
|
|
Acolyte
Joined: 29 Mar 2004 Posts: 68 Location: At Large
|
I have a situation where the response XML has CTRL-Ms at the end of each line. This problem is intermittent and I am having a hard time tracing the cause. I am ensuring that my Java program appends CR-LF characters at the end , i.e.:
Code: |
bufferString.append("<tag>foo</tag>" + "\r\n"); |
These ^M characters cause work not to transition to the next activity hence the UPES activity remains in the Running state- I assume MQWF concludes that the response message is invalid due to the blasted ^Ms and waits for a valid response. However, if I force-restart the UPES activity, the response message no longer has the ^Ms and work transitions as expected.
I am running on AIX and using the latest Xerces parser.
Any clues?
Last edited by MQSerious on Thu Nov 04, 2004 11:29 am; edited 2 times in total |
|
Back to top |
|
 |
mike_mq |
Posted: Wed Oct 20, 2004 9:49 am Post subject: |
|
|
Centurion
Joined: 17 Oct 2003 Posts: 123
|
Sometimes, ^M will be appended when you transfer files from Windows to UNIX environment. Check your mode (ANSI or Binary). |
|
Back to top |
|
 |
MQSerious |
Posted: Wed Oct 20, 2004 9:54 am Post subject: |
|
|
Acolyte
Joined: 29 Mar 2004 Posts: 68 Location: At Large
|
Thanks mike_mq. We only use Windoze for modeling. Everything else is running on AIX. |
|
Back to top |
|
 |
nathanw |
Posted: Wed Oct 20, 2004 10:17 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
another problem can be that if yu are going between environments (from your messages you are not) the channels between need to be set to data conversion |
|
Back to top |
|
 |
vennela |
Posted: Wed Oct 20, 2004 10:38 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
What makes you think the problem is with ^M |
|
Back to top |
|
 |
MQSerious |
Posted: Wed Oct 20, 2004 12:48 pm Post subject: |
|
|
Acolyte
Joined: 29 Mar 2004 Posts: 68 Location: At Large
|
The ^M is suspect because every time it appears in the XML, things go ka-boom. |
|
Back to top |
|
 |
vennela |
Posted: Wed Oct 20, 2004 4:00 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
There might be some problem with you parser.
How are you getting the message? Using readString?
AFAIK the line feeds should not cause a problem. |
|
Back to top |
|
 |
MQSerious |
Posted: Thu Oct 21, 2004 5:12 am Post subject: |
|
|
Acolyte
Joined: 29 Mar 2004 Posts: 68 Location: At Large
|
Vennela,
I am using readFully(byte[], int, int). |
|
Back to top |
|
 |
MQSerious |
Posted: Thu Nov 04, 2004 11:27 am Post subject: |
|
|
Acolyte
Joined: 29 Mar 2004 Posts: 68 Location: At Large
|
I now use \r instead of "\r\n". Seems to solve the problem. |
|
Back to top |
|
 |
|