send binary file using Zend Soap

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

send binary file using Zend Soap

vietmh06219
I don't know how to send an image from my zend webservice server to my .Net client. Is there anyone can help me to solve this problem? Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: send binary file using Zend Soap

RQuadling
On 28 March 2011 04:14, vietmh06219 <[hidden email]> wrote:

> I don't know how to send an image from my zend webservice server to my .Net
> client. Is there anyone can help me to solve this problem? Thanks.
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/send-binary-file-using-Zend-Soap-tp3410652p3410652.html
> Sent from the Zend Web Services mailing list archive at Nabble.com.
>
> --
> List: [hidden email]
> Info: http://framework.zend.com/archives
> Unsubscribe: [hidden email]
>
>
>

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383517

"5.2.3 Array of Bytes

An array of bytes MAY be encoded as a single-reference or a
multi-reference value. The rules for an array of bytes are similar to
those for a string.

In particular, the containing element of the array of bytes value MAY
have an "id" attribute. Additional accessor elements MAY then have
matching "href" attributes.

The recommended representation of an opaque array of bytes is the
'base64' encoding defined in XML Schemas [10][11], which uses the
base64 encoding algorithm defined in 2045 [13]. However, the line
length restrictions that normally apply to base64 data in MIME do not
apply in SOAP. A "SOAP-ENC:base64" subtype is supplied for use with
SOAP.

<picture xsi:type="SOAP-ENC:base64">
   aG93IG5vDyBicm73biBjb3cNCg==
</picture>"

The type being used will dictate what you can send.

If you are sending it as a string, then, you can still encode it, but
that would be a manual process on each side.

If you use the base64 type, I believe that the encoding AND decoding
is transparently done for you. I think.

Richard.



--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]