Subject: Re: how or when to use XmlInclude ?
Date: Wed, 8 Dec 2004 09:03:58 -0600
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <
[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
NNTP-Posting-Host: 204.124.82.48
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
..phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:27090
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
Thanks,
Then why is it that when I view the web service method (using MS IE) I see
the method return type MyClass only? MyClass is derived from an abstract
class and I would like the consumer of the web service to be able to read
the public methods of the abstract class also. What I have now is that I
only see the MyClass methods in the IE when I click on that web service
method (see it in soap protocol).
public abstract class ABC
{
public string Phone;
}
public class MyClass : ABC
{
public string Name;
public string Street;
}
Thanks
Dan Rogers said:
In this case you don't need to use XmlInclude. You would only need the
XmlInclude if you had an interface that included the ability for different
types than expected at compile time to be added to the return at runtime.
This happens when you return an object as the return type, for instance.
Regards,
Dan Rogers
Microsoft Corporation
--------------------
From: "R.A." <
[email protected]>
Subject: how or when to use XmlInclude ?
Date: Tue, 7 Dec 2004 09:01:24 -0600
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <
[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
NNTP-Posting-Host: 204.124.82.48
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP0 8
phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:27071
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
Hi
I have a web service that returns a custom class in one of the service
methods.
public class MyClass
{
public string Name;
public string Street;
}
web method:
[WebMethod (Description = "Get customer info")]
public MtClass [] GetCustomerList (string ZipCode)
{
...
}
As I am testing I didn't use XmlInclude for MyClass or for the
GetCustomerList method but still I am able to get the serialized information
back from the web service. If this is the case then do I need XmlInclude at
all?
Thanks