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 IndexIBM MQ API SupportExchanging XML Files

Post new topicReply to topic
Exchanging XML Files View previous topic :: View next topic
Author Message
eoe
PostPosted: Fri Sep 21, 2007 4:37 am Post subject: Exchanging XML Files Reply with quote

Newbie

Joined: 21 Sep 2007
Posts: 3

Dear all,

next year I must set up an interface between a .Net application (written in C#) and SAP application. It is planed to use JMS to implement the interface between both systems. All needed information is located in already existing XML files. To avoid a lot of parsing activities on both sides, it is required to attach those xml files to a message object. I have no experience with Websphere MQ, and I have never used JMS in a .Net environment. Therefore I would like to know whether it is possible to attach xml files to a message.

Many thanks in advance

Erik
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Sep 21, 2007 6:00 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It depends on what you mean by "files" and by "attach".

It is possible to write the content of a file into an MQ message, regardless of whether the content of the file is XML data or not.

It is possible to do this without doing any parsing of any of the content of the file.

It is possible to use Reference Messages to pass files from one MQ system to another, without writing the contents of the file into an MQ message.

It's a significantly better idea to have the .NET application create the messages directly instead of writing it to files. I am assuming that the XML data changes regularly?

It's generally very annoying to code programs that read files that are being processed by other applications. There's no good way to know when the file is ready to be picked up.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Sep 22, 2007 4:21 am Post subject: Re: Exchanging XML Files Reply with quote

Grand High Poobah

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

eoe wrote:
Dear all,

next year I must set up an interface between a .Net application (written in C#) and SAP application. It is planed to use JMS to implement the interface between both systems. All needed information is located in already existing XML files. To avoid a lot of parsing activities on both sides, it is required to attach those xml files to a message object. I have no experience with Websphere MQ, and I have never used JMS in a .Net environment. Therefore I would like to know whether it is possible to attach xml files to a message.

Many thanks in advance

Erik


You should look into J# and possibly code your interface to netweaver JMS there. Depending on your implementation of SAP and your systems configuration you may / or may not use MQ in the middle.

If you want to stay on C# there is a support pack for MQ called XMS to provide a JMS like interface for non Java languages... You should look into it.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
eoe
PostPosted: Wed Sep 26, 2007 2:54 am Post subject: Reply with quote

Newbie

Joined: 21 Sep 2007
Posts: 3

Thanks for your replies.

Today, I tried to setup my development environment in order to be able to develop the needed communication platform to exchange data between my system and a Websphere MQ server (this server is used as a kind of middleware between SAP and other applications). After I had downloaded and installed the “IBM Message Service Client for .NET”, I’m not quite sure, whether this package is the correct one for me. I just need a set of dll’s to integrate the JMS functions into my VS project. I read some other articles, where amqmdnet.dll is used for this purpose. Then I tried out an example provided on codeproject that contains that dll. By running the example I got the error massage that another dll (mqic32.dll) is still missing.

Can you please give some information, how to set up my development environment? I believe that I already have all information to access a JMS queue (Host, name of queue, port, channel, mq manager), but I don’t know where to find all required assembly’s to use the exiting api. It is therefore a prerequisite to install a Websphere MQ client on my pc?

Thanks in advance

Erik
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 26, 2007 3:16 am Post subject: Reply with quote

Grand High Poobah

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

You need to install the full MQClient.
Like the .NET stuff will not run without the .NET framework the MQStuff will not run without the full MQClient install.

MQ Client is a support pack too. (and has no licence fee)

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
eoe
PostPosted: Thu Sep 27, 2007 10:13 pm Post subject: Reply with quote

Newbie

Joined: 21 Sep 2007
Posts: 3

Thanks for this hint. Now I got it work.
Can you tell me, whether it is better to use XMS or the basic IBM.WMQ classes? At the moment I’m using IBM.WMQ. I was able to put a message into a queue, but it seems that there is now way to add an event listener to a queue to get new messages. Therefore I’m doing this job like this

While (not stop condition)
{
Get(Message),
doSomeTask(Message)
}

Is this procedure correct? Right now I always get an error code 2033 (no messages available), but I’m quite sure, that there are messages in the queue.

Best regards

Erik
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 27, 2007 11:07 pm Post subject: Reply with quote

Grand High Poobah

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

eoe wrote:
Right now I always get an error code 2033 (no messages available), but I’m quite sure, that there are messages in the queue.


Make sure you clear out the old message before you read the new one & you've no match options set.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 28, 2007 2:28 am Post subject: Reply with quote

Grand High Poobah

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

eoe wrote:
Thanks for this hint. Now I got it work.
Can you tell me, whether it is better to use XMS or the basic IBM.WMQ classes? At the moment I’m using IBM.WMQ. I was able to put a message into a queue, but it seems that there is now way to add an event listener to a queue to get new messages. Therefore I’m doing this job like this

While (not stop condition)
{
Get(Message),
doSomeTask(Message)
}

Is this procedure correct? Right now I always get an error code 2033 (no messages available), but I’m quite sure, that there are messages in the queue.

Best regards

Erik

The biggest difference between base and XMS (apart from the API) is how you handle the MQRFHx header (where x in [1|2].

This is a standard MQ header that gets put into the payload and holds all custom message properties... and is standard (MQRFH2) in a JMS to JMS message. It can be suppressed by specifying the targetClient property of the destination...

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

MQSeries.net Forum IndexIBM MQ API SupportExchanging XML Files
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.