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

Re: HTTPAPI and socket connection question



Hi Dan,

Three steps are involved in making an HTTP POST request.  This is what 
http_url_post() does:

a) Connect to the server.  (http_persist_open)
b) Send/receive the POST request (http_persist_post)
c) Disconnect from the server. (http_persist_close)

So HTTP_url_post() calls those three routines in that order.  What YOU 
are looking to do, however, is this:

a) Connect to the server.
b) Send/receive the POST request.
c) Send/receive ANOTHER post request.
d) Send/receive ANOTHER post request
e) Repeat step (d) however many times are appropriate
f) Disconnect from the server.

So you understand, you can't use HTTP_url_post(), even though it does 
call the persist routines under the covers, because it'll keep calling 
the persist_close, and persist_open for every request, which you claim 
is undesirable.  If you want to repeat the post without repeating the 
connect/disconnect, you have to call the http_persist_xxx() routines 
yourself instead of having http_url_post() do them for you.

Is that clear enough?

Sorry, no, there are no examples of this provided with HTTPAPI.

Huesman, Dan wrote:
>    Scott,
> 
> 
>                Currently we use the http_url_post and a subsequent
>    http_parse_xml_stmf to parse the response from the ifs file (and yes
>    we're changing this to use http_url_post_xml to do the parsing in
>    memory); but what's somewhat confusing is the log shows us entering
>    the persist routines example follows:
> 
> 
>    http_url_post(): entered
> 
>    http_persist_open(): entered
> 
>    http_long_ParseURL(): entered
> 
>    http_persist_post(): entered
> 
>    http_long_ParseURL(): entered
> 
>    do_post(): entered
> 
> 
>    ...
> 
> 
>    and then we see after the rcvdoc routing:
> 
> 
>    http_close(): entered
> 
> 
> 
>    In your examples we didn't see where you use the persist routines
>    directly; but we'll investigate further.  I thought perhaps that since
>    we're also setting on LR; that subsequent calls to our routines (RPG
>    free code) from the main application (RPG III code) would perhaps
>    reset pointers that HTTPAPI uses to keep this persistent connection
>    alive.
> 
> 
>    Thanks again for all your time.
> 
> 
> 
> 
> 
>    [cid:image002.gif@01C92074.BA9E6E10]
> 
> 
>    Daniel G. Huesman
> 
>    Enterprise Integration Specialist
> 
>    Omnicare MIS Department
> 
> 
>    859-426-3107 (ph)
> 
>    859-426-3118 (fax)
> 
> 
>    This communication, together with any attachments hereto or links
>    contained herein, is for the sole use of the intended recipient(s) and
>    may contain information that is confidential or legally protected. If
>    you are not the intended recipient, you are hereby notified that any
>    review, disclosure, copying, dissemination, distribution or use of
>    this communication is STRICTLY PROHIBITED. If you have received this
>    communication in error, please notify the sender immediately by return
>    e-mail message and delete the original and all copies of the
>    communication, along with any attachments hereto or links herein, from
>    your system.
> 
>      _________________________________________________________________
> 
>    -- NOTICE -- The information transmitted is intended only for the
>    person or entity to which it is addressed and may contain confidential
>    and/or privileged material, the disclosure of which is governed by
>    applicable law. Any review, retransmission, dissemination or other use
>    of, or taking of any action in reliance upon, this information by
>    persons or entities other than the intended recipient is prohibited.
>    If you received this in error please contact the sender and destroy
>    the materials contained in this message. 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

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