I am trying to put a message with MQ7 in windows xp. C++ is used. The message is totally fine, but the header gives me a trouble:
<Property name="JMSXAppID" type="STRING">d:\WMQ.exeNUL...NUL</Property>
There are 18 NUL chars, which makes the total length of the put app name to be 28. The xml element is generated from a vendor program by reading the queue. When parsing the xml file, the program will crash. If the NUL chars are removed manually, then the parsing process is ok.
I tried to set the PutAppName before sending the message to the queue, but it does not work. Before calling "put", PutAppName contains 28 null chars. I then tried setPutApplicationType and setPutApplicationName, but none of them works. Other attributes, like ReplyToQMgr and UserIdentifier can be set properly.
What is wrong with my approach? Is there any other way to solve the problem? Let me know if any point is unclear. Thanks.