Merge pull request #1473 from esdrubal/sq
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / SoapFaultBinding.cs
1 // 
2 // System.Web.Services.Description.SoapFaultBinding.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 using System.ComponentModel;
32 using System.Web.Services.Configuration;
33 using System.Xml.Serialization;
34
35 namespace System.Web.Services.Description {
36         [XmlFormatExtension ("fault", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (FaultBinding))]
37         public class SoapFaultBinding : ServiceDescriptionFormatExtension {
38
39                 #region Fields
40
41                 string encoding;
42                 string ns;
43                 SoapBindingUse use;
44                 string name;
45
46                 #endregion // Fields
47
48                 #region Constructors
49                 
50                 public SoapFaultBinding ()
51                 {
52                         encoding = String.Empty;
53                         ns = String.Empty;
54                         use = SoapBindingUse.Default;
55                 }
56                 
57                 #endregion // Constructors
58
59                 #region Properties
60
61 #if NET_2_0
62                 [DefaultValue ("")]
63 #endif
64                 [XmlAttribute ("encodingStyle")]
65                 public string Encoding {
66                         get { return encoding; }
67                         set { encoding = value; }
68                 }
69         
70                 [XmlAttribute ("namespace")]    
71                 public string Namespace {
72                         get { return ns; }
73                         set { ns = value; }
74                 }
75
76                 [DefaultValue (SoapBindingUse.Default)]
77                 [XmlAttribute ("use")]
78                 public SoapBindingUse Use {
79                         get { return use; }
80                         set { use = value; }
81                 }
82
83 #if NET_2_0
84                 [XmlAttribute ("name")]
85                 public string Name {
86                         get { return name; }
87                         set { name = value; }
88                 }
89 #endif
90                 #endregion // Properties
91         }
92 }