e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
//-----------------------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//-----------------------------------------------------------------------------
|
|
|
|
namespace System.ServiceModel
|
|
{
|
|
using System;
|
|
using System.Runtime;
|
|
using System.Runtime.Serialization;
|
|
using System.ServiceModel.Channels;
|
|
|
|
[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)
|
|
{
|
|
Fx.Assert(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;
|
|
}
|
|
}
|
|
}
|