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

RE: Post HTTP



Sender: rayalaro@xxxxxxxxxxxx


I'm using the same code like in the examples. I have the same error with
GET and with POST.
With GET I have the error, but finally the file I was trying to get is
created in the IFS (without any data).
I think the connection is never stablished, because never do the connect,
but I don´t know how to solve this.

What  ports have to be opened to establish the connection? Could be this
the cause of the error?

A'll apreciate any kind of help.

The code for GET is:

H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('LIBHTTP/HTTPAPI')

D/copy libhttp/qrpglesrc,httpapi_h

D rc              s             10I 0
D msg             s             52A

C* retrieve the ILE RPG/400 refernece manual from IBM:

c                   eval      rc = http_url_get(
c                             'http://publib.boulder.ibm.com/pubs/'+
c                             'pdfs/as400/V4R4PDF/QB3AGZ03.PDF':
c                             '/rpg4_reference.pdf')
c                   if        rc <> 1
c                   eval      msg = http_error
c                   dsply                   msg
c                  endif

The error is

DSPLY  connect(): El valor especificado para el argumento n,
 Mensaje . . . . :   DSPLY  connect(): El valor especificado para el
argumento
   n
 Causa . . . . . :   Este es un mensaje de consulta originado desde el
   procedimiento RPG EXAMPLE1 del programa LIBHTTP/EXAMPLE1. El programa
está
   esperando un campo de entrada de caracteres con una longitud máxima de
52.
 Recuperación  . :   Entre una respuesta válida según el tipo de datos que
   espera el programa. El programa tolerará cinco respuestas incorrectas
antes
   de indicar una condición de error. Ha habido 0 respuestas incorrectas
hasta
   el momento. Si no desea entrar datos, pulse Intro para reanudar el
proceso
   del programa.
In English, more or less could be:

Message. . . . .: DSPLY connect(): The value specified for the argument n
Cause . . . . . . . :This is a consult message originated from the
procedure RPG EXAMPLE1
of the program LIBHTTP/EXAMPLE1. The program is waiting an input field wirh
a maximum lenght
of 52.

Restore . . . . . .: Enter a valid response depends on the data type that
waits the program. The program will accept
five incorrect answers before indicate one error condition. It's been 0
incorrect answers until the moment.
If you don't want to enter data, press enter to restart the program
procsess.

_________________________________
Raquel Ayala
Proceso de Datos
Acerinox ( www.acerinox.es )

( (+34) 956 629395
* rayalaro@xxxxxxxxxxxx

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------