Skip to content

Commit

Permalink
Merge pull request #471 from DigDes/develop
Browse files Browse the repository at this point in the history
1.1.0.0-alpha
  • Loading branch information
kotovaleksandr authored Apr 29, 2020
2 parents 431646b + 66e013b commit 05d539d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SoapCore.Tests.FaultExceptionTransformer
{
public class TestFaultExceptionTransformer : IFaultExceptionTransformer
{
public Message ProvideFault(Exception exception, MessageVersion messageVersion, XmlNamespaceManager xmlNamespaceManager)
public Message ProvideFault(Exception exception, MessageVersion messageVersion, Message requestMessage, XmlNamespaceManager xmlNamespaceManager)
{
var fault = new TestFault
{
Expand Down
2 changes: 1 addition & 1 deletion src/SoapCore/DefaultFaultExceptionTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public DefaultFaultExceptionTransformer(ExceptionTransformer exceptionTransforme
_exceptionTransformer = exceptionTransformer;
}

public Message ProvideFault(Exception exception, MessageVersion messageVersion, XmlNamespaceManager xmlNamespaceManager)
public Message ProvideFault(Exception exception, MessageVersion messageVersion, Message requestMessage, XmlNamespaceManager xmlNamespaceManager)
{
var bodyWriter = _exceptionTransformer == null ?
new FaultBodyWriter(exception, messageVersion) :
Expand Down
3 changes: 2 additions & 1 deletion src/SoapCore/Extensibility/IFaultExceptionTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ public interface IFaultExceptionTransformer
/// </summary>
/// <param name="exception">Exception to transform</param>
/// <param name="messageVersion">SOAP message version</param>
/// <param name="requestMessage">SOAP requestMessage</param>
/// <param name="xmlNamespaceManager">Namespace manager</param>
/// <returns>Fully formatted SOAP Message</returns>
/// <seealso cref="MessageFaultBodyWriter"/>
Message ProvideFault(Exception exception, MessageVersion messageVersion, XmlNamespaceManager xmlNamespaceManager);
Message ProvideFault(Exception exception, MessageVersion messageVersion, Message requestMessage, XmlNamespaceManager xmlNamespaceManager);
}
}
4 changes: 2 additions & 2 deletions src/SoapCore/SoapCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>SOAP protocol middleware for ASP.NET Core</Description>
<VersionPrefix>1.0.0.4-alpha</VersionPrefix>
<VersionPrefix>1.1.0.0-alpha</VersionPrefix>
<Authors>Digital Design</Authors>
<TargetFrameworks>netcoreapp3.0;netstandard2.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<AssemblyName>SoapCore</AssemblyName>
Expand All @@ -14,7 +14,7 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>1.0.0.4-alpha</Version>
<Version>1.1.0.0-alpha</Version>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>SoapCore.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion src/SoapCore/SoapEndpointMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ private async Task<Message> WriteErrorResponseMessage(
HttpContext httpContext)
{
var faultExceptionTransformer = serviceProvider.GetRequiredService<IFaultExceptionTransformer>();
var faultMessage = faultExceptionTransformer.ProvideFault(exception, messageEncoder.MessageVersion, _xmlNamespaceManager);
var faultMessage = faultExceptionTransformer.ProvideFault(exception, messageEncoder.MessageVersion, requestMessage, _xmlNamespaceManager);

httpContext.Response.ContentType = httpContext.Request.ContentType;
httpContext.Response.Headers["SOAPAction"] = faultMessage.Headers.Action;
Expand Down

0 comments on commit 05d539d

Please sign in to comment.