[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rest Web Service using HTTP_URL_POST_STMF



Hi, I am experiencing a very strange issue.  I run a rest web service and it
runs great.  I receive a 200 in the instance access log.  I run it again and
it ends the instance job and issues a 500.  This continues to happen over
and over again. I run it and it works great, then I run it again and it
cancels the instance job issuing a 500.

The access log entry for the successful run::

192.168.253.106 - - [12/May/2016:09:46:34 -0500] "POST
/epyrcv1/epyrrcv1rg/RICT/DSPRICT4/S1/00000777802 HTTP/1.1" 200 32741 "-"
"http-api/1.24"

No error log for this run.

Debug file for the successful run:

HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00001136'
DNS default domain: CLERICUSMAGNUS.COM
DNS server found: 208.67.222.222
DNS server found: 208.67.220.220
DNS server found: 198.6.100.53
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /epyrcv1/epyrrcv1rg/RICT/DSPRICT4/S1/00000777802 HTTP/1.1
Host: DEVELOP:4082
User-Agent: http-api/1.24
Content-Type: text/xml
Content-Length: 1657


sendraw(): entered
<?xml version="1.0" encoding="utf-8"?>
<epay id="00000777802">
<payment id="EPAYPAYMENT">
<tstatusr></tstatusr>
<tlastname>TESTING-TRAFF RIC-TR</tlastname>
<tfirstname></tfirstname>
<tmiddle></tmiddle>
<tname></tname>
<taddr></taddr>
<tcity></tcity>
<tstate></tstate>
<tzip></tzip>
<scounty>S104WMRM</scounty>
<tdayphone></tdayphone>
<tnitephone></tnitephone>
<tfulladr></tfulladr>
<tdob></tdob>
<tcen></tcen>
<tyr></tyr>
<ttype></ttype>
<tdockno></tdockno>
<tdlnum>123456789 MS</tdlnum>
<tdlstate>MS</tdlstate>
<ticketnum>895147851</ticketnum>
<ticketdat>20160430</ticketdat>
<tpaydate>20160512</tpaydate>
<tdchgdesc>DRIVING 15-20 MPH ABOVE LIMIT</tdchgdesc>
<tdcaseno>2016TR100031</tdcaseno>
<tdssan></tdssan>
<tdcrtdat></tdcrtdat>
<tdfine>000014000</tdfine>
<ttotal></ttotal>
<tamtpd>159.35</tamtpd>
<tfee>19.35</tfee>      
<tbalwof>140.00</tbalwof>
<camt>$140.00</camt>
<rtransid>00000777802</rtransid>
<rccnum></rccnum>
<rccexpmo></rccexpmo>
<rccexpyr></rccexpyr>
<rccname></rccname>
<rsuff></rsuff>
<rccaut></rccaut>
<rpnref></rpnref>
<rccamt></rccamt>
<rcomment1>APPROVAL</rcomment1>
<rcomment2></rcomment2>
<bdmo></bdmo>
<bdccyy></bdccyy>
<bddd></bddd>
<tlanguage></tlanguage>
<tday></tday>
<ttime></ttime>
<tlocation></tlocation>
<timpt></timpt>
<tdisabled></tdisabled>
<tsign></tsign>
<tnoenroll></tnoenroll>
<trecnum></trecnum>
<trecitm></trecitm>
<tbacomn></tbacomn>
<tbadept></tbadept>
<tbauser></tbauser>
<tbacenn></tbacenn>
<tbayern></tbayern>
<tbamonn></tbamonn>
<tbanumb></tbanumb>
<ttrseqn>001</ttrseqn>
<ttritmn></ttritmn>
<treconcile></treconcile>
</payment>
</epay>

recvresp(): entered
HTTP/1.1 200 OK
Date: Thu, 12 May 2016 14:46:34 GMT
Server: Apache
Content-Length: 32741
Content-Type: text/xml; charset=ISO-8859-1


SetError() #13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: identity 32741
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<pmtreturn ID="00000777802">
<payment id="RECEIPT">
<atransid>00000777802</atransid>
<acaseno>2016TR100031     </acaseno>
<apmtreceipt>033090283</apmtreceipt>
</payment>
</pmtreturn>
 

http_close(): entered

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------

The next run, cancels the job instance and issues a 500.

This access log record is:

192.168.253.106 - - [12/May/2016:10:00:41 -0500] "POST
/epyrcv1/epyrrcv1rg/RICT/DSPRICT4/S1/00000777802 HTTP/1.1" 500 539 "-"
"http-api/1.24"

The error log is:

[Thu May 12 10:00:42 2016] [error] [client 192.168.253.106] ZSRV_MSG0107:
Premature end of script headers: File name is epyrrcv1rg.pgm


Debug file is:

HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00001136'
DNS default domain: CLERICUSMAGNUS.COM
DNS server found: 208.67.222.222
DNS server found: 208.67.220.220
DNS server found: 198.6.100.53
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /epyrcv1/epyrrcv1rg/RICT/DSPRICT4/S1/00000777802 HTTP/1.1
Host: DEVELOP:4082
User-Agent: http-api/1.24
Content-Type: text/xml
Content-Length: 1657


sendraw(): entered
<?xml version="1.0" encoding="utf-8"?>
<epay id="00000777802">
<payment id="EPAYPAYMENT">
<tstatusr></tstatusr>
<tlastname>TESTING-TRAFF RIC-TR</tlastname>
<tfirstname></tfirstname>
<tmiddle></tmiddle>
<tname></tname>
<taddr></taddr>
<tcity></tcity>
<tstate></tstate>
<tzip></tzip>
<scounty>S104WMRM</scounty>
<tdayphone></tdayphone>
<tnitephone></tnitephone>
<tfulladr></tfulladr>
<tdob></tdob>
<tcen></tcen>
<tyr></tyr>
<ttype></ttype>
<tdockno></tdockno>
<tdlnum>123456789 MS</tdlnum>
<tdlstate>MS</tdlstate>
<ticketnum>895147851</ticketnum>
<ticketdat>20160430</ticketdat>
<tpaydate>20160512</tpaydate>
<tdchgdesc>DRIVING 15-20 MPH ABOVE LIMIT</tdchgdesc>
<tdcaseno>2016TR100031</tdcaseno>
<tdssan></tdssan>
<tdcrtdat></tdcrtdat>
<tdfine>000014000</tdfine>
<ttotal></ttotal>
<tamtpd>159.35</tamtpd>
<tfee>19.35</tfee>      
<tbalwof>140.00</tbalwof>
<camt>$140.00</camt>
<rtransid>00000777802</rtransid>
<rccnum></rccnum>
<rccexpmo></rccexpmo>
<rccexpyr></rccexpyr>
<rccname></rccname>
<rsuff></rsuff>
<rccaut></rccaut>
<rpnref></rpnref>
<rccamt></rccamt>
<rcomment1>APPROVAL</rcomment1>
<rcomment2></rcomment2>
<bdmo></bdmo>
<bdccyy></bdccyy>
<bddd></bddd>
<tlanguage></tlanguage>
<tday></tday>
<ttime></ttime>
<tlocation></tlocation>
<timpt></timpt>
<tdisabled></tdisabled>
<tsign></tsign>
<tnoenroll></tnoenroll>
<trecnum></trecnum>
<trecitm></trecitm>
<tbacomn></tbacomn>
<tbadept></tbadept>
<tbauser></tbauser>
<tbacenn></tbacenn>
<tbayern></tbayern>
<tbamonn></tbamonn>
<tbanumb></tbanumb>
<ttrseqn>001</ttrseqn>
<ttritmn></ttritmn>
<treconcile></treconcile>
</payment>
</epay>

recvresp(): entered
HTTP/1.1 500 Internal Server Error
Date: Thu, 12 May 2016 15:00:41 GMT
Server: Apache
Content-Length: 539
Connection: close
Content-Type: text/html; charset=UTF-8


SetError() #13: HTTP/1.1 500 Internal Server Error
recvresp(): end with 500
recvdoc parms: identity 539
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
<P>The server encountered an internal error or misconfiguration and was
unable to complete your request.</P>
<P>Please contact the server administrator, [no address given] and inform
them of the time the error occurred, and anything you might have done that
may have caused the error. </P>
<P>More information about this error may be available in the server error
log.</P>
</body></html>

SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered



I have gone through the debug files looking for the cause but can't put my
finger on it.  Can anyone see what may be causing my problem?  Any help is
greatly appreciated. 




Thanks,
Ric Turner
Jano Justice Systems, Inc
601.362.7601 ext. 224
800.250.9884 ext.224

The preceding e-mail is privileged and confidential and is intended only for
the named addressee.  If you received this message in error, please delete
it and notify the sender by return e-mail or by phone at the numbers noted
above.



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------