| Author |
Exchanging XML Data between two Web Apps
|
Pramod Chris
Greenhorn
Joined: Oct 15, 2004
Posts: 21
|
|
Hi, I need to pass some data from a JSP in one application to another in XML format.I don't want a physical XML file to be created and then read. Can I wrap the data in java in such a way that I can parse it on the other end as an XML and read it? And I'm totally new to this area, Thanks in advance, Pramod.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 11862
|
|
The XML parsers in Java are very flexible - you can turn a document into a stream of characters on the sending side and parse it on the receiving side without ever writing a file. Just take a look at the javax.xml.transform.stream package for inspiration. There are many ways of making the connection, from plain old sockets to Java Message Service. Do these communicating applications reside on the same machine? same network? always run at the same time? Bill
|
Java Resources at www.wbrogden.com
|
 |
Pramod Chris
Greenhorn
Joined: Oct 15, 2004
Posts: 21
|
|
Thanks Mr. Brogden. Looks like javax.xml.transform.stream package has all the answers I need for putting my XML into a stream. I'm working on the implementation right now. And the applications do run always, but may not be on the same network. They could be running on two different servers on two different networks. And also I need to know if I can achieve all of this just over plain HTTP? I want to make it as simple as possible. Thanks again, Regards, Pramod.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 11862
|
|
I expect that you will be able to handle the data exchange with simple HTTP connections. You might run into firewall and security issues, but that is true for any communication technology. Bill
|
 |
 |
|
|
subject: Exchanging XML Data between two Web Apps
|
|
|