Skip to content

Commit 23bd7c0

Browse files
committed
Update README.md
1 parent 7b8624b commit 23bd7c0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,29 @@ public class Startup
7474

7575
```
7676

77+
#### Configuring the request pipeline
78+
79+
Middleware can be added in the MapSoapService methods, both for endpoint routing in AspNetCore 3.1 and middleware in AspNetCore 2.1. This can be done to, for example, handle custom SOAP headers. Any AspNetCore middleware can be used as well as middleware that implements either our SoapMiddleware or SoapHeaderMiddleware classes.
80+
81+
```csharp
82+
public void Configure(IApplicationBuilder builder)
83+
{
84+
builder
85+
.UseRouting()
86+
.UseEndpoints(endpoints =>
87+
{
88+
endpoints.MapSoapService<IEchoServiceContract>(
89+
"/echo",
90+
MessageVersion.Soap11,
91+
// This will be used after the SOAP request has been accepted.
92+
// This will be used before all SOAP headers must be understood and before the service method has been invoked.
93+
b => b.AddMiddleware<MyCustomMiddleware>()
94+
);
95+
})
96+
;
97+
}
98+
```
99+
77100
#### Say goodbye to server side Bindings
78101

79102
As you can see above, we are not using System.ServiceModel.Channels.Binding on the server side. We felt that it was unnecessary. If you're going to host the service with https, why would you need to program that in? Just host with https!

0 commit comments

Comments
 (0)