This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes XML writing and reading to an URl 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 » Java » I/O and Streams
Bookmark "XML writing and reading to an URl" Watch "XML writing and reading to an URl" New topic
Author

XML writing and reading to an URl

Ajith George
Ranch Hand

Joined: Dec 22, 2005
Posts: 109
i was trying to submit xml data to a url. and try to read the same using stream reader. But as i read the server is returning internal server error. i am attaching the code here.



Please help me out.
Thanks in advance.


SCJP 1.4, Brainbench
LinkedIn - Blog
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Since it's the server that's crashing, it's the server that has the problem -- at least in its error handling, if not more.

But you can might start by flushing and closing the PrintWriter before trying to read the response!


[Jess in Action][AskingGoodQuestions]
Ajith George
Ranch Hand

Joined: Dec 22, 2005
Posts: 109
i flushed and closed the print writer ......but the result same. Is there any other way to read the response. Am i doing it right?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML writing and reading to an URl
 
Similar Threads
Streaming PDF, Connecion Error
Read XML output from a URL
Unable to read the Japanese character from HTTP Response
Unable to access URL using HttpURLConnection
servlet response