[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
http_url_post_stmf(), attempting to send xml from ifs to url
Sender: llandreth@xxxxxxxxx
Using Example8 as a base, and then stripping it down to use
http_url_post_stmf() instead, I keep receiving this error message. The
only documentation for the API that I have found is in member HTTPAPT_H,
but cannot tell which field needs the max length of 52. Any help will be
appreciated!!
Error Message:
Message ID . . . . . . : RNQ5335 Severity . . . . . . . : 00
Message type . . . . . : Inquiry
Date sent . . . . . . : 09/02/05 Time sent . . . . . . :
13:13:48
Message . . . . : DSPLY HTTP/1.1 100 Continue
Cause . . . . . : This is an inquiry message originated from RPG
procedure
TESTPOST2 in program LANDRETL/TESTPOST2. The program is expecting a
character input field with a maximum length of 52.
Recovery . . . : Enter a valid response according to the type of data
expected by the program. The program will tolerate five incorrect
responses
before signalling an error condition. There have been 0 incorrect
responses
so far. If you do not want to enter any data, just press Enter to
resume
processing of the program.
Program Source:
0001.00 H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('LIBHTTP/HTTPAPI') BNDDIR
('QC2LE')
0002.00 H debug(*YES)
0003.00 **
0004.00 ** Cloned from Scott Clement's Example 8: POST operation with
0005.00 ** data from a stream file, using new Post API.
0006.00
0007.00 D/copy libhttp/qrpglesrc,httpapi_h
0008.00 D/copy libhttp/qrpglesrc,ifsio_h
0009.00 D/copy libhttp/qrpglesrc,errno_h
0010.00
0011.00 D cmd pr extpgm('QCMDEXC')
0012.00 D command 200A const
0013.00 D length 15P 5 const
0014.00
0015.00 D rc s 10I 0
0016.00 D msg s 52A
0017.00 D p_data S *
0018.00 D mystat S like(statds)
0019.00 D xxxx S 1024A
0020.00 D stmf S 256A
0021.00 D filein S 256A
0022.00 D urlad S 256A
0023.00 D sf s 10I 0
0024.00 D content S 50A
0025.00 D uagent S 50A
0026.00 D timeo S 2 0
0027.00
0028.00 c eval *inlr = *on
0029.00
0030.00 ** whatever data is in this stream file will
0031.00 ** be POSTed to the URL below.
0032.00 ** For my first test, no data will be sent back from the Vendor,
0033.00 ** he will just email me, so the receive = send file.
0034.00 c eval urlad= 'http://intranet.data-source+
0035.00 c .com/xml.asp'
0036.00 c eval stmf = '/ifstest/Order1.xml'
0037.00 c eval timeo = 00
0038.00 c eval filein = '/ifstest/Order3.xml'
0039.00 c eval content= 'text/xml'
0040.00 c eval uagent= 'HTTP_USEAGENT'
0041.00 * NEW API(using 6 or 7 parms)
0042.00 c eval rc=http_url_post_stmf(%trim(URLAD):
0043.00 c %trim(stmf):
0044.00 c %trim(filein):
0045.00 c timeo:
0046.00 c %trim(uagent):
0047.00 c %trim(content))
0048.00 c if rc <> 1
0049.00 c eval msg = http_error
0050.00 c dsply msg
051.00 c dump
052.00 c return
053.00 c endif
054.00
055.00 ** This should be the XML data that DSI returns to us:
056.00 c** callp cmd('DSPF ''/ifstest/Order3.xml''':
200)
057.00
058.00 c return
059.00 /define ERRNO_LOAD_PROCEDURE
060.00 /copy libhttp/qrpglesrc,errno_h
Linda Landreth
Park University Enterprises, Inc.
9757 Metcalf Avenue
Overland Park, KS 66212
llandreth@xxxxxxxxx
(913) 967 - 8321 direct
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------