title: Web Service - SoapClient not in assembly reference
body: <p>I am doing some course work and am extremely confused as the course uses seemingly the same names for different things.</p>
  
  <p>It creates a web service and then this application consumes it and displays the result.</p>
  
  <p>The web service has a method called <code>MBCProductDetails()</code>
  The actual service reference in the app consuming it is also called MBCProductDetails</p>
  
  <p>This is the Code the Course gives me to consume it - </p>
  
  <pre><code>private async void btnGetRates_Click(object sender, RoutedEventArgs e)
  {
      MBCProductDetails.MBCProductDetailsSoapClient serviceMBCProductDetails = new MBCProductDetails.MBCProductDetailsSoapClient();
  
      MBCProductDetails.GetProductDetailsResponse MBCProductDetailsResponse = await serviceMBCProductDetails.GetProductDetailsAsync(Convert.ToInt32(txtProductCode.Text));
  
      tbProductNameValue.Text = "Product: " + MBCProductDetailsResponse.Body.GetProductDetailsResult.ProductName;
      tbInterestRateValue.Text = "Interest Rate: " + MBCProductDetailsResponse.Body.GetProductDetailsResult.InterestRate.ToString();
      tbAccountKeepingFeeValue.Text = "Account Fee: " +  MBCProductDetailsResponse.Body.GetProductDetailsResult.AccountFee.ToString();
  
  }
  </code></pre>
  
  <p>Now I am trying to do this myself but when I do i get <code>MBCProductDeatilsSoapClient does not exist in the namespace.</code></p>
  
  <p>Could anybody run me through exactly what is going on here, which names go where and such because I am thoroughly confused. Cheers</p>
  
  <p>Edit:</p>
  
  <p>This is the code from the Web Service </p>
  
  <pre><code>public struct ProductDetails
  {
      public int ProductCode;
      public string ProductName;
      public double InterestRate;
      public double AccountFee;
  }
  
  private ProductDetails Products;
  
  public MBCProductDetails()
  {
      Products.ProductCode = 0;
      Products.ProductName = "";
      Products.InterestRate = 0;
      Products.AccountFee = 0;
  }
  
  private void AssignValues(int ProductCode)
  {
  
      Products.ProductCode = ProductCode;
  
      if (ProductCode == 1)
      {
          Products.ProductName = "Everyday Loan Account";
          Products.InterestRate = 4.5;
          Products.AccountFee = 10;
      }
      else if (ProductCode == 2)
      {
          Products.ProductName = "Business Loan Account";
          Products.InterestRate = 3.5;
          Products.AccountFee = 12;
      }
      else if (ProductCode == 3)
      {
          Products.ProductName = "Offset Loan Account";
          Products.InterestRate = 5.0;
          Products.AccountFee = 15;
      }
      else
      {
          Products.ProductName = "Loan Account not found";
          Products.InterestRate = 0.0;
          Products.AccountFee = 0;
      }
  }
  
  [WebMethod(Description = "This method call will get the product name, interest rate and the account fee for a given product code.", EnableSession = false)]
  public ProductDetails GetProductDetails(int ProductCode)
  {
      AssignValues(ProductCode);
      ProductDetails RequestedProductDetails = new ProductDetails();
      RequestedProductDetails.ProductCode = Products.ProductCode;
      RequestedProductDetails.ProductName = Products.ProductName;
      RequestedProductDetails.InterestRate = Products.InterestRate;
      RequestedProductDetails.AccountFee = Products.AccountFee;
      return RequestedProductDetails;
  }
  </code></pre>