向WebService传值的问题
========WebService====
public class CasadingService : System.Web.Services.WebService
{
public System.Xml.XmlDocument _document;
public string[] _hierachy;
public string path;
public System.Xml.XmlDocument Document
{
get
{
return _document;
}
set { _document = value; }
}
public string[] Hierachy
{
get
{
return _hierachy;
}
set { _hierachy = value; }
}
[WebMethod]
public AjaxControlToolkit.CascadingDropDownNameValue[] GetDropDownContents(string knownCategoryValues, string category)
{
System.Collections.Specialized.StringDictionary knowCategoryValuesDictionary = new System.Collections.Specialized.StringDictionary();
knowCategoryValuesDictionary = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
return AjaxControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(this._document, this._hierachy, knowCategoryValuesDictionary, category);
}
}
========.CS======
protected void Page_Load(object sender, EventArgs e)
{
System.Xml.XmlDocument document = new System.Xml.XmlDocument();
document.Load(HttpContext.Current.Server.MapPath(_path));
CasadingService web = new CasadingService();
web.Hierachy = countlist;
web.Document = document;
}
请问,我这样子给WebService中传值,当Set的时候还有值,但当运行到GetDropDownContents调用Get的return 时候就为null????????