I am trying to create a WCF streaming service. I have two requirements that I seem to stumble in trying to get this to work:
- Stream size length
- Input parameters
The contract for my message is as follows:
[MessageContract]
public class MyStream
{
[MessageHeader]
public long StreamSize;
[MessageBodyMember]
public Stream StreamData;
}
My job contract is as follows:
[ServiceContract]
public interface IStreamService
{
[OperationContract]
MyStream GetData(string data);
}
The error message that I get when I try to use the web service is as follows:
The GetData operation cannot be because it has a parameter or return type type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. when using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method should not use other types of Parameters.
, , , .
, ? - ? !