Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Using servlet to recieve XML files

 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic