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


Hi Dave,

You can call http_url_post() to save the result to a stream file in the IFS, and then can parse it using a different tool if you like. (You've already noticed that this is much quicker.)

If you'd prefer to override this behavior and have the data get passed to your RPG program (instead of written to a file or parsed by a parser) you can also use http_url_post_raw(). This routine will send the data to a callback as it appears over the wire.... the callback needs to take responsibility for saving the data somewhere (could be to memory, a variable, etc) and needs to be aware that the data will not all arrive at once, so it'll be called repeatedly, and must re-join the parts of the data as they arrive.

Though, I'm really wondering why the XML parser would add so much overhead? It certainly doesn't add 20 seconds (or even 1 second) to any program I've used it in. Are you certain this performance issue isn't coming from your handler routines? Obviously, I don't know how big your items are, but 333 items doesn't seem like a very large number to me. Can you provide details on how I can reproduce this problem?


On 10/24/2012 9:48 AM, Dave Jones wrote:
    Hi Scott,

    I have a project for which I want to use the HTTPAPI. The user wants to
    update a central database via a webservice call from his AS400 ordering
    system. Up to 333 item numbers and quantities can be sent in a SOAP XML
    message to the web service. The web service returns details of stock
    levels, re-order levels, status etc. I have written an RPGLE program
    (based on EXAMPLE16 in LIBHTTP) which passes the input data (up to 333
    items numbers and quantities) and parses the XML response into a
    parameter string for returning to the calling program. All this works

    The issue I have, is that if I receive the returned data as a file in
    the IFS using http_url_post, the process takes less than a second to
    run. If I parse the returned XML data in my RPG program using
    http_url_post_xml and load this data into an ouput parameter string,
    the process takes approximately 20 seconds to run. This works out at
    around 15 items per second. Is there a way of receiving the response
    from the web service into the RPG (and not to an IFS file) in a
    speedier way than using the XML parser please?


    Dave Jones

    3X Software Limited

    23 Princes Drive

    Colwyn Bay

    Conwy LL29 8HT

    Tel 01492 539020

    Mob   07783 587734

    Email   [1]davej@xxxxxxxxxx

    web   [2]www.3xsoftware.co.uk



    1. mailto:davej@xxxxxxxxxx
    2. http://www.3xsoftware.co.uk/

This is the FTPAPI mailing list.  To unsubscribe, please go to:

This is the FTPAPI mailing list.  To unsubscribe, please go to: