// Collection of code snippets by Arne Vajhøj
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now)
using System;
using System.Collections.Generic;
using System.Xml;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService]
[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1,EmitConformanceClaims=true)]
public class Compat : WebService
{
[WebMethod]
public int GetInt()
{
return 123;
}
[WebMethod]
public string GetString()
{
return "ABC";
}
[WebMethod]
public string GetXml()
{
return "";
}
[WebMethod]
public XmlDocument GetXmlDocument()
{
XmlDocument doc = new XmlDocument();
doc.AppendChild(doc.CreateElement("test"));
return doc;
}
[WebMethod]
public string[] GetStringArray()
{
return new string[] { "ABC", "DEF" };
}
[WebMethod]
public List GetStringList()
{
List res = new List();
res.Add("ABC");
res.Add("DEF");
return res;
}
}