Forum Discussion

KLWallace's avatar
KLWallace
New Contributor
2 months ago
Solved

SOAP Request works in SoapUI, but not in C# code

This envelope successfully contacts an API endpoint and returns data as expected. <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchem...
  • KLWallace's avatar
    2 months ago

    Turns out the SoapUI interface had a configured "SOAP Action", that I was not adding as a header in my HTTPWebRequest.  Problem solved by adding:

    request.Headers.Add("SOAPAction", "http://contoso.com/queryRecordsRequest");