pmorelli92/SoapHttpClient

get SOAP envelope XML

LuisLeguizamon opened this issue · 2 comments

Hi.

How can I catch/get the entire SOAP envelope XML that is sent? Mi goal is to get the entire message that have been sent and save it.

Actually I am saving the XML body (the one that I pass to PostAsync function) but I need the entire message on SOAP.

Thank you so much for the answer.
I've tried what you suggested and I get the entire SOAP request, but I am not understanding something. Inside the override function "SendAsync" https://github.com/pmorelli92/SoapHttpClient/blob/main/Tests/SoapHttpClient.Tests/TestMessageHandler.cs#L40
How can I return the response or how can I return the base Send Async function? ( base.SendAsync(request, cancellationToken) )
I have searched but the examples that I found used a "DelegatingHandler"