aspose file tools*
The moose likes JSP and the fly likes How to write XML Requests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to write XML Requests" Watch "How to write XML Requests" New topic
Author

How to write XML Requests

Bashar Abdullah
Greenhorn

Joined: Mar 29, 2005
Posts: 14
Hi,

I need to integrate to a system using XML API. I basically need to send XML request and receive the response. I can't seem to find useful resources on this, although I am sure I came across some before.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
The web is loaded with examples for various XML based protocols, but before we send you to one we need to know one thing:

What protocol is the system you need to integrate with expecting?

Bill
Bashar Abdullah
Greenhorn

Joined: Mar 29, 2005
Posts: 14
Sorry for the late reply. It's a normal HTTP XML Post request and returns XML response.
Bashar Abdullah
Greenhorn

Joined: Mar 29, 2005
Posts: 14
I came across this url:
http://e-docs.bea.com/wls/docs81/xml/xml_tech.html

It is giving me FileNotFound errors though upon reading response. If you have any good references that would be helpful.

Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Ok - you have the simplest possible situation, just sending an XML formatted string in the body of a request and getting one back. Here is some code I used one time to do this where reqStr is the XML string already in memory and "response" is a String variable:



Bill
Bashar Abdullah
Greenhorn

Joined: Mar 29, 2005
Posts: 14
Thanks. Thats almost what I had, but now I am sure I am on the right track.
 
wood burning stoves
 
subject: How to write XML Requests