ActionMismatchAddressingException.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / ActionMismatchAddressingException.cs / 1 / ActionMismatchAddressingException.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel 
{
    using System; 
    using System.ServiceModel.Channels; 
    using System.Runtime.Serialization;
 
    [Serializable]
    internal class ActionMismatchAddressingException : ProtocolException
    {
        string httpActionHeader; 
        string soapActionHeader;
 
        public ActionMismatchAddressingException(string message, string soapActionHeader, string httpActionHeader) : base(message) 
        {
            this.httpActionHeader = httpActionHeader; 
            this.soapActionHeader = soapActionHeader;
        }

        protected ActionMismatchAddressingException(SerializationInfo info, StreamingContext context) : base(info, context) { } 

        public string HttpActionHeader 
        { 
            get
            { 
                return httpActionHeader;
            }
        }
 
        public string SoapActionHeader
        { 
            get 
            {
                return soapActionHeader; 
            }
        }

        internal Message ProvideFault(MessageVersion messageVersion) 
        {
            DiagnosticUtility.DebugAssert(messageVersion.Addressing == AddressingVersion.WSAddressing10, ""); 
            WSAddressing10ProblemHeaderQNameFault phf = new WSAddressing10ProblemHeaderQNameFault(this); 
            Message message = System.ServiceModel.Channels.Message.CreateMessage(messageVersion, phf, messageVersion.Addressing.FaultAction);
            phf.AddHeaders(message.Headers); 
            return message;
        }
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK