| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using CoreWCF.Channels; |
| | | 5 | | using CoreWCF.Runtime; |
| | | 6 | | |
| | | 7 | | namespace CoreWCF |
| | | 8 | | { |
| | | 9 | | //[Serializable] |
| | | 10 | | internal class ActionMismatchAddressingException : ProtocolException |
| | | 11 | | { |
| | | 12 | | public ActionMismatchAddressingException(string message, string soapActionHeader, string httpActionHeader) |
| | 0 | 13 | | : base(message) |
| | | 14 | | { |
| | 0 | 15 | | HttpActionHeader = httpActionHeader; |
| | 0 | 16 | | SoapActionHeader = soapActionHeader; |
| | 0 | 17 | | } |
| | | 18 | | |
| | | 19 | | //protected ActionMismatchAddressingException(SerializationInfo info, StreamingContext context) |
| | | 20 | | // : base(info, context) |
| | | 21 | | //{ |
| | | 22 | | //} |
| | | 23 | | |
| | 0 | 24 | | public string HttpActionHeader { get; } |
| | | 25 | | |
| | 0 | 26 | | public string SoapActionHeader { get; } |
| | | 27 | | |
| | | 28 | | internal Message ProvideFault(MessageVersion messageVersion) |
| | | 29 | | { |
| | | 30 | | Fx.Assert(messageVersion.Addressing == AddressingVersion.WSAddressing10, ""); |
| | 0 | 31 | | WSAddressing10ProblemHeaderQNameFault phf = new WSAddressing10ProblemHeaderQNameFault(this); |
| | 0 | 32 | | Message message = Channels.Message.CreateMessage(messageVersion, phf, messageVersion.Addressing.FaultAction) |
| | 0 | 33 | | phf.AddHeaders(message.Headers); |
| | 0 | 34 | | return message; |
| | | 35 | | } |
| | | 36 | | } |
| | | 37 | | } |