web method return type

Discussion in 'ASP .Net Web Services' started by niraj, Apr 6, 2004.

  1. niraj

    niraj Guest

    Hi;

    Can WebMethod return Interface type?
    I am getting System.InvalidOperationException
    Followin is code...

    public interface IDBData
    {

    /// <summary>
    /// PrimaryKey value
    /// </summary>
    long ID
    {
    get;
    set;
    }
    }

    //In WebService class
    [WebMethod(Description="Get data from DB, given primaryKey & dataType")]
    public IDBData Retrieve(long primaryKey, DBTypes dataType)
    {
    return m_Server.Retrieve( primaryKey, dataType );
    }

    Thanks for your reply

    Niraj
    niraj, Apr 6, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Howard
    Replies:
    2
    Views:
    375
    Michiel Salters
    Jul 4, 2003
  2. Rolf Magnus
    Replies:
    1
    Views:
    325
    ding feng
    Jul 4, 2003
  3. Greenhorn
    Replies:
    15
    Views:
    812
    Keith Thompson
    Mar 6, 2005
  4. andrew cooke
    Replies:
    1
    Views:
    180
    Steven D'Aprano
    Apr 3, 2011
  5. Xeno Campanoli
    Replies:
    0
    Views:
    227
    Xeno Campanoli
    Feb 13, 2006
Loading...

Share This Page