[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HTTP/1.1 500 Internal Server Error ON SERVER RUNNING V5R3
Ever time I run the attached program I get an error 500 Internal
Server Error. Can anyone see what the problem may be?
We started with Example18. FYI
Maybe someone can point me into the right direction.
Thanks
<<mvr6410.txt>>
Mark Sherwood
SCJ Insurance Services
MARKS@xxxxxxxxxx
Office Direct: 925.474.3653
Direct Fax 925.474.3753
*MODULE
*LIB LIBHTTP
*
**********
* Echo Service Company
* This logs on to ADR
* Copied from libhttp/qrpglesrc/WWW6416R1
*
H*DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
D MVR6410 PR ExtPgm('MVR6410')
/copy httpapi_h
D Incoming PR
D String 32767A varying
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
D Add_SOAPACTION PR
D Header 1024A varying
D UserData * value
D SOAP s 32767A varying
D rc s 10I 0
D compid s 10I 0
D Result s 12P 2
D String s 32767A varying
D Str s 15A
D e_BLOB s 32500A
D w_BLOB s 32767A VARYING
D w_BLOBLEN s 5 0
D w_CC s 5 0
D w_PSW s 6 INZ('XXX111')
D w_USER s 2 INZ('SS')
D w_ACCT s 5 INZ('X2525')
D w_NEWPSW s 6 INZ(' ')
D w_reptype s 7 INZ('MVR2000')
*
* Get the blob from the DB2 data base
C CALL 'MVR6411'
C PARM *BLANKS e_BLOB
C** ' ' CHECKR e_BLOB w_CC
C EVAL w_BLOBLEN = %LEN(%TRIM(e_BLOB))
C EVAL %LEN(w_BLOB) = w_BLOBLEN
C EVAL w_BLOB = %TRIM(e_BLOB)
/free
// %LEN(e_BLOB) = %CHECKR(' ':e_BLOB);
// compid=cmpid ;
// http_XmlStripCRLF(*ON);
SOAP =
'<?xml version="1.0" encoding="UTF-8"?>'
+'<SOAP:Envelope'
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
+' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
+' xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">'
+' xmlns:t="http://www.mvrs.com/">'
+'<SOAP:Body>'
// +' <GetReport xmlns="http://www.mvrs.com/">'
+' <t:GetReport>'
+' <t:Account>' + w_ACCT + '</t:Account>'
+' <t:UserID>' + w_USER + '</t:UserID>'
+' <t:Password>' + w_PSW + '</t:Password>'
+' <t:NewPassword>' + w_NEWPSW + '</t:NewPassword>'
+' <t:Report>' + w_BLOB + '</t:Report>'
+' <t:ReportType>'
+' <string>' + w_reptype + '<string>'
+' </t:ReportType>'
+' </t:GetReport>'
+'</SOAP:Body>'
+'</SOAP:Envelope>';
// +' <Report>' + %TRIM(e_BLOB) + '</Report>'
// +' <Report>' + %SUBST(e_BLOB:1:w_CC) + '</Report>'
HTTP_setCCSIDs(1208: 0); // CCSID 1208 = UTF-8
// This tells HTTPAPI to call our subprocedure (in this example,
// the subprocedure is name ADD_SOAPACTION) when assembling the
// HTTP headers to send to the remote server.
http_xproc( HTTP_POINT_ADDL_HEADER
: %paddr(Add_SOAPACTION) );
http_debug(*ON);
rc = http_url_post_xml(
'http://demo.webmvr.com:7005/carriermvr/carriermvrservice.asmx'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: %addr(String)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml');
// :'http://www.lyonsreg.com/WebService/ATMService/Logon') ;
if (rc <> 1);
http_crash();
else;
// http_comp(String);
// tokensr=%trim(String) ;
// str='Its done!' ;
// http_comp(%trim(str)) ;
return;
endif;
*inlr = *on;
/end-free
P Incoming B
D Incoming PI
D String 32767A varying
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
/free
if (name = 'GetReportResult');
String = value;
endif;
/end-free
P E
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* HTTPAPI will call this (because we set it with http_xproc)
* just before sending the HTTP headers to the remote server.
* This procedure lets us add any header we like to the
* HTTP request.
*
* In this example, I'll use it to supply the SoapAction:
* header. This way, I can supply a SOAPAction that's up to
* 1024 characters long.
*
* NOTE: Make sure you leave off the SOAPAction header on the
* HTTP_url_post_xml, above, otherwise you'll send two
* of them!
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
P Add_SOAPACTION B
D Add_SOAPACTION PI
D Header 1024A varying
D UserData * value
/free
Header = 'SOAPAction: '
+ 'http://www.mvrs.com/GetReport'
+ x'0d25';
/end-free
P E
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------