Reply to Re: recieve zip file via xml

Your name:

Reply:


Posted by shimmyshack on 12/27/07 00:02

On Dec 25, 10:19 pm, asismor...@gmail.com wrote:
> On Dec 24, 10:51 pm, shimmyshack <matt.fa...@gmail.com> wrote:
>
>
>
>
>
> > On Dec 24, 1:03 pm, asismor...@gmail.com wrote:
>
> > > Thanks Dikkie,
>
> > > With soap i do retrieve an xml file which i save into $call. I can
> > > reference the tags directly, since the information I want is in the
> > > ClienteRespuesta tag, I write it directly into the file.
> > >  fwrite($fh, $call->ClienteRespuesta);
>
> > > > Just take a look at the saved file. If there is any base64 encoded data
> > > > inside, it is given within XML tags. So again, it is not the whole response.
>
> > > AFAIK soap decodes base64 when you access the xml tag. in any case i
> > > have tried decoding manually by debugging the response with the same
> > > result. As you can see in the code above I am extracting the data from
> > > the tags, so there are no tags in the file.
>
> > > If the file is an attachment how would you handle with xml, i havent
> > > seen anything in soap.
>
> > > Thanks again and Happy Christmas to you too.
>
> > it might sound silly, but have you checked out the "raw" response xml
> > packet in a text editor. That way you get to see exactly what is being
> > returned, you can then judge whether $call->ClienteRespuesta is enough
> > to get at the encoded data. After all its the service creator that
> > ultimately gets to decide how the zip is sent, it's their
> > documentation that will provide the best answers here. do they
> > <tag><![CDATA[base64encode(zip)]]></tag>
> > or
> > <tag typeofencoding="base43withnobson"><![CDATA[strangestuffhere]]></
> > tag>
> > or something weirder- Hide quoted text -
>
> > - Show quoted text -
>
> I have, with the debuggin message within the code I can see exactly
> what is being transmitted. Unfortunately this is no much use sine  the
> data is base64 encoded and if decoded it´s still garbage since it´s a
> zip encoded stream.
>
> Whether or not they are enclosing the information in CDATA, Im afraid
> they´re not. I will contact them see if I can get them to add that.
>
> Thank you for your help.
>
> Asis- Hide quoted text -
>
> - Show quoted text -

well CDATA isnt needed if it IS base64encoded as there will never be
any illegal xml characters. (< or &)
however if the stream you get when base64decoding is binary you do
need to know what it is, might it be gzipped rather than a zip. You
can test this by saving the binary within your server root somewhere
public as
test.txt.gz
and trying to retrieve it from a browser, the browser should
uncompress the stream and render the text. If it is just "corrupt"
meaning you cannot see any part of it using a hex editor then the
documentation from the developers of the service should say what
format it is, they really ought to provide some kind of "test" service
a known call and a known response, with a response already saved you
can calculate the md5 of both that way to compare.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация