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

Re: Pulling raw http response?



That example is more complicated than it needs to be. It'd be much simpler to use a VARYING variable and just concatenate.

     D myVar           s         100000a   varying
        .
        .
     P incoming        B
     D incoming        PI            10I 0
     D   descriptor                  10I 0 value
     D   data                      8192A options(*varsize)
     D   datalen                     10I 0 value
      /free
         myVar += %subst(data:1:dataLen);
      /end-free
     P                 E


On 1/20/2015 3:07 PM, Mike Krebs wrote:
http://www.scottklement.com/archives/ftpapi/201207/msg00066.html

That message was part of the thread regarding similar problem.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Wright
Sent: Tuesday, January 20, 2015 2:59 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Pulling raw http response?

Ok - I did search the archives but will dive back in.  Did not try using variable in my search, so that might be the ticket.  Thanks!


  David Wright
CIO | CELS Enterprises, Inc
310-838-2103 ext623
3485 S La Cienega Blvd, Los Angeles, CA 90016
   www.chineselaundry.com




-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Tuesday, January 20, 2015 11:01 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Pulling raw http response?

David,

This has come up before..There is something in the archive about something similar (about 2 years ago?). I don't have time for the search right now but you can read the response back into a variable and hand parse very easily. Look at how to receive to a variable. Or receive to a file and parse the file.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Wright
Sent: Tuesday, January 20, 2015 12:14 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Pulling raw http response?

Hi All,

I need to have an RPG app call a web service which does not return a typical file or html-formatted response.  Instead if sends back raw text like this:
<response>status ok</response>

When you View Source in Chrome the only thing shown is the text on the line above.

In the past I have worked with UPS/FedEx web services using HTTPAPI, and all works well.  But I am hitting a roadblock on this one, or at least not seeing the obvious way to get the data.

I have tried the various http_get_* procedures and it does connect to the server, but I get an RC of -1.  I can see in the web service logs that the GET is successful on the server side.

Am I missing something obvious?

Thanks,
David

David Wright
CIO | CELS Enterprises, Inc
310-838-2103 ext623
3485 S La Cienega Blvd, Los Angeles, CA 90016 www.chineselaundry.com<http://www.chineselaundry.com>

This message and any attached documents contain information that may be confidential and/or privileged. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error please notify the sender immediately by reply e-mail and then delete this message from your system.
IP Warning: Images and reports or documents attached or otherwise displayed in this email cannot be used, posted, copied, forwarded or modified without written permission of Cels Enterprises, Inc.

-----------------------------------------------------------------------
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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------