• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help on posting xml over http

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am currently working on an application which is based on client-server architecture.

On Client side:
==========
I have to read data from database and send it to the server.
Currently i am sending data using HTTP POST method (using utf-8 encoding).

But now my problem is:

In database, i have a column of CLOB type which contains xml file. I have to fetch this file and then post it to server through HTTP POST.
Fetching part is done but my problem is how to send this file to server through HTTP POST method?


On Server side i have to parse this xml and need to do some validations.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The transmitted request just needs to specify the mime type correctly and setting the text length correctly is a good idea.

See this Wikipedia page.

For example you want the request headers set like:

Content-Length: (your text size)
Content-Type: application/xml

See java.net.URLConnection.setRequestProperty
Bill
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic