WebService that returns an object

M

murugan.pa

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top