views:

51

answers:

1

I implemented this contract

[OperationContract]
[WebGet(UriTemplate = "{parameter}", BodyStyle= WebMessageBodyStyle.Bare)]
byte[] Operation(string parameter);

But, when I called the implementation, all I got was something like this:

<base64Binary xmlns="http://schemas.microsoft.com/2003/10/Serialization/"&gt;dGVzdA==&lt;/base64Binary&gt;

Can't I remove this wrapper and this serialization?

+1  A: 

Make it return Stream.

Stream Operation(string parameter)
{
   ...
   new MemoryStream(bytes);
}
nitzmahone
Eureka! It worked!
Jader Dias