WCF client does not include XML declaration in HTTP POST message

后端 未结 1 1176
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-19 17:16

This post regards the last hurdle in completing my task of communicating with a Cisco router via the Web Services Management Agent (WSMA), as described here and here. You wi

相关标签:
1条回答
  • 2020-12-19 18:03

    You will have to create custom encoder. Check WCF samples. Provided sample shows how to create new encoder with composition of existing one. You will use TextMessageEncodingBindingElement to create inner MessageEncoder. Your WriteMessage implementatoin will write XML declaration and than call inner encoder to write serialized message.

    You will also need to wrap your new encoder in custom binding element and use it in custom binding together with HttpTransportBindingElement.

    0 讨论(0)
提交回复
热议问题