title: How to send a C# SOAP response to SoapUI before closing the web service?
body: <p>The web service receives a SOAP request from SoapUI, parses it and records to a log. Here's the XML:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loc="localhost"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;loc:HTTPWebService&gt;
           &lt;!--Optional:--&gt;
           &lt;loc:input&gt;Data1&lt;/loc:input&gt;
           &lt;payload&gt;Data1&lt;/payload&gt;
        &lt;/loc:HTTPWebService&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>What I would like the web service to do is to respond with a simple string i.e "OK" back to SoapUI and after the message has been sent record the time when the response was sent. Currently the only way I'm able to send a response is by returning the string when the web service closes. Here's an example of what I've been searching for:</p>
  
  <pre><code>   public void sendReply()
          {
              //Do stuff and send the string
              //Write to a log after the response has been sent
          }
  </code></pre>
  
  <p>The log part is done but I can't get the sending bit to work.</p>