Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using servlet to recieve XML files

 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your swing client should speak HTTP using URLConnection.
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic