Author |
Message
|
eoe |
Posted: Fri Sep 21, 2007 4:37 am Post subject: Exchanging XML Files |
|
|
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 |
|
 |
jefflowrey |
Posted: Fri Sep 21, 2007 6:00 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Sat Sep 22, 2007 4:21 am Post subject: Re: Exchanging XML Files |
|
|
 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 |
|
 |
eoe |
Posted: Wed Sep 26, 2007 2:54 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Sep 26, 2007 3:16 am Post subject: |
|
|
 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 |
|
 |
eoe |
Posted: Thu Sep 27, 2007 10:13 pm Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Thu Sep 27, 2007 11:07 pm Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Fri Sep 28, 2007 2:28 am Post subject: |
|
|
 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 |
|
 |
|