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

AW: question about example 2



That is interesting. There is no example of using http_url_post_raw() or http_url_post_raw2() in my copy (1.29) of HTTPAPI.

May you please send it to: thomas DOT raddatz AT tools400 DOT de? Just curious.

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Larry Kleinman
Gesendet: Montag, 23. März 2015 20:15
An: HTTPAPI and FTPAPI Projects
Cc: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: question about example 2

OK, now we're getting there.   I now understand what this is about, and it 
looks like EXAMPLE5 from the older version of LIBHTTP does what I want. 
It's an example of using POST with SSL & raw output, and it sounds like 
what you are describing below.   Thanks for the help.


 says Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From:   Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
To:     HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>, 
Date:   03/23/2015 02:29 PM
Subject:        Re: question about example 2
Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx



Larry,

The SOAP stuff is there, because it is a sample for a SOAP web service.
Since you want to post to a webform, you do not need the SOAP stuff, but replace it with the data you want to post.

I assume you will use the WEBFORM_* procedures to produce the html request, somewhat like Mike posted a few days ago. But instead of http_url_post() you need to use http_url_post_raw() to get the response back as a string.

Nevertheless, the response will not be EBCDIC. So you still need
HTTP_xlatedyn() to translate the response from utf-8 to EBCDIC.

Regards,

Thomas.

