aspose file tools*
The moose likes Servlets and the fly likes servlet and messaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet and messaging" Watch "servlet and messaging" New topic
Author

servlet and messaging

Gerome Kawa
Ranch Hand

Joined: Dec 05, 2002
Posts: 61
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
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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...


42
Gerome Kawa
Ranch Hand

Joined: Dec 05, 2002
Posts: 61
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
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


- 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.


  • JavaRanch FAQ HowToAskQuestionsOnJavaRanch
    Gerome Kawa
    Ranch Hand

    Joined: Dec 05, 2002
    Posts: 61
    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.
    Mark Spritzler
    ranger
    Sheriff

    Joined: Feb 05, 2001
    Posts: 17259
        
        6

    "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


    Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
    How to Ask Questions the Smart Way FAQ
     
     
    subject: servlet and messaging