I'm using the built-in SOAP support in .Net through a wrapper class generated by Visual Studio from a WSDL.
Now, when I call one one of the methods on the wrapper and pass an object that contains a string with CRLF (\r\n
), only the LF (\n
) will end up on the server. The same happens vice-versa. When the server sends a string containing CRLF, the wrapper will only spit out the LF.
I know this is a problem that can usually be avoided by supplying an own XmlWriter
to the XmlSerializer
, but I can't find a place where I could specify anything like that in the provided framework.
I almost want to go with the RegEx solution provided in this thread, but I have a hard time believing that there is nothing in place to prevent this issue.