| 12345678910111213141516171819202122232425262728293031323334 |
- <%@ WebService Language="c#" Class="IncludeTest" %>
- using System;
- using System.Collections;
- using System.Xml.Serialization;
- using System.Web.Services;
- using System.Web.Services.Protocols;
- public class IncludeTest
- {
- [WebMethod]
- [XmlInclude(typeof(ComplexThing))]
- [SoapInclude(typeof(ComplexThing))]
- public ArrayList foo()
- {
- ArrayList list = new ArrayList();
- list.Add(new ComplexThing("abc", 1.1f));
- list.Add(new ComplexThing("xyz", 2.0f));
- return list;
- }
- }
- public class ComplexThing
- {
- public ComplexThing() {}
- public ComplexThing(string name, float val)
- {
- this.name = name;
- this.val = val;
- }
- public string name;
- public float val;
- }
|