Author |
Message
|
SKAT |
Posted: Thu Nov 03, 2005 6:02 am Post subject: XML Parsing Output Error |
|
|
Novice
Joined: 15 Aug 2005 Posts: 24
|
Hi folks,
has anybody an idea why the char Ö becomes Ö when parsed to my MQNode Output.
Trace node just after my eqsl and before output queue
Code: |
(0x01000010):XML = (
(0x01000000):TicketJourney = (
(0x01000000):Ticket = (
(0x01000000):IssuingAgentDivision = (
(0x06000028):ISDV = 'Finland ÖR'
)
)
)
)
|
In the output queue
Code: |
<TicketJourney>
<Ticket>
<IssuingAgentDivision>Finland ÖR</IssuingAgentDivision>
</Ticket>
</TicketJourney>
|
Why should ÖR becomes ÖR
Regards
SKAT |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 03, 2005 6:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Is your XML originally in a different character set than UTF-8? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
SKAT |
Posted: Thu Nov 03, 2005 6:12 am Post subject: |
|
|
Novice
Joined: 15 Aug 2005 Posts: 24
|
No, it is using 1208/273 which is UTF-8
Find the header received in trace node
Code: |
(0x01000000):Properties = (
(0x03000000):MessageSet = 'HKVHDF4002001'
(0x03000000):MessageType = 'TicketJourney'
(0x03000000):MessageFormat = 'XML1'
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2005-11-03 13:57:46.720'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 4
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'RAWDATA_IN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 4
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51204d51454149314553202020204336e58f200bd902'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'MQS '
(0x03000000):UserIdentifier = 'wbi '
(0x03000000):AccountingToken = X'0332303800000000000000000000000000000000000000000000000000000006'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 6
(0x03000000):PutApplName = ' '
(0x03000000):PutDate = DATE '2005-11-03'
(0x03000000):PutTime = GMTTIME '13:57:46.720'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
|
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 03, 2005 6:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So, your MQMD indicates that the message contains another header, the MQRFH2.
The CCSID on that header will contain the info about the next section of the message, which is hopefully the CCSID of the data part of the message.
But you didn't post the trace of the MQRFH2.
And can you show us the headers of the message on the queue, using something like amqsbcg? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
SKAT |
Posted: Thu Nov 03, 2005 7:56 am Post subject: |
|
|
Novice
Joined: 15 Aug 2005 Posts: 24
|
Yes, there is another MQRFH2 header , see below
Code: |
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'xml'
)
(0x01000000):Set = (
(0x02000000): = 'HKVHDF4002001'
)
(0x01000000):Type = (
(0x02000000): = 'TicketJourney'
)
(0x01000000):Fmt = (
(0x02000000): = 'XML1'
)
)
(0x01000000):jms = (
(0x01000000):Dst = (
(0x02000000): = 'queue:///RAWDATA_IN_TMP'
)
(0x01000000):Tms = (
(0x02000000): = '1131026266721'
)
(0x01000000):Dlv = (
(0x02000000): = '2'
)
)
(0x01000000):usr = (
(0x01000000):WSDLBinding = (
(0x02000000): = 'ImageFileAgentDeliveryBinding'
)
(0x01000000):WSDLOperation = (
(0x02000000): = 'ImageFileCreate'
)
(0x01000000):PrivacyLevel = (
(0x02000000): = 'None'
)
(0x01000000):MessageType = (
(0x02000000): = 'ImageFile'
)
)
)
|
Also the Input Queue shows this with amqsbcg
Code: |
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQHRF2 '
Priority : 4 Persistence : 1
MsgId : X'414D51204D51454149314553202020204336E58F200BDC02'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQS '
** Identity Context
UserIdentifier : 'wbiuser '
AccountingToken :
X'0332303800000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : ' '
PutDate : '20051103' PutTime : '16071892'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 9601 bytes
00000000: 5246 4820 0000 0002 0000 01A4 0000 0111 'RFH .......¤....'
00000010: 0000 04B8 4D51 5354 5220 2020 0000 0000 '...¸MQSTR ....'
00000020: 0000 04B8 0000 0054 3C6D 6364 3E3C 4D73 '...¸...T<mcd><Ms'
00000030: 643E 786D 6C3C 2F4D 7364 3E3C 5365 743E 'd>xml</Msd><Set>'
00000040: 496D 6167 6546 696C 653C 2F53 6574 3E3C 'ImageFile</Set><'
00000050: 5479 7065 3E49 6D61 6765 4669 6C65 3C2F 'Type>ImageFile</'
00000060: 5479 7065 3E3C 466D 743E 4377 584D 4C3C 'Type><Fmt>CwXML<'
00000070: 2F46 6D74 3E3C 2F6D 6364 3E20 0000 0068 '/Fmt></mcd> ...h'
00000080: 3C6A 6D73 3E3C 4473 743E 7175 6575 653A '<jms><Dst>queue:'
00000090: 2F2F 2F44 4556 5F52 4144 4953 5F53 4952 '///DEV_ADIS_SIR'
000000A0: 4158 5F44 4149 4C59 5F52 4157 4441 5441 'AX_DAILY_RAWDATA'
000000B0: 5F49 4E5F 544D 503C 2F44 7374 3E3C 546D '_IN_TMP</Dst><Tm'
000000C0: 733E 3131 3331 3033 3430 3338 3931 383C 's>1131034038918<'
000000D0: 2F54 6D73 3E3C 446C 763E 323C 2F44 6C76 '/Tms><Dlv>2</Dlv'
000000E0: 3E3C 2F6A 6D73 3E20 0000 00B8 3C75 7372 '></jms> ...¸<usr'
000000F0: 3E3C 5753 444C 4269 6E64 696E 673E 496D '><WSDLBinding>Im'
00000100: 6167 6546 696C 6541 6765 6E74 4465 6C69 'ageFileAgentDeli'
00000110: 7665 7279 4269 6E64 696E 673C 2F57 5344 'veryBinding</WSD'
00000120: 4C42 696E 6469 6E67 3E3C 5753 444C 4F70 'LBinding><WSDLOp'
00000130: 6572 6174 696F 6E3E 496D 6167 6546 696C 'eration>ImageFil'
00000140: 6543 7265 6174 653C 2F57 5344 4C4F 7065 'eCreate</WSDLOpe'
00000150: 7261 7469 6F6E 3E3C 5072 6976 6163 794C 'ration><PrivacyL'
00000160: 6576 656C 3E4E 6F6E 653C 2F50 7269 7661 'evel>None</Priva'
00000170: 6379 4C65 7665 6C3E 3C4D 6573 7361 6765 'cyLevel><Message'
00000180: 5479 7065 3E49 6D61 6765 4669 6C65 3C2F 'Type>ImageFile</'
00000190: 4D65 7373 6167 6554 7970 653E 3C2F 7573 'MessageType></us'
000001A0: 723E 2020 3C3F 786D 6C20 7665 7273 696F 'r> <?xml versio'
000001B0: 6E3D 2231 2E30 2220 656E 636F 6469 6E67 'n="1.0" encoding'
000001C0: 3D22 5554 462D 3822 3F3E 0A3C 5131 3A49 '="UTF-8"?>.<Q1:I'
000001D0: 6D61 6765 4669 6C65 0A78 6D6C 6E73 3A51 'mageFile.xmlns:Q'
000001E0: 313D 2268 7474 703A 2F2F 7777 772E 6962 '1="http://www.ib'
000001F0: 6D2E 636F 6D2F 7765 6273 7068 6572 652F 'm.com/websphere/'
00000200: 6372 6F73 7377 6F72 6C64 732F 3230 3032 'crossworlds/2002'
00000210: 2F42 4F53 6368 656D 612F 496D 6167 6546 '/BOSchema/ImageF'
00000220: 696C 6522 2076 6572 7369 6F6E 3D22 332E 'ile" version="3.'
00000230: 302E 3022 2076 6572 623D 2243 7265 6174 '0.0" verb="Creat'
00000240: 6522 206C 6F63 616C 653D 2265 6E5F 5553 'e" locale="en_US'
00000250: 2220 6465 6C74 613D 2266 616C 7365 223E '" delta="false">'
00000260: 0A3C 5131 3A41 7474 7269 6275 7465 733E '.<Q1:Attributes>'
00000270: 0A20 203C 5132 3A4D 4F5F 496D 6167 6546 '. <Q2:MO_ImageF'
00000280: 696C 6541 7474 7269 6275 7465 7320 786D 'ileAttributes xm'
00000290: 6C6E 733A 5132 3D22 6874 7470 3A2F 2F77 'lns:Q2="http://w'
000002A0: 7777 2E69 626D 2E63 6F6D 2F77 6562 7370 'ww.ibm.com/websp'
000002B0: 6865 7265 2F63 726F 7373 776F 726C 6473 'here/crossworlds'
000002C0: 2F32 3030 322F 424F 5363 6865 6D61 2F4D '/2002/BOSchema/M'
000002D0: 4F5F 496D 6167 6546 696C 6541 7474 7269 'O_ImageFileAttri'
000002E0: 6275 7465 7322 2076 6572 7369 6F6E 3D22 'butes" version="'
000002F0: 332E 302E 3022 2076 6572 623D 2243 7265 '3.0.0" verb="Cre'
00000300: 6174 6522 206C 6F63 616C 653D 2265 6E5F 'ate" locale="en_'
00000310: 5553 2220 6465 6C74 613D 2266 616C 7365 'US" delta="false'
00000320: 223E 0A20 2020 203C 5132 3A49 6E46 696C '">. <Q2:InFil'
00000330: 654E 616D 653E 2F76 6172 2F6D 716D 2F6A 'eName>/var/mqm/j'
00000340: 7465 7874 2F53 6972 6178 442F 6674 706C 'text/AxD/ftpl'
00000350: 6F63 616C 6576 656E 7473 2F65 7272 6461 'ocalevents/errda'
00000360: 696C 7932 385F 322E 6461 743C 2F51 323A 'ily28_2.dat</Q2:'
00000370: 496E 4669 6C65 4E61 6D65 3E0A 2020 3C2F 'InFileName>. </'
00000380: 5132 3A4D 4F5F 496D 6167 6546 696C 6541 'Q2:MO_ImageFileA'
00000390: 7474 7269 6275 7465 733E 0A3C 2F51 313A 'ttributes>.</Q1:'
000003A0: 4174 7472 6962 7574 6573 3E0A 3C51 313A 'Attributes>.<Q1:'
000003B0: 496D 6167 653E 2020 2020 2020 2020 2020 'Image> '
00000700: 2020 2020 2020 2623 3130 3B31 3030 3030 ' 10000'
00000710: 3030 3032 3433 3136 3030 3134 3030 3130 '0002431600140010'
00000720: 3153 3130 3533 3231 3737 3535 3636 3920 '1S1053217755669 '
00000730: 2020 2020 2020 2020 2020 2020 2054 2020 ' T '
00000740: 3030 3332 3137 3735 3536 3639 2020 2020 '003217755669 '
00000750: 2020 2020 2020 2020 2032 3030 3530 3331 ' 2005031'
00000760: 3020 3139 3230 3035 3534 4649 4E20 2020 '0 19200554FIN '
00000770: 2020 2020 4449 4649 4E20 2020 2020 2020 ' DIFIN '
00000780: 5245 4669 6E6C 616E 6420 2020 C396 5241 'REFinland Ã.RA'
|
As you can see at the last end in code, the input char is already converted as REFinland Ã. in the incomming XML.
The outgoing xml has same conversion but I want to get the original in xml
as Ö. Is this possible ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 03, 2005 7:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, if it's already converted before it gets to you, the problem is upstream somewhere.
It might be easier to fix it upstream, rather than trying to repair it downstream.
Certainly, you can use SUBSTRING, REPLACE, POSITION, and etc. to correct the characters. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|