[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTTP/1.1 500 Internal Server Error
Thanks for the info. This helped me to clear up that error and helped
me to pinpoint what was happening with a few other issues I was
having. I now have it working!
Thanks again!
Becky Kerins
Senior Programmer
IS Department - Church Mutual
(715) 539-4206
From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Date: 04/13/2011 03:29 AM
Subject: Re: HTTP/1.1 500 Internal Server Error
Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
_________________________________________________________________
Hi Becky!
A little background:
Saying that HTTP received "500 Internal Server Error" is very much
like
saying "My RPG program showed the 'Display Program Messages' screen"
It tells you that something went wrong. But it doesn't tell you WHAT
went wrong. 500 means "an error occurred", and "internal server
error"
means that it was discovered on the HTTP server.
Fortunately, the server sent you back a more detailed message, and it
was found in your debug log. Here's the relevant portion:
<faultstring>
org.xml.sax.SAXParseException: The content of elements must
consist of well-formed character data or markup.
</faultstring>
The phrase "well-formed" in XML-speak means "follows XML syntax
rules".
So, to put it another way, the XML document you're sending is breaking
XML syntax rules. Here's that document (also from your debug log):
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:soap="[1]http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="[2]http://getacctretrieval.wsbeans.iseries"
xmlns:xsd="[3]http://www.w3.org/2001/XMLSchema"
xmlns:xsi="[4]http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<tns:getacctretrievalInput>
<tns:pARMSORT>TRINITY LUTHERA</tns:pARMSORT>
<tns:PARMST>MD<tns:/PARMST>
</tns:getacctretrievalInput>
</soap:Body>
</soap:Envelope>
If you copy/paste that to Notepad (or similar) and save it to your PC,
then try to open it with a browser (I use Firefox, but others should
work, too) it'll tell you that there's a syntax error in the document.
That's a really easy way to see where the error is. (When it's not
obvious to the naked eye, anyway.)
Here's what Firefox tells me:
XML Parsing Error: not well-formed
Location: Desktop/becky.xml
Line Number 7, Column 24:
<tns:PARMST>MD<tns:/PARMST>
-----------------------^
So that pinpoints the exact error... you need to have the slash
before
the namespace prefix (not after it). your data needs to look like
this:
<tns:PARMST>MD</tns:PARMST>
I realize that Rick already explained this -- but I thought it might
be
useful to see the troubleshooting steps that you could take to find
the
error. Browsers do a great job of spotting/explaining issues relating
to
documents not being well-formed.
Hope that helps
On 4/12/2011 4:06 PM, RKerins@xxxxxxxxxxxxxxxx wrote:
>
> This is my first time working with API and I have an issue with
my
> program where I'm receiving a HTTP/1.1 500 Internal Server
Error. I
> have gone over the code and debug log multiple times and am not
able
> to find what is causing the issue.
> I have attached my WSDL, program, and error log hoping someone
else
> has some insight.
> Thanks!
>
> Becky Kerins
> Senior Programmer
> IS Department - Church Mutual
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. To unsubscribe, please go to:
[5]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
This email has been scanned by the MXLogic Email Security System.
References
1. http://schemas.xmlsoap.org/soap/envelope/
2. http://getacctretrieval.wsbeans.iseries/
3. http://www.w3.org/2001/XMLSchema
4. http://www.w3.org/2001/XMLSchema-instance
5. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------