title: Can't a WCF SOAP service return JSON as output?
body: <p><strong>History</strong></p>
  
  <hr>
  
  <p>I am basically a front end (android) developer and never had to create a web service
  Rather I was at the consuming end . 
  Now this WCF business is overwhelming and I believe terribly complicated with a steep learning curve.</p>
  
  <p><strong>The Task</strong></p>
  
  <hr>
  
  <p>I need to make a simple SOAP service , hello world for the time being that would take an input XML , BUT RETURN JSON . </p>
  
  <p>I am not sure why don't we have similar queries on the internet , kind of makes me wonder if it is not possible at all ?. </p>
  
  <p>This is what I have so far . </p>
  
  <p><strong>Current Progress</strong></p>
  
  <hr>
  
  <p>My Contract</p>
  
  <pre><code>[ServiceContract]
      public interface IHelloWorldService
      {
          [OperationContract]
          String GetMessage(String name);
      }
  </code></pre>
  
  <p>My Contract Impl</p>
  
  <pre><code>public string GetMessage(string name)
          {
              return "Hello World from " + name + "!";
          }
  </code></pre>
  
  <p>My Service Config (in Web.Config. I have hosted this service in a asp.net website)</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="MyServiceTypeBehaviors"&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="WebBehavior"&gt;
            &lt;webHttp defaultOutgoingResponseFormat="Json" /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
  
      &lt;services&gt;
        &lt;service name="MyWcfServices.HelloWorldService"          behaviorConfiguration="MyServiceTypeBehaviors"&gt;
          &lt;endpoint address="" binding="wsHttpBinding"       behaviorConfiguration="WebBehavior"     contract="MyWcfServices.IHelloWorldService"/&gt;
          &lt;endpoint contract="IMetadataExchange"            binding="mexHttpBinding" address="mex"/&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p><strong>Questions</strong></p>
  
  <hr>
  
  <ol>
  <li>Is SOAP closely bounded to XML? Such that you can not send JSON as output?</li>
  <li>Is it true that to send JSON as output you would need to go to the REST paradigm?</li>
  <li>Do I get an XML everytime because I am using WCFStorm fiddles with the HTTP headers and send an XML mime type by default?</li>
  <li>How would I test a WCF service that returns JSON? Do I have any test client for that? I downloaded a Chrome Extension called Wizdler but for some reason it only works with the binding "basicHttpBinding". I have been told that I cannot use this binding if I want to make a SOAP service. </li>
  </ol>
  
  <p>I would be indeed indebted if you guys could point me to the correct direction. Also I am just 2 days old in this webservice coven , so I apologize for my naivety .</p>