• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML - Java Communication

 
ramdas pradeep kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
How to send XML message from a JAVA application and get response in XML format from a webpage?
Thanks for reading this.
[ August 28, 2003: Message edited by: ramdas pradeep kumar ]
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the client side:
1) Open an HTTP connection to the web server's IP address
2) Write an HTTP request message having the XML document as body into the connection's output stream
3) Read the HTTP response message from the connection's input stream
There are some libraries for simplifying this to some degree...
On the server side:
Write a HttpServlet and implement its doPost(...) method in such a way that it parses the body as an XML document, performs necessary computation, and writes a response XML message into the response's body.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic