Unexpected behaviour with requered ordering position XML node on ServiceStack WS

谁说胖子不能爱 提交于 2019-12-24 13:52:10

问题


Now as I know ServiceStack uses .NET's Xml DataContractSerializer to serialize/deserialize XML, but with it we have some truble in case when our webservice API used not .NET framework.

This problem very good described in this post if try short describe of problem:

Requirement of strict sequence of nodes XML is very uncomfortable for some external no. NET system.

Is it possible to use a different serialize or configure the ServiceStack used, so that he did not expect the elements in a rigidly defined positions?


回答1:


ServiceStack uses .NET's XML DataContract serializer under the hood. It is not customizable beyond what is offered by the underlying .NET's Framework implementation.

I've answered how to override the ServiceStack's default XML Serialization with a custom XML Serializer in this earlier question:

https://stackoverflow.com/a/13498725/85785



来源:https://stackoverflow.com/questions/13670952/unexpected-behaviour-with-requered-ordering-position-xml-node-on-servicestack-ws

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!