Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There a couple of things you may need to do (or check if you have done):</p> <p>Your GetData OperationContract needs to be decorated with [WebGet] attribute.</p> <pre><code> [WebGet] [OperationContract] object GetData(int value); </code></pre> <p>Your WebServiceWrapper class needs to be decorated with [AspNetCompatibilityRequirements] attribute (Add a reference to System.ServiceModel.Web for this to be available)</p> <pre><code> [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class WebServiceWrapper : IWebServiceWrapper </code></pre> <p>The return value from GetData operation will need to be wrapped. An easy way is to use a JavaScriptSerializer to serialize the object to json</p> <pre><code> var serializer = new JavaScriptSerializer(); return serializer.Serialize(new { ReturnValue = string.Format("You entered: {0}", value) }); </code></pre> <p>You need to make sure you are using a [webHttpBinding] in your endpoints (client and services)</p> <pre><code>&lt;endpoint ... binding="webHttpBinding" ... /&gt; </code></pre> <p>I dont know if this next thing is mandatory, but you may need an endpoint behaviour that enables web script</p> <pre><code>&lt;endpointBehaviors&gt; &lt;behavior name="[endpointBehaviorName]"&gt; &lt;enableWebScript/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; </code></pre> <p>You will obviously need to refer to this behavior configuration in your endpoint(s)</p> <pre><code>&lt;endpoint ... behaviorConfiguration="[endpointBehaviorName]" ... /&gt; </code></pre>
    singulars
    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.
    1. VO
      singulars
      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