| 发表于:2007-12-29 10:17:24 楼主 |
using system; using system.collections; using system.componentmodel; using system.data; using system.web; using system.web.services; using system.web.services.protocols; using system.xml.serialization; namespace webservice1 { /// <summary> /// summary description for service1 /// </summary> [webservice(namespace = "http://tempuri.org/")] [webservicebinding(conformsto = wsiprofiles.basicprofile1_1)] [toolboxitem(false)] public class service1 : system.web.services.webservice { private int _para; [xmlelement("para")] public int para { get { return _para; } set { _para=value;} } [webmethod] public string helloworld() { return "hello world"; } } } 我在webservice中定义了一个属性,想把它发布出去,但是不知如何设置,用xmlelement不起作用。请教大家如何实现。 |
|
|
|
|