Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the end the solution was as follows. (It was quite simple indeed)</p> <p>Service side:</p> <pre><code>[ServiceContract] public interface IMyService { [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate="TestMethod/")] Stream TestMethod(Stream input); } public class MyService: IMyService { Stream IMyService.TestMethod(Stream input) { byte[] buffer = new byte[10000]; int bytesRead, totalBytesRead = 0; this.currentResponseOffset = 0; do { bytesRead = input.Read(buffer, 0, buffer.Length); totalBytesRead += bytesRead; } while (bytesRead &gt; 0); input.Close(); return new MemoryStream(buffer, 0, totalBytesRead); } } </code></pre> <p>With a configuration that looks like:</p> <pre><code>&lt;services&gt; &lt;service name="MyService" &gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:8732/Design_Time_Addresses/MyService/" /&gt; &lt;add baseAddress="net.tcp://localhost:4504/Design_Time_Addresses/MyService/" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;endpoint address="MyTCPService" binding="netTcpBinding" contract="IMyTCPService"&gt; &lt;/endpoint&gt; &lt;endpoint address="MyHTTPService" binding="webHttpBinding" behaviorConfiguration="web" contract="IMyService"&gt;&lt;/endpoint&gt; &lt;endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt; &lt;!--&lt;endpoint binding="mexHttpsBinding" bindingConfiguration="" contract="IMetadataExchange" /&gt;--&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="web"&gt; &lt;webHttp /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; </code></pre> <p>I was able to test it out with a .net client, though the whole point of this post was to know how to make it cross platform. I guess we will see soon enough! Thanks @I4V for your help, it was much appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload