Namespace prefix in the SOAP envelope RRS feed


  • Hi CC1989,

    For removing namespance prefix in the SOAP, you could try to create a custom MessageFormatter, and use below code in OnWriteStartEnvelope.

            protected override void OnWriteStartEnvelope(System.Xml.XmlDictionaryWriter writer)
                //remove prefix
                writer.WriteStartElement("Envelope", "");
                //add new attribute without prefix
                //writer.WriteAttributeString("c2b", null, "");

    For more information about MessageFormatter, you could refer the link below:

    # Customize WCF Envelope and Namespace Prefix

    Best Regards,


    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft does not control these sites and has not tested any software or information found on these sites;
    Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 25, 2016 9:06 AM