title: How to receive an XML sent to a webform from a webservice
body: <p>I'm going to use a web service for sending SMS to customers cells. 
  My provider (Vodafone-Redbox) sent me a WDSL file to use their services. I added a reference in my web application using that provided file, and I invoked the available functions successfully. No problems here.</p>
  
  <p>The trouble appears when trying to use the "acknowledgment" feature, to confirm that an SMS has reached its destination. For this feature, Vodafone asked me an URL to send confirmation messages in XML format. Thinking that would be a GET or POST to the URL (an ASP.NET webform), I asked them for the method and parameter name, but their response was that no GET or POST is fired, just the system "sends" the XML to the URL. As far as I know, the only way to send something to a webform from another is with parameters via GET or POST, but I'm aware that my skills are very limited and it's possible I'm wrong here.</p>
  
  <p>Trying to figure out how to "capture" the XML sent, I got the idea of reading everything that went into the page whenever this was called, using Request.Params in Page_Load function. With key-value pairs in Params collection, construct a string and save it in database. </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      /* Connect to database */
  
      try
      {
          NameValueCollection valoresentrada = Request.Params;
          int numvalores = valoresentrada.Count;
          StringBuilder sbmensaje = new StringBuilder();
  
          if (numvalores &gt; 0)
          {
              sbmensaje.Append("Page invoked with params.\n");
              for (int i = 0; i &lt; numvalores; i++)
              {
                  sbmensaje.Append("Clave nº" + (i + 1).ToString() + ": " + valoresentrada[i]);
                  sbmensaje.Append(". Valor: " + valoresentrada.Get(i));
                  sbmensaje.Append("\n");
              }
          }
          else
          {
              sbmensaje.Append("Page invoked with no params.\n");
          }
  
          /* Save page access and string to database */
      }
      catch (Exception ex)
      {
          /* Save page access and error to database */
      }
      finally
      {
          /* Disconnect database */
      }
  }
  </code></pre>
  
  <p>The code works when I open the URL with browser (obviously no XML is captured, but the access to the page is registered and the params collection is readed and stored in database). But when Vodafone supposedly sends the XML with the ACK, nothing is stored in the database, and this means that Page_Load function is not executed. I've contacted Vodafone, but the answer is only that they don't provide support to the client's application development.</p>
  
  <p>At this point I don't know if the procedure is correct but should be implemented in other point of page lifecycle (perhaps Page_Init?), if the procedure is absolutely silly, if there's another way to receive "something" sent to a page... I'm totally lost and I'm unable to find articles in Internet. Whenever I look for "send XML to an ASP.NET page" I find explanations on how to create a web service, but not how to collect a response sent by a web service. If anyone has ever had to deal with something like this, or have a clue that could help me, I will be eternally grateful.</p>