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

RE: Hi, first question ... HTTPAPI



Sender: =?Windows-1252?Q?Nicol=E1s_Machado?= <nicolas.machado@xxxxxxxxxxxxx>

Hi Scott.
Thanks for answering, two thing before continue:
CLP INSTALL, needs to add library LIBHTTP to library list, for the
compilation process, the DSPF object otherwise is not found.
And the CRTBNDRPG should have the &INSTLIB var like PGM(&INSTLIB/EXAMPLEx),
if not they compile on current library.

Well let's continue.

For the 1) option, the idea is that I will get a mime file

Something like ...

Content-type: x-aplication/image
Boundary: ---boundary.1.----

---boundary.1.----
file: pirulo.tif

ABSCFSAJHGJHGSADJHGJASHGDKJAGHSDKJHGAKJSFGKJHAGDFKJHGASKDJHG
.. More data in base64 ??? 
QWERQIWEROIQWUROIUQWYREOIUYQWERIUYQWOEROQWYRUYTQWEROUIQWERII

---boundary.1.----
file: cosita.tif

POIUPOIUPIUPOIUOIUPOIUPOIUOIUPOIUPOIUPOIUPOIUQWEROIUPOIUQWER
.. More data in base64 ??? 
NBNBVMNBVMNVMNBVMNBVASNFMNBVMNBVASDFMNBVMNBVFADMNBVMNBVMNMNB

---boundary.1.------

It's this the only way ??
I look to your sample number 6, and it's quite what I need, but I will
receive more than one image....
Question ?? You don't get any header data ?? The first byte you receive in
the socket goes to the image ??


And oops ?? I don't have the example16 member ??
I have the zip, the xml, and the savf. Bt nothing is there.


Well, take your time, i'm not in a hurry rigth now.
I fou found something similar to my requirement, just tell me.

Best Regards
Nicolas





-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Wednesday, October 27, 2004 2:40 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: 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
-----------------------------------------------------------------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.782 / Virus Database: 528 - Release Date: 22/10/2004
 

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