.NET SOAP Web Service return JSON - asp.net

I need to prepare a .Net SOAP Web Service which returns JSON format, we have to use those service in iPad & Android.
I searched a lot but found only WCF Restful service that return JSON and ASMX SOAP service that return XML.
Please help me to prepare a .Net SOAP web service which returns JSON data either WCF or ASMX (WCF recommended).
If possible please also let me know what is the standard format (WCF REST return JSON, WCF SOAP return JSON, ASMX SOAP return XML, etc.) to use .NET web-services with iPad/iPhone & Android.

Using WCF it is trivial to return JSON, and IOS developers will love you if you avoid SOAP. Since you didn't specify a version of .NET you require, I will point you to the latest and greatest feature called Web API. See the tutorial here
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api

You can use WebAPI with Web Forms too http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-aspnet-web-forms

Think service stack library. You can use with an asp.net web form app or mvc app.
http://www.servicestack.net/

Related

Return WCF SOAP Response from ASP Web API

I have an ASP Web API project that needs to receive a WCF SOAP request and return the result in SOAP respond.
I'm planning not to create a WCF service because I need only ONE endpoint to work with this partner.
I manage to receive and process the SOAP Request.
My challenge now is to return my result / response in SOAP format, how do I do it?
Quote from MSDN
Services written with the WCF WEB HTTP programming model do not use
SOAP messages.

How to make an ASMX web service run in singleton mode?

i am using web service asmx, whenever a new request comes, all objects will be null,
i want to keep some objects after each request, so how to do it?
There is no way to do this with ASMX web services. You would need to use WCF.
You should be using WCF in any case, as ASMX is a legacy technology.

How to call XML Webservices in ASP.Net

I am trying to call web services in my asp.net application.
I got success in calling normal web service.
But Now I am trying to call xml web services in my web project.
I have try for this using xmlhttp but i didn't get success in this.
Can anyone help me in this?
It's not clear what you mean by XML web service. For example ASP.NET web services that use SOAP are also XML. Maybe you mean a POX service (Plain Old XML)? In this case you could use a WebClient or an HttpWebRequest to manually forge and send an HTTP request to a given resource and fetch the result.

Invoking a Web Service Without using Web Reference with SOAP authencation in asp.net

I need to bind web service reference at run time with SOAP or WSE authentication in ASP.NET.
i can handle this without authentication, but not getting the way to do this with SOAP or WSE authentication.
Any one can help me please...

Are asmx webservices compatible with REST?

I was just wondering are asmx files compatible with REST style requests?
I have some asmx files which need to service some third-party programs which are setup to send REST requests, not SOAP.
First of all, you should not be using ASMX for new service development: you should use WCF instead. It's much easier with WCF to have the same service handle both SOAP and REST-style endpoints.
The closest that an ASMX service will get to REST is that it can be configured to permit a GET or POST request, in which case it will return plain XML, with no SOAP envelope.
See Configuration Options.
But if you're trying to get "true REST" from ASMX, then you're out of luck.

Resources