WebService that returns an object

Discussion in 'ASP .Net Web Services' started by murugan.pa@gmail.com, Jan 17, 2007.

  1. Guest

    Hi,

    I have a class in .net webservice

    public class Test
    {
    static string _strMessage=string.Empty;
    public string Message
    {
    get
    {
    return _strMessage;
    }
    set
    {
    _strMessage=value;
    }
    }
    }

    I have a webmethod

    [WebMethod]
    public object TestSerice()
    {
    Test obj=new Test();
    obj.Message="OK";
    return obj;
    }


    i get an error while calling this method from other application. Can
    you please tell me a solution so that the webmethod can be used in any
    ..net and java application.

    thanks in advace

    Regards,
    Murugan.
     
    , Jan 17, 2007
    #1
    1. Advertisements

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. Ben Turner
    Replies:
    2
    Views:
    9,929
    Ken Cox [Microsoft MVP]
    Jan 2, 2004
  2. vizlab
    Replies:
    3
    Views:
    4,519
    Michael Bar-Sinai
    Oct 17, 2007
  3. Mark
    Replies:
    3
    Views:
    4,233
    Steven Cheng[MSFT]
    Jul 18, 2006
  4. ++imanshu
    Replies:
    7
    Views:
    693
    ++imanshu
    Aug 23, 2008
  5. Replies:
    0
    Views:
    241
  6. heinrich.elsigan
    Replies:
    2
    Views:
    301
    Willy Van den Driessche
    May 21, 2006
  7. Trans
    Replies:
    2
    Views:
    399
    Trans
    Nov 6, 2005
  8. Srijayanth Sridhar
    Replies:
    19
    Views:
    991
    David A. Black
    Jul 2, 2008
Loading...