2002-08-12 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / SoapBinding.cs
1 // \r
2 // System.Web.Services.Description.SoapBinding.cs\r
3 //\r
4 // Author:\r
5 //   Tim Coleman (tim@timcoleman.com)\r
6 //\r
7 // Copyright (C) Tim Coleman, 2002\r
8 //\r
9 \r
10 using System.ComponentModel;\r
11 using System.Web.Services.Configuration;\r
12 using System.Xml.Serialization;\r
13 \r
14 namespace System.Web.Services.Description {\r
15         [XmlFormatExtensionPrefix ("soap", "http://schemas.xmlsoap.org/wsdl/soap/")]\r
16         [XmlFormatExtension ("binding", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (Binding))]\r
17         // FIXME: this won't compile! \r
18         // [XmlFormatExtensionPrefix ("soapenc", "http://schemas.xmlsoap.org/soap/encoding/")]\r
19         public sealed class SoapBinding : ServiceDescriptionFormatExtension {\r
20 \r
21                 #region Fields\r
22 \r
23                 public const string HttpTransport = "http://schemas.xmlsoap.org/soap/http/";\r
24                 public const string Namespace = "http://schemas.xmlsoap.org/wsdl/soap/";\r
25 \r
26                 SoapBindingStyle style;\r
27                 string transport;\r
28 \r
29                 #endregion // Fields\r
30 \r
31                 #region Constructors\r
32                 \r
33                 public SoapBinding ()\r
34                 {\r
35                         style = SoapBindingStyle.Document;\r
36                         transport = String.Empty;\r
37                 }\r
38                 \r
39                 #endregion // Constructors\r
40 \r
41                 #region Properties\r
42 \r
43                 // LAMESPEC: .NET says that the default value is SoapBindingStyle.Document but\r
44                 // reflection shows this attribute is SoapBindingStyle.Default\r
45 \r
46                 [DefaultValue (SoapBindingStyle.Default)]\r
47                 [XmlAttribute ("style")]\r
48                 public SoapBindingStyle Style {\r
49                         get { return style; }\r
50                         set { style = value; }\r
51                 }\r
52 \r
53                 [XmlAttribute ("transport")]\r
54                 public string Transport {\r
55                         get { return transport; }\r
56                         set { transport = value; }\r
57                 }\r
58         \r
59                 #endregion // Properties\r
60         }\r
61 }\r