[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: internal server error
Hello,
One thing that might be wrong is the encoding of your document. You've
told it that the document is UTF-8, but I don't see anywhere in the code
where you've told HTTPAPI that it should translate your EBCDIC document to
UTF-8. By default, HTTPAPI translates it to ISO-8859-1, (or whichever
CCSID you've coded in the CONFIG_H member.)
So, you either want to change the XML document to reference ISO-8859-1, or
you want to change HTTPAPI to send UTF-8 (CCSID 1208)
I don't think that's the problem you're encountering, however, since I
don't see anything in your document that would be encoded differently
between those two CCSIDs. Still, it's better to tell the server the right
encoding!
The error message "500 Internal Server Error" means nothing more or less
than what it says. An error occurred on the HTTP server. This error does
not come from HTTPAPI -- it comes from the server, all HTTPAPI does is
relay it from the server to your program.
It'd be better to focus on the XML document that the server is sending
back to you. By SOAP standards, it should have a "fault" tag that
describes the error, and in fact, it does.
I've taken the response document from the e-mail that you sent, and
copy/pasted the SOAP response documnent. Then, I've re-formatted it to
make it a little easier to read. Here's the document:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">
Server was unable to process request. ---> T.C. Kimlik
No: 0 geçersizdir. (Identity Number :0 is invalid, BY)
</soap:Text>
</soap:Reason>
<soap:Detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Notice the error message in the "soap:Text" element. It says "Server was
unable to process request ---> T.C. Kimlik No: 0 geersizdir. (Identity
Number :0 is invalid, BY)"
Now, I don't know ANYTHING about this web service, I don't even know
what it does, much less how the document is to be formatted or what the
error message means.
However, perhaps that error message gives you a clue? Or perhaps it'll
mean something to the people who run the web service?
--
Scott Klement http://www.scottklement.com
On Mon, 13 Nov 2006, Bulent Yildiz wrote:
Hi all,
I have modified one of the httpapi examples to use for my own purposes,
when i run the appl. it returns with "HTTP/1.1 500 Internal Server Error "
indicating that
i am sending no parameter despite i do. Actually it doesn't perceive my
paramater (and supposes as zero). Does anyone has an idea about why this
error might occur ?
Could this be an encoding stuff ?
Thanks in advance,
This is the simplest form of my code :
H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
/copy httpapi_h
D SOAP s 32767A varying
D rc s 10I 0
c movel '17234358104' idnumber 11
/free
SOAP =
'<?xml version="1.0" encoding="utf-8" standalone="no"?>'
+'<SOAP-ENV:Envelope'
+' xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"'
+' xmlns:tns="http://kps.nvi.gov.tr/WS/Public/">'
+'<SOAP-ENV:Body>'
+' <tns:TCKimlikNoDogrula>'
+' <tns:tcKimlikNo>'+ %trim(idnumber) --the parameter i send, BY--
+ '</tns:tcKimlikNo>
+' </tns:TCKimlikNoDogrula>'
+'</SOAP-ENV:Body>'
+'</SOAP-ENV:Envelope>';
http_debug(*ON);
rc = http_url_post(
'http://tckimlik.nvi.gov.tr/kpspublic.asmx'
: %addr(SOAP) + 2
: %len(SOAP)
: '/tmp/idnumber.xml'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
:
'http://kps.nvi.gov.tr/WS/Public/TCKimlikNoDogrula');
if (rc <> 1);
http_crash();
endif;
And here is the response in debug file :
HTTPAPI Ver 1.17 released 2006-09-23
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /kpspublic.asmx HTTP/1.1
Host: tckimlik.nvi.gov.tr
User-Agent: http-api/1.17
Content-Type: text/xml
SOAPAction: http://kps.nvi.gov.tr/WS/Public/TCKimlikNoDogrula
Expect: 100-continue
Content-Length: 333
recvresp(): entered
HTTP/1.1 100 Continue
SetError() Ö13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="utf-8" standalone="no"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:tns="http://kps.nvi.gov.tr/WS/Public/"><SOAP-ENV:Body>
<tns:TCKimlikNoDogrula> <tns:tcKimlikNo>17234358104</tns:tcKimlikNo>
</tns:TCKimlikNoDogrula></SOAP-ENV:Body></SOAP-ENV:Envelope>
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Date: Mon, 13 Nov 2006 09:25:12 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: KaleWEB
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 487
SetError() Ö13: HTTP/1.1 500 Internal Server Error
recvdoc parms: identity 487
header_load_cookies() entered
recvdoc(): entered
SetError() Ö0:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text
xml:lang="en">Server was unable to process request. ---> T.C. Kimlik No
: 0 geçersizdir. (Identity Number :0 is invalid, BY)
</soap:Text></soap:Reason><soap:Detail
/></soap:Fault></soap:Body></soap:Envelope>
SetError() Ö13: HTTP/1.1 500 Internal Server Error
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------