Remove xml namespaces from WCF restful response

前端 未结 9 1657
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 11:13

I am using WCF to return a plain old XML (POX) document to the caller. I am using the XML Serializer formatter to turn the objects into XML.

In the returned docum

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 11:15

    I had the same problem. Adding BodyStyle:=WebMessageBodyStyle.Bare to WebInvoke worked for me. Response is no longer wrapped in a metadata.

提交回复
热议问题