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

Re: Hi, first question ... HTTPAPI



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


> We have talk about two alternatives:
> 1) use the http_post function, I know how to write de post, but I don't know
> how to read and write the images in the AS/400, later I have to send them in
> an email, as an attachment, (that's no problem).
> How can I parse the response from the web server that I post ??, I wil need
> to parse and save on the IFS the image.

HTTP_url_post() will automatically save the web server's response as a
fiel in the IFS. If what the web server returns is an image, then that
file will be the image file -- and you can attach it to an e-mail or
whatever you'd like to do with it.

You can't really parse an image file. :)   Sure, it might LOOK like an
invoice, but it's really just a picture of an invoice.  Just as you can't
hold a conversation with a picture of a person, you can't get invoice
details from a picture of an invoice.

> 2) Let the EDMS send the images and the mail.
> But in this case I need to send them a xml file, in the post ?? like
> example8 ?? or I need to send then an XML as a SOAP Action, let's say a web
> service ..??

That depends on what they require you to send them.  If they require an
XML file, I'd suggest looking at EXAMPLE16.  It demonstrates both
uploading an XML file and receiving an XML response.

If you can get them to send you an XML response, you'll be able to
interpret it in your programs...  you could even use it to add records to
your payables system without user intervention.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------