Sunday, May 1, 2011

WCF REST Download Binary Stream and Metadata

Hi,

 

I am new to REST and especially new to REST in WCF.  I have successfully created a service that responds to a Get command by streaming a binary file.  That's all well and good I think.

 

My problem is that I cannot find mention of how to download both the binary file and textual/XML metadata about the file being returned in the same response.  I do not want to have the client nmake two requests for performance reasons.

 

It was suggested by a Java colleague that i use a multipart document response.  Unfortunately, although I can find references to people asserting that this is possible with WCF, I can't find any reference to actually how one goes about returning a multipart response.

 

If someone could indicate where i might find clear samples and documentation or provide a simple example, I would be extremely grateful.

 

(Edit to add: I am required to use .NET 3.5)


David Lant

Source: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4888a684-ab0c-4ab1-8ad6-991ca2134e9d

french architecture enterprise architecture certification famous architecture architecture schools rankings architecture gifts

No comments:

Post a Comment