jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes XML - Java Communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML - Java Communication" Watch "XML - Java Communication" New topic

XML - Java Communication

ramdas pradeep kumar
Ranch Hand

Joined: Aug 27, 2003
Posts: 36
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

Joined: Jan 23, 2002
Posts: 11962
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.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: XML - Java Communication
It's not a secret anymore!