473,396 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XmlInclude does it do anything?

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


Nov 16 '05 #1
1 1777
The XmlInclude attribute is currently intended to support polymorphic
return types. In other words, it is intended to permit you to mark a Web
method as returning a base class, but also include the definitions for
the derived classes in the WSDL document so that clients can be prepared
to accept objects of the derived types as return values.

rajagopal

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: yuriy_zubarev | last post by:
Greetings, Simple scenario: I have objects that need to be persisted in XML. The declaration is as follows: public class Zoo { protected Animal animals;
1
by: Bob Rock | last post by:
Hello, I have a web method that serializes a class that includes among its public fields a System.Object field to which, at runtime, I assign instances of various different classes. When...
0
by: Matthias De Ridder | last post by:
Hello, I have a Web service method who's returning an ArrayList of a custom class Tender: public ArrayList GetTenders(string user, string password){ // code}
0
by: R.A. | last post by:
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; }
0
by: Andrew Kidd | last post by:
Has anyone got the XmlInclude attribute working in VS 2005? I've done some Googling & there seems to be very little in the way of replies to questions out there. I basically want to expose my...
0
by: goteti | last post by:
Hello, I have a method with these attributes: public GetCardsResponse GetCards(GetCardsRequest getCardsRequest) {
0
by: urban011 | last post by:
I need to use XmlInclude to generate a description in the wsdl for a subtype for a given web method. I alos need to include the SoapRpcMethod directive and the use=literal attribute in order to...
1
by: deja | last post by:
hi, i have 2 web services each with some of the same types but also each with their own xmlincludes to include types specific to them. I want to share the types that are common so I used wsdl...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.