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

Re: Posting pdf file



I must not be understanding you.   HTTPAPI will save the response to a 
stream file ("IFS file") automatically.  Why do you need to write the 
header, data and footer to the file yourself?

Unless..    are you SENDING (instead of receiving) the PDF file?  That 
would seem a strange thing to do, since web services don't typically 
receive data in PDF format.  But, perhaps yours is a document archiving 
web service or something like that.

But then you talk about expat -- and you wouldn't need to run Expat on 
something you're SENDING... only something you're receiving, right?

So I'm not understanding your scenario.

But, if you are receiving the data (Rather than sending) I would 
recommend turning on the "return pointer" feature of HTTPAPI's XML 
parser so you can receive data that's longer than 64k.  That way you can 
simply receive the base64 encoded PDF as one big chunk in your XML 
handler, and can write it to an IFS file painlessly.

Then you'll need to base64 decode it...   IF you don't know how, please ask.



Shahar Mor wrote:
>    Hello all,
> 
> 
> 
>    Iam trying to find an example for doing the following - call web
>    service that includes a pdf file in base64 the pdf file can be as long
>    as 2 to 3 mb. The result is straight forward (i.e it can be handeled
>    by the xpat handling procedure.
> 
> 
> 
>    since the longest variable length is 65535 bytes i thought on the
>    following,
> 
> 
> 
>    * Create temporary ifs file (http_tempfile ?)
> 
>    * write header of soap to the ifs file
> 
>    * write encoded base64 of the pdf file to the ifs file.
> 
>    * write footer of soap message.
> 
>    * run the web service from the stream file.
> 
> 
> 
>    Did anybody tried this ?
> 
>    What is the api to use in order to send request with soapaction using
>    stream file and getting response to xpat procedure ?
> 
> 
> 
>    Thanks
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------