It's an optional element according to [1] and we were simply
throwing a NotImplementedException when encountering it.
Fixed by reading the element value instead. I noticed that we
had a 'details' variable that was never assigned, so the check
for `details == null` was always true and can be removed.
This makes inlining the body of the CreateFault() call easier
since we no longer need to choose different overloads and makes
the code consistent with the CreateFault12 method.
Also added a better exception in case of an unrecognized element.
The CreateFault12 method (handles SOAP 1.2) does not need a similar
fix since actor is not an element in that version [2].
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42226
[1] https://www.w3.org/TR/soap11/#_Toc478383507
[2] https://www.w3.org/TR/soap12/#soapfault
The names were fixed only for the subset of methods that are included in netstandard,
and in cases where netstandard differs from Desktop .NET we match with .NET.
* MessageFault.cs : when created from XmlReader, it should not
deserialize fault details immediately. This class itself should
not do that. Strongly typed FaultContractInfo may want to use the
reader (GetReaderAtDetailContents()) for its own deserialization.
svn path=/trunk/mcs/; revision=154695
* MessageFault.cs : Write Subcode element correctly and fix wrong
Code/Value/Subcode element relationship. Give better error message.
svn path=/trunk/mcs/; revision=154279
* MessageFault.cs : support EnvelopeVersion.None as well, as almost
the same as SOAP12.
* MessageFaultTest.cs : add CreateFault test with MessageVersion.None.
svn path=/trunk/mcs/; revision=148797
* MessageFault.cs : Reason is mandatory. raise XmlException, and
CommunicationException in each CreateFault().
* soap-fault-incomplete.xml : new test file.
* MessageFaultTest.cs : new test.
* System.ServiceModel.dll_test.sources: added MessageFaultTest.cs.
svn path=/trunk/mcs/; revision=134197