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 » MQGET RFH2 data that contains Unicode

Post new topic  Reply to topic Goto page Previous  1, 2
 MQGET RFH2 data that contains Unicode « View previous topic :: View next topic » 
Author Message
arthurlwf
PostPosted: Tue Feb 26, 2008 10:52 pm    Post subject: Reply with quote

Newbie

Joined: 25 Feb 2008
Posts: 8

fjb_saper wrote:
XMS/JMS look for a good understanding on how JMS works with MQ (see using java manual). XMS works in a very similar way...

Enjoy


Thanks for the reply.
By any chance do you have any reference site on XMS sample code for further understanding?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 27, 2008 1:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

arthurlwf wrote:
1) Do I need to install XMS library everytime the Dll is utilize to integrate to Websphere MQ?


How many software packages don't require you to install them before use?

arthurlwf wrote:

2) Any idea where to find XMS sample code to put and retrieve RFH2 msg? It seems there are very limited info on XMS in google.


Because XMS is an IBM support pack (where JMS is an entire standard) the only information is that on the IBM site, and what's in here.

And if you're still talking about "RFH2 msg" then IMHO you've still not really grasped what this kind of message is and how you manipulate it.

Spend some time with the Using Java manual, and a good reference source on JMS. Use this knowledge to illuminate XMS (which is a JMS-style wrapper for non-Java).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
arthurlwf
PostPosted: Wed Feb 27, 2008 10:37 pm    Post subject: Reply with quote

Newbie

Joined: 25 Feb 2008
Posts: 8

Tried XMS but got error msg box at the code "sess = conn.createSession();". The error state "Unhandled exception at 0x7c59bc81 in PUT.exe: Microsoft C++ exception xms::Exception at memory location 0x0012ee94.

Here is the simple code:
#include "xms.hpp"

using namespace std;

int main(int argc, char *argv[])
{
xms::ConnectionFactory cf;
xms::Connection conn;
xms::Session sess;
xms::Session sess2;

cf.setIntProperty(XMSC_CONNECTION_TYPE, XMSC_CT_RTT);
cf.setIntProperty(XMSC_RTT_CONNECTION_PROTOCOL, XMSC_RTT_CP_TCP);
cf.setStringProperty(XMSC_RTT_HOST_NAME, "localhost");
cf.setIntProperty(XMSC_RTT_PORT, 1414);

conn = cf.createConnection();
sess = conn.createSession();

sess2 = sess;

sess2.setStringProperty("property", "test");

if (sess2.isNull() != xmsTRUE)
{
xms::Session sess3 = sess2;
sess3.setStringProperty("another property", "test");
}
sess.close();

if (sess2.isNull() == xmsTRUE)
{
cout << "invalid session" << endl;
}
return (0);
}
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 28, 2008 1:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

arthurlwf wrote:
Tried XMS but got error msg box at the code "sess = conn.createSession();". The error state "Unhandled exception at 0x7c59bc81 in PUT.exe: Microsoft C++ exception xms::Exception at memory location 0x0012ee94.


What did you do next? In terms of C++ debugging?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 28, 2008 2:39 pm    Post subject: Reply with quote

Grand High Poobah

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

The work needs to be done within a try catch block.

Don't know that the session would take any properties. Have you tried to have the session create a message and set the properties on the message?

Right way to create a session (JMS):
Verify in the XMS manual but I doubt it will differ by much...
conn.createQueueSession(boolean, Session.PROPERTY)

boolean stands for transacted property (true/false)
Session.PROPERTY is usually defaulted to Session.AUTO_ACKNOWLEDGE

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ API Support » MQGET RFH2 data that contains Unicode
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.