File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Sending XML over HTTP to Another Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply locked New topic

Sending XML over HTTP to Another Application

Ajoo Dar

Joined: Dec 14, 2009
Posts: 5
I have 2 web application ClientA and ServerB. On ClientA application My requirement is I need to read an XML from a file system and then send it to
ServerB. This XML needs to be sent to ServerB over HTTP or HTTPs. HTTP is enough right now. When ServerB receives the XML, it will
do some basic validation, say for example one of the validation is if it is well formed. If everything is fine it will send response back to

Input Message:
<?xml version="1.0" encoding="ISO-8859-1"?>
<message>Send me Amount details</message>

Syschronous Response:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Status code="201" text="Accepted">Acknowledged</Status>

Requirement 2:

On the server side I need to create a thread or a process which will read say n number of XMLs and send asychronously to ClientA.

<?xml version="1.0" encoding="ISO-8859-1"?>

How can it be done? Any thought on this.... I want to use Java/Servlets... or if we can use webservices or JMS. I want to do it using Java technology
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
It is sorta covered in the JavaRanch Style Guide.
subject: Sending XML over HTTP to Another Application
It's not a secret anymore!