title: Can't access method in class in web service
body: <p>I have an asp web service that contains a class which has a function inside of it, but I can't seem to access that function when I'm referencing it in my winforms project.  All other aspects of my webservice are working and everything updates according to my changes.  Here is the code in my web service that illustrates the problem I'm having.  In the example, if I were to create an instance of ItemOrder from a winform project referencing this web service, I would not be able to call AddItem(...).</p>
  
  <pre><code>[WebService(Namespace = "http://myurl.com/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [ToolboxItem(false)]
  public class MyWebService : System.Web.Services.WebService
  {
  
      [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://myurl.com/")]
      public class ItemOrder
      {
          public string OrderNumber = "";
          public DateTime OrderDate = DateTime.Now;
          public decimal TotalCost = 0M;
  
          internal List&lt;Item&gt; items = new List&lt;Item&gt;();
  
          [WebMethod]
          public void AddItem(string reference)
          {
              Item item = new Item();
              item.ItemReference = reference;
              items.Add(item);
          }
      }
  
      [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://myurl.com/")]
      public class Item
      {
          public decimal Cost = 0M;
          public decimal Price = 0M;
          public string ItemReference = "";
      }
  }
  </code></pre>
  
  <p>The code above is a simplified example, not my entire situation.  My problem is that I cannot call any methods for classes defined within the web service class.  I can call a method defined in the root web service class (MyWebService) no problem.  If anyone has any ideas why this is or if you could point me in the right direction, that would be appreciated.</p>