Am 23.03.2015 um 17:51 schrieb Larry Kleinman:
>    Thomas - OK, that helps, but my problem is that I don't really know
>    SOAP that well.   There seems to be a bunch of stuff in the "SOAP = "
>    section and also in the PR and PI for EXAMPLE28 that is related to
the
>    currency conversion.   I don't need that, but not sure whether to
>    remove it or to replace it with something else.   Why do I need SOAP 
in
>    the first place?   Does it matter if the site to which I am posting 
can
>    handle a SOAP message?
>     Larry Kleinman
>    Kleinman Associates, Inc.
>    212-949-6469
>    From:        Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
>    To:        HTTPAPI and FTPAPI Projects 
<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
>    Date:        03/21/2015 04:38 PM
>    Subject:        Re: question about example 2
>    Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>      
> __________________________________________________________________
> 
>    Larry,
>    I do not think that there is so much more complexity. There are only
>    two
>    more things compared to EXAMPLE2:
>    a) receiveProc(). This procedure receives the data from the web
>    services
>    and buffers it into 'receiveBuffer'. "Unfortunately" it is UTF-8 data
>    and
>    not EBCDIC.
>    b) Because of the UTF-8 data we need HTTP_xlatedyn() to convert the
>    received data to EBCDIC. Since HTTP_xlatedyn() allocates memory from
>    the
>    heap, we also need to free that memory afterwards: 'dealloc(n)
pEbcdic'
>    Everything below '// Retrieve the conversion rate from the response
>    message.' is used only for retrieving the conversion rate from the
>    response
>    xml message. It is not necessary for what you want to do.
>    So it isn't that complicated, is it?
>    Regards,
>    Thomas.
>    Am 21.03.2015 um 12:34 schrieb Larry Kleinman:
>    >    Sorry, Thomas, I didn't see the attachment in the original 
email.
>    >    (Duh!)  I looked at it and it seems a lot more complicated than
>    Sample2
>    >    which does a simple post.  Is all of that more complexity really
>    >    necessary just to take the returned data and do something with 
it
>    other
>    >    than put it into the IFS?
>    >    Larry Kleinman
>    >    Kleinman Associates, Inc.
>    >    212-949-6469
>    >    From:        Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
>    >    To:        HTTPAPI and FTPAPI Projects
>    <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
>    >    Date:        03/20/2015 12:37 PM
>    >    Subject:        Re: question about example 2
>    >    Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >
>    __________________________________________________________________
>    >
>    >    No, it is not yet there. Maybe that it goes in the next beta
>    version.
>    >    That is why I send it to the mailing list.
>    >    Thomas.
>    >    Am 19.03.2015 um 20:27 schrieb Larry Kleinman:
>    >    >    Thanks, Thomas.  Is EXAMPLE28 in the current HTTPAPI lib
>    download?
>    >    >    Larry Kleinman
>    >    >    Kleinman Associates, Inc.
>    >    >    212-949-6469
>    >    >    From:        Thomas Raddatz <thomas.raddatz@xxxxxx>
>    >    >    To:        "'HTTPAPI and FTPAPI Projects'"
>    >    >    <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
>    >    >    Date:        03/18/2015 02:25 AM
>    >    >    Subject:        AW: question about example 2
>    >    >    Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >    >      _________________________________________
>    >    _________________________
>    >    >
>    >    >    Larry,
>    >    >    The key is to use http_url_post_raw() or http_url
>    _post_raw2(). A
>    >    few
>    >    >    days ago I put together EXAMPLE28 for someone else, to
>    demonstrate
>    >    how
>    >    >    to use these procedures. Feel free to have a look at it and
>    let us
>    >    know
>    >    >    if it worked for you.
>    >    >    The example creates a SOAP messages and posts it to the
>    server.
>    >    The
>    >    >    response is received in receiveProc() and stored into the
>    global
>    >    data
>    >    >    structure 'receiveBuffer'. Afterwards the received data is
>    >    converted
>    >    >    from UTF-8 to EBCDIC using HTTP_xlatedyn().
>    >    >    Regards,
>    >    >    Thomas.
>    >    >    -----Ursprüngliche Nachricht-----
>    >    >    Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >    >    [[1][1][1]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im
>    Auftrag
>    >    von Larry
>    >    >    Kleinman
>    >    >    Gesendet: Dienstag, 17. März 2015 22:38
>    >    >    An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>    >    >    Betreff: question about example 2
>    >    >    Hi all - I have an older version of the HTTPAPI library (I
>    think
>    >    it is
>    >    >    1.23) so forgive me if this is no longer an issue in newer
>    >    versions,
>    >    >    I
>    >    >    want to do a POST to a webform, but I would like to get the
>    >    response
>    >    >    from that site as text within the program, not write it to 
a
>    file
>    >    in
>    >    >    the IFS.
>    >    >    Is there a way to do that?
>    >    >    Larry Kleinman
>    >    >    Kleinman Associates, Inc.
>    >    >    212-949-6469
>    >    >    --
>    >    >    IMPORTANT NOTICE:
>    >    >    This email is confidential, may be legally privileged, and 
is
>    for
>    >    the
>    >    >    intended recipient only. Access, disclosure, copying,
>    >    distribution, or
>    >    >    reliance on any of it by anyone else is prohibited and may 
be
>    a
>    >    >    criminal offence. Please delete if obtained in error and
>    email
>    >    >    confirmation to the sender.
>    >    >    [attachment "EXAMPLE28.rpgle" deleted by Larry
>    >    Kleinman/KLEINMANASSOC]
>    >    >
>    >
> -----------------------------------------------------------------------
>    >    >    This is the FTPAPI mailing list.  To unsubscribe, please go
>    to:
>    >    >    [2][2][2]
http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    >
>    >
> -----------------------------------------------------------------------
>    >    >
>    >    > References
>    >    >
>    >    >    1. [3][3]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >    >    2. [4][4]
http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    >
>    >    >
>    >    >
>    >    >
>    >
> -----------------------------------------------------------------------
>    >    > This is the FTPAPI mailing list.  To unsubscribe, please go 
to:
>    >    > [5][5]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    >
>    >
> -----------------------------------------------------------------------
>    >    >
>    >
> -----------------------------------------------------------------------
>    >    This is the FTPAPI mailing list.  To unsubscribe, please go to:
>    >    [6][6]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >
> -----------------------------------------------------------------------
>    >
>    > References
>    >
>    >    1. [7]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >    2. [8]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    3. [9]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    >    4. [10]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    5. [11]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >    6. [12]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >
>    >
>    >
>    >
> -----------------------------------------------------------------------
>    > This is the FTPAPI mailing list.  To unsubscribe, please go to:
>    > [13]http://www.scottklement.com/mailman/listinfo/ftpapi
>    >
> -----------------------------------------------------------------------
>    >
> -----------------------------------------------------------------------
>    This is the FTPAPI mailing list.  To unsubscribe, please go to:
>    [14]http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
> 
> References
> 
>    1. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    2. http://www.scottklement.com/mailman/listinfo/ftpapi
>    3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    4. http://www.scottklement.com/mailman/listinfo/ftpapi
>    5. http://www.scottklement.com/mailman/listinfo/ftpapi
>    6. http://www.scottklement.com/mailman/listinfo/ftpapi
>    7. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>    8. http://www.scottklement.com/mailman/listinfo/ftpapi
>    9. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>   10. http://www.scottklement.com/mailman/listinfo/ftpapi
>   11. http://www.scottklement.com/mailman/listinfo/ftpapi
>   12. http://www.scottklement.com/mailman/listinfo/ftpapi
>   13. http://www.scottklement.com/mailman/listinfo/ftpapi
>   14. 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
> ----------------------------------------------------------------------
> -
> 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.

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