| Author |
URGENT Help Needed regarding the sending XML file to the JMS Queue
|
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
|
|
Dear All,
I am new to the JMS technology. I have written one sample sender and receiver program to pass a string message to the JMS queue and retrieve it back. It is working fine as well. But now, I want to pass a xml file to the JMS queue. Then from there I need to print the contents of the xml file by reading it.
I tried a lot by googling it, but did not get a proper solution for this issue. Request you all to help me to resolve this issue. I am using weblogic 9.2 server.
|
Cheers,
Keerthi Kumar N
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
What have you written so far? What exceptions or unexpected behaviour is occurring?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
|
|
Hi,
I just have one sample XML file. So, instead of sending a simple text message to the queue, now I need to send this XML file to the queue and retrieve back the same and display the contents of the XML file. Below is the program for sending the text message to the JMS queue.Request you to please help me to send the XML file by using the below program
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
This might be a good example.
|
 |
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
|
|
Hi Paul,
Thanks a lot for your mail. The sample link which you had sent me works fine. But my requirement is to send the xml file (physically) to the JMS queue and retrieve it back as xml only. So, please guide me to achieve the same.
Thanks i advance !
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
What do you mean by "send physically"?
JMS supports a bunch of message types. You can use a different type (e.g. and ObjectMessage or BytesMEssage) if you like, but sending XML as text makes the most sense to me.
|
 |
Udara Amarasinghe
Ranch Hand
Joined: Aug 17, 2009
Posts: 109
|
|
Hi Keerthi,
As the paul says you can do this.
You can read XML file and copy it in to a JMSText message and send it to a message queue that you want. And in that massage receiver you can implement to read that JMSText message(XML copied) and convert it into a XML file.
|
 |
 |
|
|
subject: URGENT Help Needed regarding the sending XML file to the JMS Queue
|
|
|