locked
webHttpBinding and netTcpBinding with streamed OperationContract and parameters in UriTemplate RRS feed

  • Frage

  • Hello,

    I'm using a webHttpBinding for streamed transfer. Now I wan't add a netTcpBinding endpoint, but there are additional parameter.

    [OperationContract]
    [WebInvoke(UriTemplate = "UploadDocument/{documentToken}/{fileName}")]
    void UploadDocument(String documentToken, string fileName, Stream stream);

    When I start the service I get the following error:

    For request in operation UploadDocument to be a stream the operation must have a single parameter whose type is Stream.

    Is there a workaround for this?

    Normally for netTcpBinding I have to change to a message contract, but is it possible to use a UriTemplate together with a MessageContract?

    Thanks,

    Dieter

    Montag, 13. Dezember 2010 18:55

Antworten