Solved

.NET Webservice does not publish public class / properties

Posted on 2008-10-08
4
551 Views
Last Modified: 2012-05-05
I have a webservice that interfaces with a SQL Database.  The webservice includes methods for interfacing with the database in the main class file in addition to several separate class files each representing a table in the database.  For instance, Customer.cs, Order.cs, OrderDetail.cs.  Each of these classes serializes fine and I can reference them without a problem in an aspx page and a Windows Form.  Recently though I added a new class Product that will not publish and I cannot come up with a reason why this is happening.  In fact any new class I create will not publish even if I copy the code from a class that does work into the file and modify the classname to match.  I'm not sure what I'm missing here.  I'm sure it must be something simple.


using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Xml.Serialization;
 

/// <summary>

/// Summary description for Product

/// </summary>

[XmlInclude(typeof(Product))]

public class Product

{

    public String ProductID;

    public Int32 CategoryID;

    public Int32 ProductTypeID;

    public String ProductTitle;

    public String ProductDesc;

    public String EnlargedImage;

    public String Thumbnail;

    public DateTime RevisionDate;

    public Char Active;

    public Int32 OrderBy;
 

    public Product()

    { }
 

    public Product(String productID, Int32 categoryID, Int32   productTypeID, String productTitle,

        String productDesc, String enlargedImage, String thumbnail, DateTime revisionDate, Char active,

        Int32 orderBy)

    {

        ProductID = productID;

        CategoryID = categoryID;

        ProductTypeID = productTypeID;

        ProductTitle = productTitle;

        ProductDesc = productDesc;

        EnlargedImage = enlargedImage;

        Thumbnail = thumbnail;

        RevisionDate = revisionDate;

        Active = active;

        OrderBy = orderBy;

    }

}

Open in new window

0
Comment
Question by:MicheleDunham
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
ID: 22674196
do you have a webmethod that either returns your product class or takes it as an argument? It will not include a definition for a class in the web service if it isn't used.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22675162
did you update the proxy object of the web service so that new changes that you do are available for consumption
0
 

Author Closing Comment

by:MicheleDunham
ID: 31504476
Thanks a bunch!
I accepted this answer right after you posted it yesterday but for some reason it didn't post?
0
 

Author Comment

by:MicheleDunham
ID: 22678590
rag0017, yes I did update the proxy object.  Thanks for your comment.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WKHTMLTOPDF - --disable-smart-shrinking not working 10 37
Host asp.net pages 5 25
C# Single Form 8 28
SQL Exceptions 3 39
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now