1

I can connect to my API using SoapUI and it returns a string of tournaments. My C#/ASP.NET website needs to do the following:

  1. The user clicks an import button.
  2. The import button pulls a string of tournaments from the API. (How do I use C# to call the API)?
  3. Parse the tournaments out of the string of data and save them to a database. (I have this part under control).

Here is what the Soap Envelope looks like:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:war="WarehouseServices/">
   <soap:Header/>
   <soap:Body>
      <war:Warehouse>
         <!--Optional:-->
         <war:username></war:username>
         <!--Optional:-->
         <war:password></war:password>
         <war:systemId></war:systemId>
         <!--Optional:-->
         <war:date></war:date>
         <war:productGroupId></war:productGroupId>
      </war:Warehouse>
   </soap:Body>
</soap:Envelope>

Using the SoapUI I can pull the string of tournaments just fine, but how do I make C# do it?

I look forward to receiving your kind help and consideration. Long live our coders!

Antal Spector-Zabusky
  • 36,191
  • 7
  • 77
  • 140
  • In the future, make sure you use ASP.NET instead of ASP. ASP is something completely different. – Lex Li Sep 11 '13 at 02:26
  • Duplicate [http://stackoverflow.com/...](http://stackoverflow.com/questions/17483182/calling-web-api-service-from-a-net-2-0-client)? See `WebClient` class. – Gabriel GM Sep 11 '13 at 03:06

0 Answers0