I'd suggest having a look at one of the samples in the WMQ installation - called SimpleWMQMDWrite.java
This does use setObjectProperty as follows:
// Generate a custom message id
byte[] customMessageId = new byte[24];
for (int i = 0; i < 24; i++) {
// Hex-string 010203040506070801020304050607080102030405060708
customMessageId[i] = (byte) ((i % 8) + 1);
}
// Write to MQMD.MsgId via JMS_IBM_MQMD_MSGID message property
message.setObjectProperty(WMQConstants.JMS_IBM_MQMD_MSGID, customMessageId);
The error message you've included though doesn't look much like a WMQ JMS error message more WebLogic, wonder if that has wrapped the message object and is doing some additional checking?
M.