• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exchanging XML Data between two Web Apps

 
Pramod Chris
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Pramod Chris
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!