thanks Morgan. I missed seeing the Format was blank; and also the utility sample IBM provides does not add the format to be MQSTR.
Original Message:
Sent: Tue September 19, 2023 01:18 AM
From: Morag Hughson
Subject: Codepage support in MQ REST api
Hi Om,
You appear to be suffering from a different problem. This thread is about string messages in different codepages. Your message is a binary message not a string message.
I expect when you put the message with the SimplePut.exe executable you probably intended it to be a string message, but its format is blank (which means binary) and the REST API only supports string messages. Perhaps you can correct the SimplePut.exe executable to fill in the MQMD Format field correctly, or use another application to put your test message that already puts MQSTR as the value in the MQMD Format field. amqsput is one such example application.
Then try retrieving that message with the REST API.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Tue September 19, 2023 12:55 AM
From: om prakash
Subject: Codepage support in MQ REST api
Was this ever solved?
I have used the sample dotnet vb SimplePut example to write to a queue; and then using MQ 9.3.3 REST API for messaging; and it fails as
{ "error": [ { "msgId": "MQWB0309E", "action": "Resubmit the request, correcting any issues.", "completionCode": 0, "reasonCode": 0, "type": "rest", "message": "MQWB0309E: The received or browsed message type is unsupported by the mqweb server.", "explanation": "The mqweb server successfully received an MQ message, but was of an unsupported message type." } ]}
and when using `amqsbcgc` the output is
AMQSBCG0 - starts here********************** MQOPEN - 'TEST.QUEUE.1' MQGET of message number 1, CompCode:0 Reason:0****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 1200 Format : ' ' Priority : 0 Persistence : 0 MsgId : X'414D5120415050543032202020202020C55AC26401C47AA7' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QM1 ' ** Identity Context UserIdentifier : 'user1 ' AccountingToken : X'160105150000007E46FCF3D997C6E2B1A0FF3F97DD000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : 'ePut\bin\Debug\SimplePut.exe' PutDate : '20230919' PutTime : '04395225' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1'**** Message **** length - 24 of 24 bytes00000000: 7400 6500 7300 7400 2000 6D00 6500 7300 't.e.s.t. .m.e.s.'00000010: 7300 6100 6700 6500 's.a.g.e. ' No more messages MQCLOSE MQDISC
------------------------------
om prakash
Original Message:
Sent: Wed August 26, 2020 02:05 AM
From: Dan Kalmar
Subject: Codepage support in MQ REST api
The CURL trace shows the data is sent up with correct hex values.
The MQWEB server log however has the message data already converted with x'3F' instead the double byte
hebrew characters.
Still a mystery where the data gets altered on the way.