Forums Register Login

servlet and messaging

+Pie Number of slices to send: Send
Hi
I want to develop a small application with the following requirement:

I need a servlet(or any java program) which will run in tomcat, waiting to receive XML files form another application B. Once an XML message is received my application will store the XML in a database and send back a message to B.

I am lost about where to start and how to go ahead.
Will it be possible for anyone to give me some idea, sketch, skeleton of how to go ahead ?

Your help will be deeply appreciated.

Thanks
Kawa
+Pie Number of slices to send: Send
you've described the inner workings of your servlet quite well. Now all you have to do is translate it into code.

That part is your job, if you run into trouble with well specified parts of that process people will be happy to give you assistance for those specific problems but don't expect us to write the whole thing for you...
+Pie Number of slices to send: Send
I want to know do I need to use JMS (I haven't used it before)?

- What do i need to write to receive XML ?
- How do I write it to dB ( Do I need to write entity bean for this? )
- How do i send a message back to the sender (app B) that the an XML is received ?

I am not asking someone to write it for me , but I would like someone to drive and give me some input of how to go about with it .


Thanks
+Pie Number of slices to send: Send
 


- What do i need to write to receive XML ?
- How do I write it to dB ( Do I need to write entity bean for this? )
- How do i send a message back to the sender (app B) that the an XML is received ?


  • have a look at javax.jms.TextMessage, plus javax.jms.Topic or javax.jms.Queue
  • You don't need an Entity Bean, though feel free to use one if you like. You may also consider JDBC, JDO or an ORM layer (Toplink, Hibernate etc.)
  • Read javax.jms.Message. It covers how delivery can be acknowleded.

  • +Pie Number of slices to send: Send
    Does anybody know of any link which shows how to read an file(XML), acknowledge receipt and store the file in a folder in the filesystem.
    +Pie Number of slices to send: Send
    "G Kawa"-
    Welcome to the JavaRanch! Please adjust your displayed name to meet the

    JavaRanch Naming Policy.

    You can change it

    here.

    Thanks! and welcome to the JavaRanch!

    Mark
    Hug your destiny! And hug this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 660 times.
    Similar Threads
    TreeMap Insanity (or is that me?)
    Implementation of Security in Java
    Financial Year Table
    Referencing JSP files in WEB-INF folder
    Encapsulation problem
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Apr 16, 2024 05:44:36.