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

Re: http_get failing with 404



Charlie,

http_url_get() is for downloading from an HTTP server. It is not for reading files in your IFS.

Can you explain what you are trying to do?

-SK


On 8/13/2013 2:29 PM, Versfelt, Charles wrote:
Hi all,

I hope someone can help me with this... please let me know if I need to provide more info or where to look.

I'm trying to receive an XML response and it's giving me the error that the file is not found.
(No such path or directory)  I can see the file, so I know it's there.  I see it when I open the folder.
I see it in wrklnk on the iseries.

My send/receive works fine.

rc = http_url_post_stmf(wfurl1
                       : wfreqstfile
                       : wfreplyfile
                       : HTTP_TIMEOUT
                       : HTTP_USERAGENT
                       : ContentType );

After this, I see the files, my response file:

WFREPLYFILE = /home/WELLS/WR611792359O001308131513.xml

It's there.  I see it in wrklnk and the folder.

Now, the next set of code...

if @Error = *off;                     (yes, it's off)
   path = wfreplyfile;                (sets path =   /home/WELLS/WR611792359O001308131513.xml )
   filename = http_tempfile() + '.xml';   (returns a file name in /tmp)
   rc = http_url_get( path : filename );  (SHOULD receive it for parsing)
   if (rc <> 1);

When I get to the next statement, rc returns a 404

My debug report in /tmp/httpapi_debug.txt

HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V7R1M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
SetError() #22: open(): No such path or directory.
SetError() #22: open(): No such path or directory.

How can there be no such path or directory?  I can see and open it.

This same code works elsewhere...

Thanks,
Charlie

This email message has been delivered safely and archived online by Mimecast.  For more information please visit http://www.mimecast.com

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