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. 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. vizlab
    Replies:
    3
    Views:
    4,261
    Michael Bar-Sinai
    Oct 17, 2007
  2. Mark
    Replies:
    3
    Views:
    4,033
    Steven Cheng[MSFT]
    Jul 18, 2006
  3. ++imanshu
    Replies:
    7
    Views:
    495
    ++imanshu
    Aug 23, 2008
  4. Trans
    Replies:
    2
    Views:
    243
    Trans
    Nov 6, 2005
  5. Srijayanth Sridhar
    Replies:
    19
    Views:
    658
    David A. Black
    Jul 2, 2008
Loading...

Share This Page