aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML - Java Communication" Watch "XML - Java Communication" New topic
Author

XML - Java Communication

ramdas pradeep kumar
Ranch Hand

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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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
 
Similar Threads
transform XML file (via XSLT) in a JAVA app
Accessing Web Session variable in a Java class
XML based interface
Sending XML messages to Websphere MQ
Illegal XML character �