Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Web Services
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
Web Services
FileNotFoundException Response 500
bhuvan sundar
Ranch Hand
Posts: 104
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Rancher
Posts: 43081
77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In which line of code does this happen?
bhuvan sundar
Ranch Hand
Posts: 104
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Issue with sending xml jaxb object to servlet body
Invoking webservice- Server returned HTTP response code: 500
how to wait my class for the servlet response
Servlet call another context
java.io.IOException: Server returned HTTP response code: 400
More...