wood burning stoves 2.0*
The moose likes Servlets and the fly likes Using servlet to recieve XML files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Using servlet to recieve XML files" Watch "Using servlet to recieve XML files" New topic
Author

Using servlet to recieve XML files

Murasoli Maran
Ranch Hand

Joined: Jun 08, 2003
Posts: 193
Hi all,

How to use servlet to recieve XML files and send return XML files to client?.

I mean in my app,the client is not a web brawser.it's a swing client.Swing client use XML to send data to server.So how to send the XML from client to server?.creating a URLConnection and Post method will work for XML files?.

Plz giv me an opinion.
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
Your swing client should speak HTTP using URLConnection.


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
Murasoli Maran
Ranch Hand

Joined: Jun 08, 2003
Posts: 193
Hi Siva,

It'll be a classic

Client view <---> Servlet controller <---> Data Access layer Model <----> Database model.


When XML file reach to controller servlet,It should dispatch the XML file to many javabean classes according to it's purpose.Do you spot anything there?.any suggestiens for creating XML files?.So making controller servlet will be a fun and very niet.

What you think abt it?.Do recomment any other API or web services?.Or Servlet will be good?.Plz suggest.
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
In my opinion, Servlet will be good for this.I wouldn't advice webservices here just for transferring xml files. If you need "remoteness" across hetrogenous platform, then webservices could be a choice.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using servlet to recieve XML files
 
Similar Threads
JavaMail API
sending mail through javamail
Servlet & XML Request-Response
send a xml file to servlet and servlet send back the xml file
About SMTP and ftp(Urgent)