File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Web Services
Author
FileNotFoundException Response 500
bhuvan sundar
Ranch Hand
Joined: Mar 02, 2005
Posts: 104
posted
Apr 13, 2006 01:20:00
0
Hello Ranchers,
I try to invoke a web service using
HttpURLConnection
. I get the following error while reading back the response:
java.io.FileNotFoundException
: Response: '500' for url
Code snippet:
HttpURLConnection connection = (HttpURLConnection)url.openConnection(); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestProperty("Content-Type","text/xml; charset=utf-8"); connection.setRequestMethod("POST"); OutputStream out = connection.getOutputStream(); out.write(b);//b is a byte array that has the input xml BufferedWriter outxml = new BufferedWriter(new FileWriter("output.txt")); BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStrream())));
Please help me in resolving this soooon...
Thanks in advance..
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35439
9
posted
Apr 14, 2006 03:05:00
0
In which line of code does this happen?
Android apps
–
ImageJ plugins
–
Java web charts
bhuvan sundar
Ranch Hand
Joined: Mar 02, 2005
Posts: 104
posted
Apr 17, 2006 07:39:00
0
The error was coming while trying to get input stream from the connection.
I found out the reason for the error. The SOAP action was not being set properly though the statement was
connection.setRequestProperty("SOAPAction",SOAPAction);
After setting this properly, I got the response.
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: FileNotFoundException Response 500
Similar Threads
Servlet call another context
Invoking webservice- Server returned HTTP response code: 500
how to wait my class for the servlet response
java.io.IOException: Server returned HTTP response code: 400
Issue with sending xml jaxb object to servlet body
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter