i want to use soap to transfer image from server to client,so how can i get best performance?
Er. First I'd make sure you really want to transfer the image using a SOAP web service. Since you would have to encode the image you would end up having to transfer more information compared to using an HTTP GET, which is supported by all web servers.
But if you have a good reason to transfer binary information through a SOAP web service you would need to encode it, typically you would use BASE64 encoding. You would then decode the information on the client.
If the binary information lends itself to it you could apply compression before the encoding, however most common picture formats are already compressed (JPG, GIF) so the benefit would be marginal (for that type of content) in relation to the cost of performing the compression. And obviously all clients would need to be able to support the compression algorithm.
thanks a lot.
the image will be in the form of GIF,and how about treating it as an soap attachment.the encoding and decoding of base64 leads to poor performance
You are right, it is advised to send binaries as soap attachements to improve performance.
Can you bind a message to a SOAP attachment in WSDL????