How to remove extra result tag from my SOAP response
<p>I know this questions has been asked before but I could not find my answer anywhere.</p>

<p>the thing is I have below code on my asmx file:</p>

<pre><code>namespace IrancellSmsServer
{
    [SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)]
    [WebService(Namespace =   "http://www.csapi.org/schema/parlayx/data/sync/v1_0/local")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]

    public class SoapServer : System.Web.Services.WebService
    {
        [WebMethod]
        public syncOrderRelationResponse syncOrderRelation(
            Sync.UserID userID,
            string spID,
            string productID,
            string serviceID,
            string serviceList,
            int updateType,
            string updateTime,
            string updateDesc,
            string effectiveTime,
            string expiryTime,
            item[] extensionInfo
            )
        {    
            syncOrderRelationResponse a = new syncOrderRelationResponse();
            a.result = 0;
            a.resultDescription = "OK";         
            return a;
        }
     }
}
</code></pre>

<p>And this is the result:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Body&gt;
    &lt;syncOrderRelationResponse xmlns="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local"&gt;
      &lt;syncOrderRelationResult&gt;   //dont want this
        &lt;result&gt;0&lt;/result&gt;
        &lt;resultDescription&gt;OK&lt;/resultDescription&gt;
      &lt;/syncOrderRelationResult&gt;  //dont want this
    &lt;/syncOrderRelationResponse&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope
</code></pre>

<p>the problem is I dont want that extra <code>&lt;syncOrderRelationResult&gt;</code> tag that .net created automatically. I want it completely remove. I have tried [SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare)]</p>

<p>but no luck it tels me I should have one parameter. is there any way I could do this?</p>

<p>expected result:</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;soap:Body&gt;
        &lt;syncOrderRelationResponse xmlns="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local"&gt;
            &lt;result&gt;0&lt;/result&gt;
            &lt;resultDescription&gt;OK&lt;/resultDescription&gt;
        &lt;/syncOrderRelationResponse&gt;
      &lt;/soap:Body&gt;
    &lt;/soap:Envelope
</code></pre>

<p>here is the code of syncOrderRelationResponse:</p>

<pre><code>namespace IrancellSmsServer.Sync {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;

    /// &lt;remarks/&gt;
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1055.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="DataSyncBinding", Namespace="http://www.csapi.org/wsdl/parlayx/data/sync/v1_0/service")]
    public partial class DataSyncService : System.Web.Services.Protocols.SoapHttpClientProtocol {

        private bool useDefaultCredentialsSetExplicitly;

        /// &lt;remarks/&gt;
        public DataSyncService() {
            this.Url = global::IrancellSmsServer.Properties.Settings.Default.IrancellSmsServer_Sync_DataSyncService;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }

        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            &amp;&amp; (this.useDefaultCredentialsSetExplicitly == false)) 
                            &amp;&amp; (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }

        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }


        /// &lt;remarks/&gt;
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
        [return: System.Xml.Serialization.XmlElementAttribute("syncOrderRelationResponse", Namespace="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local")]
        public syncOrderRelationResponse syncOrderRelation([System.Xml.Serialization.XmlElementAttribute("syncOrderRelation", Namespace="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local")] syncOrderRelation syncOrderRelation1) {
            object[] results = this.Invoke("syncOrderRelation", new object[] {
                        syncOrderRelation1});
            return ((syncOrderRelationResponse)(results[0]));
        }


        /// &lt;remarks/&gt;
        public void syncOrderRelationAsync(syncOrderRelation syncOrderRelation1, object userState) {
            if ((this.syncOrderRelationOperationCompleted == null)) {
                this.syncOrderRelationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsyncOrderRelationOperationCompleted);
            }
            this.InvokeAsync("syncOrderRelation", new object[] {
                        syncOrderRelation1}, this.syncOrderRelationOperationCompleted, userState);
        }
    }

    /// &lt;remarks/&gt;
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local")]
    public partial class syncOrderRelationResponse {

        private int resultField;

        private string resultDescriptionField;

        //private item[] extensionInfoField;

        /// &lt;remarks/&gt;
        public int result {
            get {
                return this.resultField;
            }
            set {
                this.resultField = value;
            }
        }

        /// &lt;remarks/&gt;
        public string resultDescription {
            get {
                return this.resultDescriptionField;
            }
            set {
                this.resultDescriptionField = value;
            }
        }

        /// &lt;remarks/&gt;
        //[System.Xml.Serialization.XmlArrayItemAttribute("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)]
        //public item[] extensionInfo {
        //    get {
        //        return this.extensionInfoField;
        //    }
        //    set {
        //        this.extensionInfoField = value;
        //    }
        //}
    }



        /// &lt;remarks/&gt;
        public syncOrderRelationResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((syncOrderRelationResponse)(this.results[0]));
            }
        }
    }
    }
}
</code></pre>