ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » mqmessage.setStringProperty adds dt="string"

Post new topic  Reply to topic
 mqmessage.setStringProperty adds dt="string" « View previous topic :: View next topic » 
Author Message
jrd
PostPosted: Wed May 04, 2011 12:43 pm    Post subject: mqmessage.setStringProperty adds dt="string" Reply with quote

Newbie

Joined: 04 May 2011
Posts: 1

Greetings,

I am completely new to working with MQ but am working on a project where I have a need to put a message with a particular RFH2 Header from a VB.NET application to a queue that is being read by a JMS application.

I have gathered from other posts on similar topics that the easiest way for me to do so is to add a user property using the MQMessage.set__Property methods. However, when I do so, the receiving application is complaining that dt="string" is being added to the header and that I need to put the message without that... I've spent much of the last 2 hours digging through google & scouring the MQ (v7) .NET API documentation to no avail... Is this normal behavior of the api? Is there something I should be doing differently?

Here's a rough sample:

msg = New MQMessage()
msg.SetStringProperty("prop", "val")
q.Put(msg)


and this is what the output looks like in the usr folder
<prop dt="string">val</prop>

any help that can be provided would be appreciated...
Back to top
View user's profile Send private message
shashikanth_in
PostPosted: Wed May 04, 2011 7:54 pm    Post subject: Reply with quote

Centurion

Joined: 26 Feb 2009
Posts: 123

'dt' indicates the data type of the property. I thought JMS handles the user properties well. Below is what I can see in RFHUTIL usr tab.

MyProp(dt="string")=val
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 04, 2011 8:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Do you have somewhere the setting property mode = compat set?
Like in channel or on the queue?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Thu May 05, 2011 3:13 am    Post subject: Re: mqmessage.setStringProperty adds dt="string" Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jrd wrote:
the receiving application is complaining that dt="string" is being added to the header and that I need to put the message without that...

What is the receiving application, how is it parsing the message, and what is the precise appearance of its complaint?
Back to top
View user's profile Send private message
SpongeCode
PostPosted: Sun Jan 25, 2015 1:45 am    Post subject: dt="string" is not necessary needed Reply with quote

Newbie

Joined: 25 Jan 2015
Posts: 3

May I know is there any ways to remove this dt="string"?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 25, 2015 8:23 am    Post subject: Re: dt="string" is not necessary needed Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

SpongeCode wrote:
May I know is there any ways to remove this dt="string"?

Tell the VB.NET application to use the gmo option property in handle and look up the programming that goes with it. It should now be able to retrieve the Value as a message property passing it the property name...
Like in msg.getStringProperty(name)...
Programming for the RFH2 is going to be much more of a hassle then doing it that way...

Alternatively you could look at defining your JMS factory with an MQ level of 6, but as this version is no longer supported and version 7.0 is going out of support in September I would not recommend it...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
SpongeCode
PostPosted: Mon Jan 26, 2015 7:12 pm    Post subject: to get rid of [dt="string"] when creating a send m Reply with quote

Newbie

Joined: 25 Jan 2015
Posts: 3

Thanks fjb_saper for the response.

Sorry for not stating my qns clearly. I am trying to create and send a RFH2 message. However, after created, the attributes in RFH2 usr folder showing the data type, [dt="string"] which I do not want.

For example, instead of
<DataLength>1034</DataLength>
I got this:
<DataLength dt="string" >1034</DataLength>

Is there anyway to get rid of [dt="string"] in the message that I want to send out?

Or is there any field in MQPutMessageOptions that I can set to get rid of [dt="string"] in the message?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 27, 2015 7:55 am    Post subject: Re: to get rid of [dt="string"] when creating a se Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

SpongeCode wrote:
Thanks fjb_saper for the response.

Sorry for not stating my qns clearly. I am trying to create and send a RFH2 message. However, after created, the attributes in RFH2 usr folder showing the data type, [dt="string"] which I do not want.

For example, instead of
<DataLength>1034</DataLength>
I got this:
<DataLength dt="string" >1034</DataLength>

Is there anyway to get rid of [dt="string"] in the message that I want to send out?

Or is there any field in MQPutMessageOptions that I can set to get rid of [dt="string"] in the message?
You can change the type by using the right method like setIntProperty, or get rid of it entirely by not setting message properties but building the RFH header.

I would recommend either setting the right type or/and having the receiving app use properties in handle...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
SpongeCode
PostPosted: Wed Jan 28, 2015 12:50 am    Post subject: to get rid of [dt="string"] when creating a send m Reply with quote

Newbie

Joined: 25 Jan 2015
Posts: 3

Thanks fjb_saper.

I solve this problem by writing the RFH properties instead of setting the message properties.

Setting to other Property type will not solve the issue. only change the data type.
Example: [dt="string"] to [dt="i8"]

Anyway thanks alot!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » mqmessage.setStringProperty adds dt="string"
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.