I have an ASP.Net web service
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Web; using System.Web.Services; namespace WebApplication1 { /// <summary> /// Summary description for WebService1 /// </summary> [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class WebService1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld(int i) { return "Hello World"; } } } Now it returns such XML
<?xml version="1.0" encoding="UTF-8"?> <string xmlns="http://tempuri.org/">Hello World</string> How do I make it return as a SOAP message?