[System.ServiceModel] Recognize 'faultactor' in SOAP fault message
commit69b3397c8e9097e9fdb69c867664975c898a0a16
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 4 Nov 2016 14:59:18 +0000 (4 15:59 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 4 Nov 2016 15:18:46 +0000 (4 16:18 +0100)
tree2ece25c3f4b2396f34c4641cb190a4b169a5b921
parent52977849ff13443133541de513ad94b337c2e6cf
[System.ServiceModel] Recognize 'faultactor' in SOAP fault message

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
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs