Hi,
Actually you need to serialize the class in proper way and then also need to
deserialize the class at the client side where web service is consumed.Please
do google on how to serialize/deserialize the class and you will find further
samples/code snippets.
Hope this hepls
--
If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
[quoted text, click to view] "WG" wrote:
> Thanks for your reply Manish. I tried this and now get a stack overflow when
> the ws is called.
>
>
> "Manish Bafna" wrote:
>
> > Hi,
> > Actually [XmlInclude(typeof(Class1))] will come before class:
> >
> > [XmlInclude(typeof(Class1))]
> > public class Class1
> > {
> > protected string _prop;
> > public string Prop
> > {
> > get { return _prop; }
> > set { _prop = value; }
> > }
> >
> > public void Test(string s)
> > {
> > // do some stuff
> > }
> > }
> > Hope this helps
> > --
> > If my answer helped you,then please do press Yes below.
> > Thanks and Regards.
> > Manish Bafna.
> > MCP and MCTS.
> >
> >
> >
> > "WG" wrote:
> >
> > > Hi,
> > >
> > > I have the following ws method...
> > >
> > > [WebMethod]
> > > public Class1 GetClass1()
> > > {
> > > return new Class1();
> > > }
> > >
> > >
> > > Class1 looks like....
> > >
> > > public class Class1
> > > {
> > > protected string _prop;
> > > public string Prop
> > > {
> > > get { return _prop; }
> > > set { _prop = value; }
> > > }
> > >
> > > public void Test(string s)
> > > {
> > > // do some stuff
> > > }
> > > }
> > >
> > > When I look at the returned instance of Class1 I can see the public property
> > > but not the method.
> > >
> > > Can anyone tell me what I am doing wrong. The client is a aspx page using
> > > a regular .net 2.0 web reference.
> > >
> > > Thanks
Thanks Manish.
[quoted text, click to view] "Manish Bafna" wrote:
> Hi,
> Actually you need to serialize the class in proper way and then also need to
> deserialize the class at the client side where web service is consumed.Please
> do google on how to serialize/deserialize the class and you will find further
> samples/code snippets.
> Hope this hepls
> --
> If my answer helped you,then please do press Yes below.
> Thanks and Regards.
> Manish Bafna.
> MCP and MCTS.
>
>
>
> "WG" wrote:
>
> > Thanks for your reply Manish. I tried this and now get a stack overflow when
> > the ws is called.
> >
> >
> > "Manish Bafna" wrote:
> >
> > > Hi,
> > > Actually [XmlInclude(typeof(Class1))] will come before class:
> > >
> > > [XmlInclude(typeof(Class1))]
> > > public class Class1
> > > {
> > > protected string _prop;
> > > public string Prop
> > > {
> > > get { return _prop; }
> > > set { _prop = value; }
> > > }
> > >
> > > public void Test(string s)
> > > {
> > > // do some stuff
> > > }
> > > }
> > > Hope this helps
> > > --
> > > If my answer helped you,then please do press Yes below.
> > > Thanks and Regards.
> > > Manish Bafna.
> > > MCP and MCTS.
> > >
> > >
> > >
> > > "WG" wrote:
> > >
> > > > Hi,
> > > >
> > > > I have the following ws method...
> > > >
> > > > [WebMethod]
> > > > public Class1 GetClass1()
> > > > {
> > > > return new Class1();
> > > > }
> > > >
> > > >
> > > > Class1 looks like....
> > > >
> > > > public class Class1
> > > > {
> > > > protected string _prop;
> > > > public string Prop
> > > > {
> > > > get { return _prop; }
> > > > set { _prop = value; }
> > > > }
> > > >
> > > > public void Test(string s)
> > > > {
> > > > // do some stuff
> > > > }
> > > > }
> > > >
> > > > When I look at the returned instance of Class1 I can see the public property
> > > > but not the method.
> > > >
> > > > Can anyone tell me what I am doing wrong. The client is a aspx page using
> > > > a regular .net 2.0 web reference.
> > > >
> > > > Thanks
Don't see what you're looking for? Try a search.