[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking for best option
Bruce,
> THE <BASE64DATA> tag is not encoded. When I view the data returned for the
> GetImageDataResult tag it has <BASE64DATA> rather than <BASE64DATA>
> which surprised me that the parser didn't parse it out.
If that were really the case, the parser WOULD parse it out, believe me
it would. HOWEVER... the XML parser *will* convert the < to < and
the > to >. So if you're checking this by looking at the 'value'
parameter that's passed to your end handler, then indeed it will look
like <BASE64DATA>
That's why I asked you to check it in the httpapi_debug.txt file, and
NOT in the value parameter. :)
> Right now I am just trying to get a good image so the 64k is not a problem.
> Once I get everything working I will use the HTTP_XmlReturnPtr() and add
> error logic as you suggest.
That's fine as long as your tests use images smaller than 64k. I just
want to make sure the diff between working and failing in your tests
don't come from the image being chopped up.
> I changed val2 to be a fixed length for now and below are the changes to the
> procedure. I added a scan for x'0D' and x'25' and put the program into
> debug for testing and I didn't find any.
Hopefully you get the idea. Any characters that aren't in the base64
alphabet (A-Z a-z 0-9 + / =) need to be removed. x'0D' and x'25' were
just likely examples... you need to remove everything besides the base64
alphabet.
> I had overlooked the point you made in (D). There is tag
> <IMAGESIZE>8908</IMAGESIZE> which I should be able to use to determine the
> output length.
Once again... base64_decode() will RETURN the output length. You don't
need to go to the extent of parsing the XML for it. Just do:
len = base64_decode( ... parameters here ...);
If that doesn't help, please call the service with http_url_post()
(instead of POST_XML) and send me the XML document you get from your
provider. (Send it to me off-list if it contains sensitive
information). That would make it a lot easier for me to help you.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------