Home > http error > error posting xml to page status 500

Error Posting Xml To Page Status 500

Contents

here for a quick overview of the site Help Center Detailed answers to any questions http response example you might have Meta Discuss the workings and policies of http error code this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http code 302 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is

How To Fix Http Error 500

a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up HTTP 500 error when sending XML to server up vote 0 down vote favorite I am trying to send an XML file to my RESTful web server, and receive a XML file http error 404 in return, however, I am getting a 500 error. java.io.IOException: Server returned HTTP response code: 500 for URL: http://sps-psa-240:8080/NMCJWS/rest/jmsmon2/pub at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at SendXML.send(SendXML.java:151) at SendXML.main(SendXML.java:39) Line 151 is InputStream response = uc.getInputStream(); If I uncomment System.out.println(((HttpURLConnection) uc).getResponseCode());, then I get the same error on OutputStreamWriter out = new OutputStreamWriter(uc.getOutputStream()); I know the server works because a coworker has this working in Obj-C. Here is my code: public class SendXML { public static void main(String[] args) throws SAXException, XPathExpressionException, ParserConfigurationException, IOException, TransformerException { String xml = generateXML("AC24", "/fa/gdscc/dss24-apc"); send("localhost", xml); } public static String generateXML(String conn, String funcAddr) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException, TransformerException { /* * /fa/gdscc/con1-ac25 AZANG ELANG iPAD-2031e616-de74-44a7-9292-3745d2b1ba21 1 */ DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); domFactory.setNamespaceAware(true); // never forget this! DocumentBuilder builder = domFactory.newDocumentBuilder(); Document doc = builder.parse("http://sps-psa-240:8080/NMCWS/rest/conn/subsys/prof?ss=" + conn + "&pt=IPAD_DASHBOARD"); XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression expr = xpath.compile("/SubscrProf/DataItem/DataItemName"); Object result = expr.evaluate(doc, XPathConstants.NODESET); N

Learn Bootstrap Learn Graphics Learn Icons Learn How To JavaScript Learn JavaScript Learn jQuery Learn jQueryMobile Learn AppML Learn AngularJS Learn JSON Learn AJAX Server Side Learn SQL Learn PHP Learn ASP Web http 422 Building Web Templates Web Statistics Web Certificates XML Learn XML Learn XML AJAX

Http 400

Learn XML DOM Learn XML DTD Learn XML Schema Learn XSLT Learn XPath Learn XQuery × HTML HTML Tag Reference

Http Error. Wordpress Media Upload

HTML Event Reference HTML Color Reference HTML Attribute Reference HTML Canvas Reference HTML SVG Reference Google Maps Reference CSS CSS Reference CSS Selector Reference W3.CSS Reference Bootstrap Reference Icon Reference JavaScript JavaScript Reference http://stackoverflow.com/questions/6670860/http-500-error-when-sending-xml-to-server HTML DOM Reference jQuery Reference jQuery Mobile Reference AngularJS Reference XML XML Reference XML Http Reference XSLT Reference XML Schema Reference Charsets HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8 Server Side PHP Reference SQL Reference ASP Reference × HTML/CSS HTML Examples CSS Examples W3.CSS Examples Bootstrap Examples JavaScript JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS http://www.w3schools.com/tags/ref_httpmessages.asp Examples AJAX Examples XML XML Examples XSLT Examples XPath Examples XML Schema Examples SVG Examples Server Side PHP Examples ASP Examples Quizzes HTML Quiz CSS Quiz JavaScript Quiz Bootstrap Quiz jQuery Quiz PHP Quiz SQL Quiz XML Quiz × HTML Reference HTML by Alphabet HTML by Category HTML Attributes HTML Global Attributes HTML Events HTML Colors HTML Canvas HTML Audio/Video HTML Character Sets HTML Doctypes HTML URL Encode HTML Language Codes HTML Country Codes HTTP Messages HTTP Methods PX to EM Converter Keyboard Shortcuts HTML Tags