A HTTP 500 error means that there is a serious and unhandled problem in the server side code.
In case of a Java webapplication, this generally means that there's an exception been thrown. If you don't see it (fully) in the error page itself (read the response), you normally can find the complete exception details and the trace back in the appserver's logs. This information should be enough to solve the problem yourself.
Joined: Apr 06, 2009
Thanks for the reply. I finally found some hint on Tomcat that indicates a "Premature enf of file" SAXParseException, which allowed me to figure out that when the servlet reads:
No data is being read, which means that for some reason, the jaxb object that is supposed to be written to the ouput stream on the client is not written. I am not sure why. Any suggestions would be great. I deugged the jaxb object and I know that it is not null and has data. Am I not writing correctly on the client?
Joined: Oct 08, 2006
You need to flush and close the outputstream. It's apparently buffered.
If that doesn't help, try invoking URLConnection#getInputStream().
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Issue with sending xml jaxb object to servlet body