SOAP, JSON and POX in same restful wcf SOAP, JSON and POX in same restful wcf json json

SOAP, JSON and POX in same restful wcf


well I just added changed the binding configuration for json behaviour. I was using same binging configuration for JSON and POX. Now I have changed the configuration to:

<service behaviorConfiguration="WebBehaviour" name="MyServices">        <clear />        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttp"         name="basicHttpBinding" contract="DJSharedServices.IMyServices" />        <endpoint address="ws" binding="wsHttpBinding" bindingConfiguration="WsHttp"          name="wsHttpBinding" contract="DJSharedServices.IMyServices" />        <endpoint address="web" binding="webHttpBinding" bindingConfiguration="WebHttp" behaviorConfiguration="webBehavior"          name="webHttpBinding" contract="DJSharedServices.IMyServices" />        <endpoint address="json" binding="webHttpBinding" bindingConfiguration="WebjsonHttp" behaviorConfiguration="webJSONBehavior"          name="webJSONHttpBinding" contract="DJSharedServices.IMyServices" />        <endpoint address="mex" binding="mexHttpBinding"    contract="IMetadataExchange"   name="mexBinding" />               </service> 

and added binding configuration:

 <webHttpBinding>        <binding name="WebHttp"  >          <security mode="None"></security>        </binding>        <binding name="WebjsonHttp"  >          <security mode="None"></security>        </binding>      </webHttpBinding>


Do yourself a favour and stop trying to create one service that does both SOAP and REST. You are going to end up with a mess. Review your requirements and pick the approach this is most suitable to your needs.