• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URGENT Help Needed regarding the sending XML file to the JMS Queue

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you written so far? What exceptions or unexpected behaviour is occurring?
 
Keerthi Kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might be a good example.
 
Keerthi Kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 109
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic