Merge pull request #1375 from echampet/cleanup
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / ServiceDescriptionSerializerBase.cs
1 #if !NET_2_0
2 // It is automatically generated
3 using System;
4 using System.Xml;
5 using System.Xml.Schema;
6 using System.Xml.Serialization;
7 using System.Text;
8 using System.Collections;
9 using System.Globalization;
10
11 namespace System.Web.Services.Description
12 {
13         internal class ServiceDescriptionReaderBase : XmlSerializationReader
14         {
15                 static readonly System.Reflection.MethodInfo fromBinHexStringMethod = typeof (XmlConvert).GetMethod ("FromBinHexString", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic, null, new Type [] {typeof (string)}, null);
16                 static byte [] FromBinHexString (string input)
17                 {
18                         return input == null ? null : (byte []) fromBinHexStringMethod.Invoke (null, new object [] {input});
19                 }
20                 public object ReadRoot_ServiceDescription ()
21                 {
22                         Reader.MoveToContent();
23                         if (Reader.LocalName != "definitions" || Reader.NamespaceURI != "http://schemas.xmlsoap.org/wsdl/")
24                                 throw CreateUnknownNodeException();
25                         return ReadObject_ServiceDescription (true, true);
26                 }
27
28                 public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
29                 {
30                         System.Web.Services.Description.ServiceDescription ob = null;
31                         if (isNullable && ReadNull()) return null;
32
33                         if (checkType) 
34                         {
35                                 System.Xml.XmlQualifiedName t = GetXsiType();
36                                 if (t == null)
37                                 { }
38                                 else if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
39                                         throw CreateUnknownTypeException(t);
40                         }
41
42                         ob = (System.Web.Services.Description.ServiceDescription) Activator.CreateInstance(typeof(System.Web.Services.Description.ServiceDescription), true);
43
44                         Reader.MoveToElement();
45
46                         while (Reader.MoveToNextAttribute())
47                         {
48                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
49                                         ob.@Name = Reader.Value;
50                                 }
51                                 else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
52                                         ob.@TargetNamespace = Reader.Value;
53                                 }
54                                 else if (IsXmlnsAttribute (Reader.Name)) {
55                                 }
56                                 else {
57                                         UnknownNode (ob);
58                                 }
59                         }
60
61                         Reader.MoveToElement ();
62                         Reader.MoveToElement();
63                         if (Reader.IsEmptyElement) {
64                                 Reader.Skip ();
65                                 return ob;
66                         }
67
68                         Reader.ReadStartElement();
69                         Reader.MoveToContent();
70
71                         bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
72
73                         System.Web.Services.Description.ImportCollection o8;
74                         o8 = ob.@Imports;
75                         System.Web.Services.Description.MessageCollection o10;
76                         o10 = ob.@Messages;
77                         System.Web.Services.Description.PortTypeCollection o12;
78                         o12 = ob.@PortTypes;
79                         System.Web.Services.Description.BindingCollection o14;
80                         o14 = ob.@Bindings;
81                         System.Web.Services.Description.ServiceCollection o16;
82                         o16 = ob.@Services;
83                         int n7=0, n9=0, n11=0, n13=0, n15=0;
84
85                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
86                         {
87                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
88                                 {
89                                         if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
90                                                 b2 = true;
91                                                 ob.@Types = ReadObject_Types (false, true);
92                                         }
93                                         else if (Reader.LocalName == "service" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b6) {
94                                                 if (((object)o16) == null)
95                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
96                                                 o16.Add (ReadObject_Service (false, true));
97                                                 n15++;
98                                         }
99                                         else if (Reader.LocalName == "message" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b3) {
100                                                 if (((object)o10) == null)
101                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
102                                                 o10.Add (ReadObject_Message (false, true));
103                                                 n9++;
104                                         }
105                                         else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b0) {
106                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
107                                         }
108                                         else if (Reader.LocalName == "portType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b4) {
109                                                 if (((object)o12) == null)
110                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortTypeCollection");
111                                                 o12.Add (ReadObject_PortType (false, true));
112                                                 n11++;
113                                         }
114                                         else if (Reader.LocalName == "import" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b1) {
115                                                 if (((object)o8) == null)
116                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ImportCollection");
117                                                 o8.Add (ReadObject_Import (false, true));
118                                                 n7++;
119                                         }
120                                         else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b5) {
121                                                 if (((object)o14) == null)
122                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.BindingCollection");
123                                                 o14.Add (ReadObject_Binding (false, true));
124                                                 n13++;
125                                         }
126                                         else {
127                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
128                                         }
129                                 }
130                                 else
131                                         UnknownNode(ob);
132
133                                 Reader.MoveToContent();
134                         }
135
136
137                         ReadEndElement();
138
139                         return ob;
140                 }
141
142                 public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
143                 {
144                         System.Web.Services.Description.Types ob = null;
145                         if (isNullable && ReadNull()) return null;
146
147                         if (checkType) 
148                         {
149                                 System.Xml.XmlQualifiedName t = GetXsiType();
150                                 if (t == null)
151                                 { }
152                                 else if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
153                                         throw CreateUnknownTypeException(t);
154                         }
155
156                         ob = (System.Web.Services.Description.Types) Activator.CreateInstance(typeof(System.Web.Services.Description.Types), true);
157
158                         Reader.MoveToElement();
159
160                         while (Reader.MoveToNextAttribute())
161                         {
162                                 if (IsXmlnsAttribute (Reader.Name)) {
163                                 }
164                                 else {
165                                         UnknownNode (ob);
166                                 }
167                         }
168
169                         Reader.MoveToElement ();
170                         Reader.MoveToElement();
171                         if (Reader.IsEmptyElement) {
172                                 Reader.Skip ();
173                                 return ob;
174                         }
175
176                         Reader.ReadStartElement();
177                         Reader.MoveToContent();
178
179                         bool b17=false, b18=false;
180
181                         System.Xml.Serialization.XmlSchemas o20;
182                         o20 = ob.@Schemas;
183                         int n19=0;
184
185                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
186                         {
187                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
188                                 {
189                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
190                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
191                                         }
192                                         else if (Reader.LocalName == "schema" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b18) {
193                                                 if (((object)o20) == null)
194                                                         throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
195                                                 o20.Add (ReadObject_XmlSchema (false, true));
196                                                 n19++;
197                                         }
198                                         else {
199                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
200                                         }
201                                 }
202                                 else
203                                         UnknownNode(ob);
204
205                                 Reader.MoveToContent();
206                         }
207
208
209                         ReadEndElement();
210
211                         return ob;
212                 }
213
214                 public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
215                 {
216                         System.Web.Services.Description.Service ob = null;
217                         if (isNullable && ReadNull()) return null;
218
219                         if (checkType) 
220                         {
221                                 System.Xml.XmlQualifiedName t = GetXsiType();
222                                 if (t == null)
223                                 { }
224                                 else if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
225                                         throw CreateUnknownTypeException(t);
226                         }
227
228                         ob = (System.Web.Services.Description.Service) Activator.CreateInstance(typeof(System.Web.Services.Description.Service), true);
229
230                         Reader.MoveToElement();
231
232                         while (Reader.MoveToNextAttribute())
233                         {
234                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
235                                         ob.@Name = Reader.Value;
236                                 }
237                                 else if (IsXmlnsAttribute (Reader.Name)) {
238                                 }
239                                 else {
240                                         UnknownNode (ob);
241                                 }
242                         }
243
244                         Reader.MoveToElement ();
245                         Reader.MoveToElement();
246                         if (Reader.IsEmptyElement) {
247                                 Reader.Skip ();
248                                 return ob;
249                         }
250
251                         Reader.ReadStartElement();
252                         Reader.MoveToContent();
253
254                         bool b21=false, b22=false;
255
256                         System.Web.Services.Description.PortCollection o24;
257                         o24 = ob.@Ports;
258                         int n23=0;
259
260                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
261                         {
262                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
263                                 {
264                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
265                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
266                                         }
267                                         else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) {
268                                                 if (((object)o24) == null)
269                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
270                                                 o24.Add (ReadObject_Port (false, true));
271                                                 n23++;
272                                         }
273                                         else {
274                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
275                                         }
276                                 }
277                                 else
278                                         UnknownNode(ob);
279
280                                 Reader.MoveToContent();
281                         }
282
283
284                         ReadEndElement();
285
286                         return ob;
287                 }
288
289                 public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
290                 {
291                         System.Web.Services.Description.Message ob = null;
292                         if (isNullable && ReadNull()) return null;
293
294                         if (checkType) 
295                         {
296                                 System.Xml.XmlQualifiedName t = GetXsiType();
297                                 if (t == null)
298                                 { }
299                                 else if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
300                                         throw CreateUnknownTypeException(t);
301                         }
302
303                         ob = (System.Web.Services.Description.Message) Activator.CreateInstance(typeof(System.Web.Services.Description.Message), true);
304
305                         Reader.MoveToElement();
306
307                         while (Reader.MoveToNextAttribute())
308                         {
309                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
310                                         ob.@Name = Reader.Value;
311                                 }
312                                 else if (IsXmlnsAttribute (Reader.Name)) {
313                                 }
314                                 else {
315                                         UnknownNode (ob);
316                                 }
317                         }
318
319                         Reader.MoveToElement ();
320                         Reader.MoveToElement();
321                         if (Reader.IsEmptyElement) {
322                                 Reader.Skip ();
323                                 return ob;
324                         }
325
326                         Reader.ReadStartElement();
327                         Reader.MoveToContent();
328
329                         bool b25=false, b26=false;
330
331                         System.Web.Services.Description.MessagePartCollection o28;
332                         o28 = ob.@Parts;
333                         int n27=0;
334
335                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
336                         {
337                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
338                                 {
339                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
340                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
341                                         }
342                                         else if (Reader.LocalName == "part" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b26) {
343                                                 if (((object)o28) == null)
344                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
345                                                 o28.Add (ReadObject_MessagePart (false, true));
346                                                 n27++;
347                                         }
348                                         else {
349                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
350                                         }
351                                 }
352                                 else
353                                         UnknownNode(ob);
354
355                                 Reader.MoveToContent();
356                         }
357
358
359                         ReadEndElement();
360
361                         return ob;
362                 }
363
364                 public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
365                 {
366                         System.Web.Services.Description.PortType ob = null;
367                         if (isNullable && ReadNull()) return null;
368
369                         if (checkType) 
370                         {
371                                 System.Xml.XmlQualifiedName t = GetXsiType();
372                                 if (t == null)
373                                 { }
374                                 else if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
375                                         throw CreateUnknownTypeException(t);
376                         }
377
378                         ob = (System.Web.Services.Description.PortType) Activator.CreateInstance(typeof(System.Web.Services.Description.PortType), true);
379
380                         Reader.MoveToElement();
381
382                         while (Reader.MoveToNextAttribute())
383                         {
384                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
385                                         ob.@Name = Reader.Value;
386                                 }
387                                 else if (IsXmlnsAttribute (Reader.Name)) {
388                                 }
389                                 else {
390                                         UnknownNode (ob);
391                                 }
392                         }
393
394                         Reader.MoveToElement ();
395                         Reader.MoveToElement();
396                         if (Reader.IsEmptyElement) {
397                                 Reader.Skip ();
398                                 return ob;
399                         }
400
401                         Reader.ReadStartElement();
402                         Reader.MoveToContent();
403
404                         bool b29=false, b30=false;
405
406                         System.Web.Services.Description.OperationCollection o32;
407                         o32 = ob.@Operations;
408                         int n31=0;
409
410                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
411                         {
412                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
413                                 {
414                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b29) {
415                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
416                                         }
417                                         else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b30) {
418                                                 if (((object)o32) == null)
419                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
420                                                 o32.Add (ReadObject_Operation (false, true));
421                                                 n31++;
422                                         }
423                                         else {
424                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
425                                         }
426                                 }
427                                 else
428                                         UnknownNode(ob);
429
430                                 Reader.MoveToContent();
431                         }
432
433
434                         ReadEndElement();
435
436                         return ob;
437                 }
438
439                 public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
440                 {
441                         System.Web.Services.Description.Import ob = null;
442                         if (isNullable && ReadNull()) return null;
443
444                         if (checkType) 
445                         {
446                                 System.Xml.XmlQualifiedName t = GetXsiType();
447                                 if (t == null)
448                                 { }
449                                 else if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
450                                         throw CreateUnknownTypeException(t);
451                         }
452
453                         ob = (System.Web.Services.Description.Import) Activator.CreateInstance(typeof(System.Web.Services.Description.Import), true);
454
455                         Reader.MoveToElement();
456
457                         while (Reader.MoveToNextAttribute())
458                         {
459                                 if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
460                                         ob.@Location = Reader.Value;
461                                 }
462                                 else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
463                                         ob.@Namespace = Reader.Value;
464                                 }
465                                 else if (IsXmlnsAttribute (Reader.Name)) {
466                                 }
467                                 else {
468                                         UnknownNode (ob);
469                                 }
470                         }
471
472                         Reader.MoveToElement ();
473                         Reader.MoveToElement();
474                         if (Reader.IsEmptyElement) {
475                                 Reader.Skip ();
476                                 return ob;
477                         }
478
479                         Reader.ReadStartElement();
480                         Reader.MoveToContent();
481
482                         bool b33=false;
483
484                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
485                         {
486                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
487                                 {
488                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b33) {
489                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
490                                         }
491                                         else {
492                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
493                                         }
494                                 }
495                                 else
496                                         UnknownNode(ob);
497
498                                 Reader.MoveToContent();
499                         }
500
501                         ReadEndElement();
502
503                         return ob;
504                 }
505
506                 public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
507                 {
508                         System.Web.Services.Description.Binding ob = null;
509                         if (isNullable && ReadNull()) return null;
510
511                         if (checkType) 
512                         {
513                                 System.Xml.XmlQualifiedName t = GetXsiType();
514                                 if (t == null)
515                                 { }
516                                 else if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
517                                         throw CreateUnknownTypeException(t);
518                         }
519
520                         ob = (System.Web.Services.Description.Binding) Activator.CreateInstance(typeof(System.Web.Services.Description.Binding), true);
521
522                         Reader.MoveToElement();
523
524                         while (Reader.MoveToNextAttribute())
525                         {
526                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
527                                         ob.@Name = Reader.Value;
528                                 }
529                                 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
530                                         ob.@Type = ToXmlQualifiedName (Reader.Value);
531                                 }
532                                 else if (IsXmlnsAttribute (Reader.Name)) {
533                                 }
534                                 else {
535                                         UnknownNode (ob);
536                                 }
537                         }
538
539                         Reader.MoveToElement ();
540                         Reader.MoveToElement();
541                         if (Reader.IsEmptyElement) {
542                                 Reader.Skip ();
543                                 return ob;
544                         }
545
546                         Reader.ReadStartElement();
547                         Reader.MoveToContent();
548
549                         bool b34=false, b35=false;
550
551                         System.Web.Services.Description.OperationBindingCollection o37;
552                         o37 = ob.@Operations;
553                         int n36=0;
554
555                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
556                         {
557                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
558                                 {
559                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
560                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
561                                         }
562                                         else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b35) {
563                                                 if (((object)o37) == null)
564                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
565                                                 o37.Add (ReadObject_OperationBinding (false, true));
566                                                 n36++;
567                                         }
568                                         else {
569                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
570                                         }
571                                 }
572                                 else
573                                         UnknownNode(ob);
574
575                                 Reader.MoveToContent();
576                         }
577
578
579                         ReadEndElement();
580
581                         return ob;
582                 }
583
584                 public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
585                 {
586                         System.Xml.Schema.XmlSchema ob = null;
587                         ob = System.Xml.Schema.XmlSchema.Read (Reader, null); Reader.Read ();
588                         return ob;
589                 }
590
591                 public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
592                 {
593                         System.Web.Services.Description.Port ob = null;
594                         if (isNullable && ReadNull()) return null;
595
596                         if (checkType) 
597                         {
598                                 System.Xml.XmlQualifiedName t = GetXsiType();
599                                 if (t == null)
600                                 { }
601                                 else if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
602                                         throw CreateUnknownTypeException(t);
603                         }
604
605                         ob = (System.Web.Services.Description.Port) Activator.CreateInstance(typeof(System.Web.Services.Description.Port), true);
606
607                         Reader.MoveToElement();
608
609                         while (Reader.MoveToNextAttribute())
610                         {
611                                 if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
612                                         ob.@Binding = ToXmlQualifiedName (Reader.Value);
613                                 }
614                                 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
615                                         ob.@Name = Reader.Value;
616                                 }
617                                 else if (IsXmlnsAttribute (Reader.Name)) {
618                                 }
619                                 else {
620                                         UnknownNode (ob);
621                                 }
622                         }
623
624                         Reader.MoveToElement ();
625                         Reader.MoveToElement();
626                         if (Reader.IsEmptyElement) {
627                                 Reader.Skip ();
628                                 return ob;
629                         }
630
631                         Reader.ReadStartElement();
632                         Reader.MoveToContent();
633
634                         bool b38=false;
635
636                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
637                         {
638                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
639                                 {
640                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
641                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
642                                         }
643                                         else {
644                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
645                                         }
646                                 }
647                                 else
648                                         UnknownNode(ob);
649
650                                 Reader.MoveToContent();
651                         }
652
653                         ReadEndElement();
654
655                         return ob;
656                 }
657
658                 public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
659                 {
660                         System.Web.Services.Description.MessagePart ob = null;
661                         if (isNullable && ReadNull()) return null;
662
663                         if (checkType) 
664                         {
665                                 System.Xml.XmlQualifiedName t = GetXsiType();
666                                 if (t == null)
667                                 { }
668                                 else if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
669                                         throw CreateUnknownTypeException(t);
670                         }
671
672                         ob = (System.Web.Services.Description.MessagePart) Activator.CreateInstance(typeof(System.Web.Services.Description.MessagePart), true);
673
674                         Reader.MoveToElement();
675
676                         while (Reader.MoveToNextAttribute())
677                         {
678                                 if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
679                                         ob.@Element = ToXmlQualifiedName (Reader.Value);
680                                 }
681                                 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
682                                         ob.@Name = Reader.Value;
683                                 }
684                                 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
685                                         ob.@Type = ToXmlQualifiedName (Reader.Value);
686                                 }
687                                 else if (IsXmlnsAttribute (Reader.Name)) {
688                                 }
689                                 else {
690                                         UnknownNode (ob);
691                                 }
692                         }
693
694                         Reader.MoveToElement ();
695                         Reader.MoveToElement();
696                         if (Reader.IsEmptyElement) {
697                                 Reader.Skip ();
698                                 return ob;
699                         }
700
701                         Reader.ReadStartElement();
702                         Reader.MoveToContent();
703
704                         bool b39=false;
705
706                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
707                         {
708                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
709                                 {
710                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
711                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
712                                         }
713                                         else {
714                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
715                                         }
716                                 }
717                                 else
718                                         UnknownNode(ob);
719
720                                 Reader.MoveToContent();
721                         }
722
723                         ReadEndElement();
724
725                         return ob;
726                 }
727
728                 public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
729                 {
730                         System.Web.Services.Description.Operation ob = null;
731                         if (isNullable && ReadNull()) return null;
732
733                         if (checkType) 
734                         {
735                                 System.Xml.XmlQualifiedName t = GetXsiType();
736                                 if (t == null)
737                                 { }
738                                 else if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
739                                         throw CreateUnknownTypeException(t);
740                         }
741
742                         ob = (System.Web.Services.Description.Operation) Activator.CreateInstance(typeof(System.Web.Services.Description.Operation), true);
743
744                         Reader.MoveToElement();
745
746                         while (Reader.MoveToNextAttribute())
747                         {
748                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
749                                         ob.@Name = Reader.Value;
750                                 }
751                                 else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
752                                         ob.@ParameterOrderString = Reader.Value;
753                                 }
754                                 else if (IsXmlnsAttribute (Reader.Name)) {
755                                 }
756                                 else {
757                                         UnknownNode (ob);
758                                 }
759                         }
760
761                         Reader.MoveToElement ();
762                         Reader.MoveToElement();
763                         if (Reader.IsEmptyElement) {
764                                 Reader.Skip ();
765                                 return ob;
766                         }
767
768                         Reader.ReadStartElement();
769                         Reader.MoveToContent();
770
771                         bool b40=false, b41=false, b42=false;
772
773                         System.Web.Services.Description.OperationFaultCollection o44;
774                         o44 = ob.@Faults;
775                         System.Web.Services.Description.OperationMessageCollection o46;
776                         o46 = ob.@Messages;
777                         int n43=0, n45=0;
778
779                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
780                         {
781                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
782                                 {
783                                         if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
784                                                 if (((object)o46) == null)
785                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
786                                                 o46.Add (ReadObject_OperationOutput (false, true));
787                                                 n45++;
788                                         }
789                                         else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
790                                                 if (((object)o46) == null)
791                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
792                                                 o46.Add (ReadObject_OperationInput (false, true));
793                                                 n45++;
794                                         }
795                                         else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
796                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
797                                         }
798                                         else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b41) {
799                                                 if (((object)o44) == null)
800                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
801                                                 o44.Add (ReadObject_OperationFault (false, true));
802                                                 n43++;
803                                         }
804                                         else {
805                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
806                                         }
807                                 }
808                                 else
809                                         UnknownNode(ob);
810
811                                 Reader.MoveToContent();
812                         }
813
814
815                         ReadEndElement();
816
817                         return ob;
818                 }
819
820                 public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
821                 {
822                         System.Web.Services.Description.OperationBinding ob = null;
823                         if (isNullable && ReadNull()) return null;
824
825                         if (checkType) 
826                         {
827                                 System.Xml.XmlQualifiedName t = GetXsiType();
828                                 if (t == null)
829                                 { }
830                                 else if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
831                                         throw CreateUnknownTypeException(t);
832                         }
833
834                         ob = (System.Web.Services.Description.OperationBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationBinding), true);
835
836                         Reader.MoveToElement();
837
838                         while (Reader.MoveToNextAttribute())
839                         {
840                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
841                                         ob.@Name = Reader.Value;
842                                 }
843                                 else if (IsXmlnsAttribute (Reader.Name)) {
844                                 }
845                                 else {
846                                         UnknownNode (ob);
847                                 }
848                         }
849
850                         Reader.MoveToElement ();
851                         Reader.MoveToElement();
852                         if (Reader.IsEmptyElement) {
853                                 Reader.Skip ();
854                                 return ob;
855                         }
856
857                         Reader.ReadStartElement();
858                         Reader.MoveToContent();
859
860                         bool b47=false, b48=false, b49=false, b50=false;
861
862                         System.Web.Services.Description.FaultBindingCollection o52;
863                         o52 = ob.@Faults;
864                         int n51=0;
865
866                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
867                         {
868                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
869                                 {
870                                         if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b49) {
871                                                 b49 = true;
872                                                 ob.@Input = ReadObject_InputBinding (false, true);
873                                         }
874                                         else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b50) {
875                                                 b50 = true;
876                                                 ob.@Output = ReadObject_OutputBinding (false, true);
877                                         }
878                                         else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
879                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
880                                         }
881                                         else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b48) {
882                                                 if (((object)o52) == null)
883                                                         throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
884                                                 o52.Add (ReadObject_FaultBinding (false, true));
885                                                 n51++;
886                                         }
887                                         else {
888                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
889                                         }
890                                 }
891                                 else
892                                         UnknownNode(ob);
893
894                                 Reader.MoveToContent();
895                         }
896
897
898                         ReadEndElement();
899
900                         return ob;
901                 }
902
903                 public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
904                 {
905                         System.Web.Services.Description.OperationOutput ob = null;
906                         if (isNullable && ReadNull()) return null;
907
908                         if (checkType) 
909                         {
910                                 System.Xml.XmlQualifiedName t = GetXsiType();
911                                 if (t == null)
912                                 { }
913                                 else if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
914                                         throw CreateUnknownTypeException(t);
915                         }
916
917                         ob = (System.Web.Services.Description.OperationOutput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationOutput), true);
918
919                         Reader.MoveToElement();
920
921                         while (Reader.MoveToNextAttribute())
922                         {
923                                 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
924                                         ob.@Message = ToXmlQualifiedName (Reader.Value);
925                                 }
926                                 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
927                                         ob.@Name = Reader.Value;
928                                 }
929                                 else if (IsXmlnsAttribute (Reader.Name)) {
930                                 }
931                                 else {
932                                         UnknownNode (ob);
933                                 }
934                         }
935
936                         Reader.MoveToElement ();
937                         Reader.MoveToElement();
938                         if (Reader.IsEmptyElement) {
939                                 Reader.Skip ();
940                                 return ob;
941                         }
942
943                         Reader.ReadStartElement();
944                         Reader.MoveToContent();
945
946                         bool b53=false;
947
948                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
949                         {
950                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
951                                 {
952                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
953                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
954                                         }
955                                         else {
956                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
957                                         }
958                                 }
959                                 else
960                                         UnknownNode(ob);
961
962                                 Reader.MoveToContent();
963                         }
964
965                         ReadEndElement();
966
967                         return ob;
968                 }
969
970                 public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
971                 {
972                         System.Web.Services.Description.OperationInput ob = null;
973                         if (isNullable && ReadNull()) return null;
974
975                         if (checkType) 
976                         {
977                                 System.Xml.XmlQualifiedName t = GetXsiType();
978                                 if (t == null)
979                                 { }
980                                 else if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
981                                         throw CreateUnknownTypeException(t);
982                         }
983
984                         ob = (System.Web.Services.Description.OperationInput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationInput), true);
985
986                         Reader.MoveToElement();
987
988                         while (Reader.MoveToNextAttribute())
989                         {
990                                 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
991                                         ob.@Message = ToXmlQualifiedName (Reader.Value);
992                                 }
993                                 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
994                                         ob.@Name = Reader.Value;
995                                 }
996                                 else if (IsXmlnsAttribute (Reader.Name)) {
997                                 }
998                                 else {
999                                         UnknownNode (ob);
1000                                 }
1001                         }
1002
1003                         Reader.MoveToElement ();
1004                         Reader.MoveToElement();
1005                         if (Reader.IsEmptyElement) {
1006                                 Reader.Skip ();
1007                                 return ob;
1008                         }
1009
1010                         Reader.ReadStartElement();
1011                         Reader.MoveToContent();
1012
1013                         bool b54=false;
1014
1015                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
1016                         {
1017                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
1018                                 {
1019                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
1020                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1021                                         }
1022                                         else {
1023                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
1024                                         }
1025                                 }
1026                                 else
1027                                         UnknownNode(ob);
1028
1029                                 Reader.MoveToContent();
1030                         }
1031
1032                         ReadEndElement();
1033
1034                         return ob;
1035                 }
1036
1037                 public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
1038                 {
1039                         System.Web.Services.Description.OperationFault ob = null;
1040                         if (isNullable && ReadNull()) return null;
1041
1042                         if (checkType) 
1043                         {
1044                                 System.Xml.XmlQualifiedName t = GetXsiType();
1045                                 if (t == null)
1046                                 { }
1047                                 else if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1048                                         throw CreateUnknownTypeException(t);
1049                         }
1050
1051                         ob = (System.Web.Services.Description.OperationFault) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationFault), true);
1052
1053                         Reader.MoveToElement();
1054
1055                         while (Reader.MoveToNextAttribute())
1056                         {
1057                                 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1058                                         ob.@Message = ToXmlQualifiedName (Reader.Value);
1059                                 }
1060                                 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1061                                         ob.@Name = Reader.Value;
1062                                 }
1063                                 else if (IsXmlnsAttribute (Reader.Name)) {
1064                                 }
1065                                 else {
1066                                         UnknownNode (ob);
1067                                 }
1068                         }
1069
1070                         Reader.MoveToElement ();
1071                         Reader.MoveToElement();
1072                         if (Reader.IsEmptyElement) {
1073                                 Reader.Skip ();
1074                                 return ob;
1075                         }
1076
1077                         Reader.ReadStartElement();
1078                         Reader.MoveToContent();
1079
1080                         bool b55=false;
1081
1082                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
1083                         {
1084                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
1085                                 {
1086                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
1087                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1088                                         }
1089                                         else {
1090                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
1091                                         }
1092                                 }
1093                                 else
1094                                         UnknownNode(ob);
1095
1096                                 Reader.MoveToContent();
1097                         }
1098
1099                         ReadEndElement();
1100
1101                         return ob;
1102                 }
1103
1104                 public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
1105                 {
1106                         System.Web.Services.Description.InputBinding ob = null;
1107                         if (isNullable && ReadNull()) return null;
1108
1109                         if (checkType) 
1110                         {
1111                                 System.Xml.XmlQualifiedName t = GetXsiType();
1112                                 if (t == null)
1113                                 { }
1114                                 else if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1115                                         throw CreateUnknownTypeException(t);
1116                         }
1117
1118                         ob = (System.Web.Services.Description.InputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.InputBinding), true);
1119
1120                         Reader.MoveToElement();
1121
1122                         while (Reader.MoveToNextAttribute())
1123                         {
1124                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1125                                         ob.@Name = Reader.Value;
1126                                 }
1127                                 else if (IsXmlnsAttribute (Reader.Name)) {
1128                                 }
1129                                 else {
1130                                         UnknownNode (ob);
1131                                 }
1132                         }
1133
1134                         Reader.MoveToElement ();
1135                         Reader.MoveToElement();
1136                         if (Reader.IsEmptyElement) {
1137                                 Reader.Skip ();
1138                                 return ob;
1139                         }
1140
1141                         Reader.ReadStartElement();
1142                         Reader.MoveToContent();
1143
1144                         bool b56=false;
1145
1146                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
1147                         {
1148                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
1149                                 {
1150                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b56) {
1151                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1152                                         }
1153                                         else {
1154                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
1155                                         }
1156                                 }
1157                                 else
1158                                         UnknownNode(ob);
1159
1160                                 Reader.MoveToContent();
1161                         }
1162
1163                         ReadEndElement();
1164
1165                         return ob;
1166                 }
1167
1168                 public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
1169                 {
1170                         System.Web.Services.Description.OutputBinding ob = null;
1171                         if (isNullable && ReadNull()) return null;
1172
1173                         if (checkType) 
1174                         {
1175                                 System.Xml.XmlQualifiedName t = GetXsiType();
1176                                 if (t == null)
1177                                 { }
1178                                 else if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1179                                         throw CreateUnknownTypeException(t);
1180                         }
1181
1182                         ob = (System.Web.Services.Description.OutputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OutputBinding), true);
1183
1184                         Reader.MoveToElement();
1185
1186                         while (Reader.MoveToNextAttribute())
1187                         {
1188                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1189                                         ob.@Name = Reader.Value;
1190                                 }
1191                                 else if (IsXmlnsAttribute (Reader.Name)) {
1192                                 }
1193                                 else {
1194                                         UnknownNode (ob);
1195                                 }
1196                         }
1197
1198                         Reader.MoveToElement ();
1199                         Reader.MoveToElement();
1200                         if (Reader.IsEmptyElement) {
1201                                 Reader.Skip ();
1202                                 return ob;
1203                         }
1204
1205                         Reader.ReadStartElement();
1206                         Reader.MoveToContent();
1207
1208                         bool b57=false;
1209
1210                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
1211                         {
1212                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
1213                                 {
1214                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
1215                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1216                                         }
1217                                         else {
1218                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
1219                                         }
1220                                 }
1221                                 else
1222                                         UnknownNode(ob);
1223
1224                                 Reader.MoveToContent();
1225                         }
1226
1227                         ReadEndElement();
1228
1229                         return ob;
1230                 }
1231
1232                 public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
1233                 {
1234                         System.Web.Services.Description.FaultBinding ob = null;
1235                         if (isNullable && ReadNull()) return null;
1236
1237                         if (checkType) 
1238                         {
1239                                 System.Xml.XmlQualifiedName t = GetXsiType();
1240                                 if (t == null)
1241                                 { }
1242                                 else if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1243                                         throw CreateUnknownTypeException(t);
1244                         }
1245
1246                         ob = (System.Web.Services.Description.FaultBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.FaultBinding), true);
1247
1248                         Reader.MoveToElement();
1249
1250                         while (Reader.MoveToNextAttribute())
1251                         {
1252                                 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1253                                         ob.@Name = Reader.Value;
1254                                 }
1255                                 else if (IsXmlnsAttribute (Reader.Name)) {
1256                                 }
1257                                 else {
1258                                         UnknownNode (ob);
1259                                 }
1260                         }
1261
1262                         Reader.MoveToElement ();
1263                         Reader.MoveToElement();
1264                         if (Reader.IsEmptyElement) {
1265                                 Reader.Skip ();
1266                                 return ob;
1267                         }
1268
1269                         Reader.ReadStartElement();
1270                         Reader.MoveToContent();
1271
1272                         bool b58=false;
1273
1274                         while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
1275                         {
1276                                 if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
1277                                 {
1278                                         if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b58) {
1279                                                 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1280                                         }
1281                                         else {
1282                                                 ServiceDescription.ReadExtension (Document, Reader, ob);
1283                                         }
1284                                 }
1285                                 else
1286                                         UnknownNode(ob);
1287
1288                                 Reader.MoveToContent();
1289                         }
1290
1291                         ReadEndElement();
1292
1293                         return ob;
1294                 }
1295
1296                 protected override void InitCallbacks ()
1297                 {
1298                 }
1299
1300                 protected override void InitIDs ()
1301                 {
1302                 }
1303
1304         }
1305
1306         internal class ServiceDescriptionWriterBase : XmlSerializationWriter
1307         {
1308                 const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
1309                 static readonly System.Reflection.MethodInfo toBinHexStringMethod = typeof (XmlConvert).GetMethod ("ToBinHexString", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic, null, new Type [] {typeof (byte [])}, null);
1310                 static string ToBinHexString (byte [] input)
1311                 {
1312                         return input == null ? null : (string) toBinHexStringMethod.Invoke (null, new object [] {input});
1313                 }
1314                 public void WriteRoot_ServiceDescription (object o)
1315                 {
1316                         WriteStartDocument ();
1317                         System.Web.Services.Description.ServiceDescription ob = (System.Web.Services.Description.ServiceDescription) o;
1318                         TopLevelElement ();
1319                         WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
1320                 }
1321
1322                 void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1323                 {
1324                         if (((object)ob) == null)
1325                         {
1326                                 if (isNullable)
1327                                         WriteNullTagLiteral(element, namesp);
1328                                 return;
1329                         }
1330
1331                         System.Type type = ob.GetType ();
1332                         if (type == typeof(System.Web.Services.Description.ServiceDescription))
1333                         { }
1334                         else {
1335                                 throw CreateUnknownTypeException (ob);
1336                         }
1337
1338                         if (writeWrappingElem) {
1339                                 WriteStartElement (element, namesp, ob);
1340                         }
1341
1342                         if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
1343
1344                         WriteAttribute ("name", "", ob.@Name);
1345                         WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
1346
1347                         ServiceDescription.WriteExtensions (Writer, ob);
1348                         if (ob.@DocumentationElement != null) {
1349                                 XmlNode o59 = ob.@DocumentationElement;
1350                                 if (o59 is XmlElement) {
1351                                 if ((o59.LocalName == "documentation" && o59.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1352                                         }
1353                                         else o59.WriteTo (Writer);
1354                                         WriteElementLiteral (o59, "", "", false, true);
1355                                 }
1356                                 else
1357                                         throw CreateUnknownAnyElementException (o59.Name, o59.NamespaceURI);
1358                         }
1359                         if (ob.@Imports != null) {
1360                                 for (int n60 = 0; n60 < ob.@Imports.Count; n60++) {
1361                                         WriteObject_Import (ob.@Imports[n60], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1362                                 }
1363                         }
1364                         WriteObject_Types (ob.@Types, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1365                         if (ob.@Messages != null) {
1366                                 for (int n61 = 0; n61 < ob.@Messages.Count; n61++) {
1367                                         WriteObject_Message (ob.@Messages[n61], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1368                                 }
1369                         }
1370                         if (ob.@PortTypes != null) {
1371                                 for (int n62 = 0; n62 < ob.@PortTypes.Count; n62++) {
1372                                         WriteObject_PortType (ob.@PortTypes[n62], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1373                                 }
1374                         }
1375                         if (ob.@Bindings != null) {
1376                                 for (int n63 = 0; n63 < ob.@Bindings.Count; n63++) {
1377                                         WriteObject_Binding (ob.@Bindings[n63], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1378                                 }
1379                         }
1380                         if (ob.@Services != null) {
1381                                 for (int n64 = 0; n64 < ob.@Services.Count; n64++) {
1382                                         WriteObject_Service (ob.@Services[n64], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1383                                 }
1384                         }
1385                         if (writeWrappingElem) WriteEndElement (ob);
1386                 }
1387
1388                 void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1389                 {
1390                         if (((object)ob) == null)
1391                         {
1392                                 if (isNullable)
1393                                         WriteNullTagLiteral(element, namesp);
1394                                 return;
1395                         }
1396
1397                         System.Type type = ob.GetType ();
1398                         if (type == typeof(System.Web.Services.Description.Import))
1399                         { }
1400                         else {
1401                                 throw CreateUnknownTypeException (ob);
1402                         }
1403
1404                         if (writeWrappingElem) {
1405                                 WriteStartElement (element, namesp, ob);
1406                         }
1407
1408                         if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
1409
1410                         WriteAttribute ("location", "", ob.@Location);
1411                         WriteAttribute ("namespace", "", ob.@Namespace);
1412
1413                         if (ob.@DocumentationElement != null) {
1414                                 XmlNode o65 = ob.@DocumentationElement;
1415                                 if (o65 is XmlElement) {
1416                                 if ((o65.LocalName == "documentation" && o65.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1417                                         }
1418                                         else o65.WriteTo (Writer);
1419                                         WriteElementLiteral (o65, "", "", false, true);
1420                                 }
1421                                 else
1422                                         throw CreateUnknownAnyElementException (o65.Name, o65.NamespaceURI);
1423                         }
1424                         if (writeWrappingElem) WriteEndElement (ob);
1425                 }
1426
1427                 void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1428                 {
1429                         if (((object)ob) == null)
1430                         {
1431                                 if (isNullable)
1432                                         WriteNullTagLiteral(element, namesp);
1433                                 return;
1434                         }
1435
1436                         System.Type type = ob.GetType ();
1437                         if (type == typeof(System.Web.Services.Description.Types))
1438                         { }
1439                         else {
1440                                 throw CreateUnknownTypeException (ob);
1441                         }
1442
1443                         if (writeWrappingElem) {
1444                                 WriteStartElement (element, namesp, ob);
1445                         }
1446
1447                         if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
1448
1449                         ServiceDescription.WriteExtensions (Writer, ob);
1450                         if (ob.@DocumentationElement != null) {
1451                                 XmlNode o66 = ob.@DocumentationElement;
1452                                 if (o66 is XmlElement) {
1453                                 if ((o66.LocalName == "documentation" && o66.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1454                                         }
1455                                         else o66.WriteTo (Writer);
1456                                         WriteElementLiteral (o66, "", "", false, true);
1457                                 }
1458                                 else
1459                                         throw CreateUnknownAnyElementException (o66.Name, o66.NamespaceURI);
1460                         }
1461                         if (ob.@Schemas != null) {
1462                                 for (int n67 = 0; n67 < ob.@Schemas.Count; n67++) {
1463                                         WriteObject_XmlSchema (ob.@Schemas[n67], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
1464                                 }
1465                         }
1466                         if (writeWrappingElem) WriteEndElement (ob);
1467                 }
1468
1469                 void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1470                 {
1471                         if (((object)ob) == null)
1472                         {
1473                                 if (isNullable)
1474                                         WriteNullTagLiteral(element, namesp);
1475                                 return;
1476                         }
1477
1478                         System.Type type = ob.GetType ();
1479                         if (type == typeof(System.Web.Services.Description.Message))
1480                         { }
1481                         else {
1482                                 throw CreateUnknownTypeException (ob);
1483                         }
1484
1485                         if (writeWrappingElem) {
1486                                 WriteStartElement (element, namesp, ob);
1487                         }
1488
1489                         if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
1490
1491                         WriteAttribute ("name", "", ob.@Name);
1492
1493                         if (ob.@DocumentationElement != null) {
1494                                 XmlNode o68 = ob.@DocumentationElement;
1495                                 if (o68 is XmlElement) {
1496                                 if ((o68.LocalName == "documentation" && o68.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1497                                         }
1498                                         else o68.WriteTo (Writer);
1499                                         WriteElementLiteral (o68, "", "", false, true);
1500                                 }
1501                                 else
1502                                         throw CreateUnknownAnyElementException (o68.Name, o68.NamespaceURI);
1503                         }
1504                         if (ob.@Parts != null) {
1505                                 for (int n69 = 0; n69 < ob.@Parts.Count; n69++) {
1506                                         WriteObject_MessagePart (ob.@Parts[n69], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1507                                 }
1508                         }
1509                         if (writeWrappingElem) WriteEndElement (ob);
1510                 }
1511
1512                 void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1513                 {
1514                         if (((object)ob) == null)
1515                         {
1516                                 if (isNullable)
1517                                         WriteNullTagLiteral(element, namesp);
1518                                 return;
1519                         }
1520
1521                         System.Type type = ob.GetType ();
1522                         if (type == typeof(System.Web.Services.Description.PortType))
1523                         { }
1524                         else {
1525                                 throw CreateUnknownTypeException (ob);
1526                         }
1527
1528                         if (writeWrappingElem) {
1529                                 WriteStartElement (element, namesp, ob);
1530                         }
1531
1532                         if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
1533
1534                         WriteAttribute ("name", "", ob.@Name);
1535
1536                         if (ob.@DocumentationElement != null) {
1537                                 XmlNode o70 = ob.@DocumentationElement;
1538                                 if (o70 is XmlElement) {
1539                                 if ((o70.LocalName == "documentation" && o70.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1540                                         }
1541                                         else o70.WriteTo (Writer);
1542                                         WriteElementLiteral (o70, "", "", false, true);
1543                                 }
1544                                 else
1545                                         throw CreateUnknownAnyElementException (o70.Name, o70.NamespaceURI);
1546                         }
1547                         if (ob.@Operations != null) {
1548                                 for (int n71 = 0; n71 < ob.@Operations.Count; n71++) {
1549                                         WriteObject_Operation (ob.@Operations[n71], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1550                                 }
1551                         }
1552                         if (writeWrappingElem) WriteEndElement (ob);
1553                 }
1554
1555                 void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1556                 {
1557                         if (((object)ob) == null)
1558                         {
1559                                 if (isNullable)
1560                                         WriteNullTagLiteral(element, namesp);
1561                                 return;
1562                         }
1563
1564                         System.Type type = ob.GetType ();
1565                         if (type == typeof(System.Web.Services.Description.Binding))
1566                         { }
1567                         else {
1568                                 throw CreateUnknownTypeException (ob);
1569                         }
1570
1571                         if (writeWrappingElem) {
1572                                 WriteStartElement (element, namesp, ob);
1573                         }
1574
1575                         if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
1576
1577                         WriteAttribute ("name", "", ob.@Name);
1578                         WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1579
1580                         ServiceDescription.WriteExtensions (Writer, ob);
1581                         if (ob.@DocumentationElement != null) {
1582                                 XmlNode o72 = ob.@DocumentationElement;
1583                                 if (o72 is XmlElement) {
1584                                 if ((o72.LocalName == "documentation" && o72.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1585                                         }
1586                                         else o72.WriteTo (Writer);
1587                                         WriteElementLiteral (o72, "", "", false, true);
1588                                 }
1589                                 else
1590                                         throw CreateUnknownAnyElementException (o72.Name, o72.NamespaceURI);
1591                         }
1592                         if (ob.@Operations != null) {
1593                                 for (int n73 = 0; n73 < ob.@Operations.Count; n73++) {
1594                                         WriteObject_OperationBinding (ob.@Operations[n73], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1595                                 }
1596                         }
1597                         if (writeWrappingElem) WriteEndElement (ob);
1598                 }
1599
1600                 void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1601                 {
1602                         if (((object)ob) == null)
1603                         {
1604                                 if (isNullable)
1605                                         WriteNullTagLiteral(element, namesp);
1606                                 return;
1607                         }
1608
1609                         System.Type type = ob.GetType ();
1610                         if (type == typeof(System.Web.Services.Description.Service))
1611                         { }
1612                         else {
1613                                 throw CreateUnknownTypeException (ob);
1614                         }
1615
1616                         if (writeWrappingElem) {
1617                                 WriteStartElement (element, namesp, ob);
1618                         }
1619
1620                         if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
1621
1622                         WriteAttribute ("name", "", ob.@Name);
1623
1624                         if (ob.@DocumentationElement != null) {
1625                                 XmlNode o74 = ob.@DocumentationElement;
1626                                 if (o74 is XmlElement) {
1627                                 if ((o74.LocalName == "documentation" && o74.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1628                                         }
1629                                         else o74.WriteTo (Writer);
1630                                         WriteElementLiteral (o74, "", "", false, true);
1631                                 }
1632                                 else
1633                                         throw CreateUnknownAnyElementException (o74.Name, o74.NamespaceURI);
1634                         }
1635                         if (ob.@Ports != null) {
1636                                 for (int n75 = 0; n75 < ob.@Ports.Count; n75++) {
1637                                         WriteObject_Port (ob.@Ports[n75], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1638                                 }
1639                         }
1640                         if (writeWrappingElem) WriteEndElement (ob);
1641                 }
1642
1643                 void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1644                 {
1645                         ob.Write (Writer);
1646                 }
1647
1648                 void WriteObject_MessagePart (System.Web.Services.Description.MessagePart ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1649                 {
1650                         if (((object)ob) == null)
1651                         {
1652                                 if (isNullable)
1653                                         WriteNullTagLiteral(element, namesp);
1654                                 return;
1655                         }
1656
1657                         System.Type type = ob.GetType ();
1658                         if (type == typeof(System.Web.Services.Description.MessagePart))
1659                         { }
1660                         else {
1661                                 throw CreateUnknownTypeException (ob);
1662                         }
1663
1664                         if (writeWrappingElem) {
1665                                 WriteStartElement (element, namesp, ob);
1666                         }
1667
1668                         if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
1669
1670                         WriteAttribute ("element", "", FromXmlQualifiedName (ob.@Element));
1671                         WriteAttribute ("name", "", ob.@Name);
1672                         WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1673
1674                         if (ob.@DocumentationElement != null) {
1675                                 XmlNode o76 = ob.@DocumentationElement;
1676                                 if (o76 is XmlElement) {
1677                                 if ((o76.LocalName == "documentation" && o76.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1678                                         }
1679                                         else o76.WriteTo (Writer);
1680                                         WriteElementLiteral (o76, "", "", false, true);
1681                                 }
1682                                 else
1683                                         throw CreateUnknownAnyElementException (o76.Name, o76.NamespaceURI);
1684                         }
1685                         if (writeWrappingElem) WriteEndElement (ob);
1686                 }
1687
1688                 void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1689                 {
1690                         if (((object)ob) == null)
1691                         {
1692                                 if (isNullable)
1693                                         WriteNullTagLiteral(element, namesp);
1694                                 return;
1695                         }
1696
1697                         System.Type type = ob.GetType ();
1698                         if (type == typeof(System.Web.Services.Description.Operation))
1699                         { }
1700                         else {
1701                                 throw CreateUnknownTypeException (ob);
1702                         }
1703
1704                         if (writeWrappingElem) {
1705                                 WriteStartElement (element, namesp, ob);
1706                         }
1707
1708                         if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
1709
1710                         WriteAttribute ("name", "", ob.@Name);
1711                         if (ob.@ParameterOrderString != "") {
1712                                 WriteAttribute ("parameterOrder", "", ob.@ParameterOrderString);
1713                         }
1714
1715                         if (ob.@DocumentationElement != null) {
1716                                 XmlNode o77 = ob.@DocumentationElement;
1717                                 if (o77 is XmlElement) {
1718                                 if ((o77.LocalName == "documentation" && o77.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1719                                         }
1720                                         else o77.WriteTo (Writer);
1721                                         WriteElementLiteral (o77, "", "", false, true);
1722                                 }
1723                                 else
1724                                         throw CreateUnknownAnyElementException (o77.Name, o77.NamespaceURI);
1725                         }
1726                         if (ob.@Faults != null) {
1727                                 for (int n78 = 0; n78 < ob.@Faults.Count; n78++) {
1728                                         WriteObject_OperationFault (ob.@Faults[n78], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1729                                 }
1730                         }
1731                         if (ob.@Messages != null) {
1732                                 for (int n79 = 0; n79 < ob.@Messages.Count; n79++) {
1733                                         if (((object)ob.@Messages[n79]) == null) { }
1734                                         else if (ob.@Messages[n79].GetType() == typeof(System.Web.Services.Description.OperationOutput)) {
1735                                                 WriteObject_OperationOutput (((System.Web.Services.Description.OperationOutput) ob.@Messages[n79]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1736                                         }
1737                                         else if (ob.@Messages[n79].GetType() == typeof(System.Web.Services.Description.OperationInput)) {
1738                                                 WriteObject_OperationInput (((System.Web.Services.Description.OperationInput) ob.@Messages[n79]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1739                                         }
1740                                         else throw CreateUnknownTypeException (ob.@Messages[n79]);
1741                                 }
1742                         }
1743                         if (writeWrappingElem) WriteEndElement (ob);
1744                 }
1745
1746                 void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1747                 {
1748                         if (((object)ob) == null)
1749                         {
1750                                 if (isNullable)
1751                                         WriteNullTagLiteral(element, namesp);
1752                                 return;
1753                         }
1754
1755                         System.Type type = ob.GetType ();
1756                         if (type == typeof(System.Web.Services.Description.OperationBinding))
1757                         { }
1758                         else {
1759                                 throw CreateUnknownTypeException (ob);
1760                         }
1761
1762                         if (writeWrappingElem) {
1763                                 WriteStartElement (element, namesp, ob);
1764                         }
1765
1766                         if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
1767
1768                         WriteAttribute ("name", "", ob.@Name);
1769
1770                         ServiceDescription.WriteExtensions (Writer, ob);
1771                         if (ob.@DocumentationElement != null) {
1772                                 XmlNode o80 = ob.@DocumentationElement;
1773                                 if (o80 is XmlElement) {
1774                                 if ((o80.LocalName == "documentation" && o80.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1775                                         }
1776                                         else o80.WriteTo (Writer);
1777                                         WriteElementLiteral (o80, "", "", false, true);
1778                                 }
1779                                 else
1780                                         throw CreateUnknownAnyElementException (o80.Name, o80.NamespaceURI);
1781                         }
1782                         if (ob.@Faults != null) {
1783                                 for (int n81 = 0; n81 < ob.@Faults.Count; n81++) {
1784                                         WriteObject_FaultBinding (ob.@Faults[n81], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1785                                 }
1786                         }
1787                         WriteObject_InputBinding (ob.@Input, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1788                         WriteObject_OutputBinding (ob.@Output, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1789                         if (writeWrappingElem) WriteEndElement (ob);
1790                 }
1791
1792                 void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1793                 {
1794                         if (((object)ob) == null)
1795                         {
1796                                 if (isNullable)
1797                                         WriteNullTagLiteral(element, namesp);
1798                                 return;
1799                         }
1800
1801                         System.Type type = ob.GetType ();
1802                         if (type == typeof(System.Web.Services.Description.Port))
1803                         { }
1804                         else {
1805                                 throw CreateUnknownTypeException (ob);
1806                         }
1807
1808                         if (writeWrappingElem) {
1809                                 WriteStartElement (element, namesp, ob);
1810                         }
1811
1812                         if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
1813
1814                         WriteAttribute ("binding", "", FromXmlQualifiedName (ob.@Binding));
1815                         WriteAttribute ("name", "", ob.@Name);
1816
1817                         ServiceDescription.WriteExtensions (Writer, ob);
1818                         if (ob.@DocumentationElement != null) {
1819                                 XmlNode o82 = ob.@DocumentationElement;
1820                                 if (o82 is XmlElement) {
1821                                 if ((o82.LocalName == "documentation" && o82.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1822                                         }
1823                                         else o82.WriteTo (Writer);
1824                                         WriteElementLiteral (o82, "", "", false, true);
1825                                 }
1826                                 else
1827                                         throw CreateUnknownAnyElementException (o82.Name, o82.NamespaceURI);
1828                         }
1829                         if (writeWrappingElem) WriteEndElement (ob);
1830                 }
1831
1832                 void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1833                 {
1834                         if (((object)ob) == null)
1835                         {
1836                                 if (isNullable)
1837                                         WriteNullTagLiteral(element, namesp);
1838                                 return;
1839                         }
1840
1841                         System.Type type = ob.GetType ();
1842                         if (type == typeof(System.Web.Services.Description.OperationFault))
1843                         { }
1844                         else {
1845                                 throw CreateUnknownTypeException (ob);
1846                         }
1847
1848                         if (writeWrappingElem) {
1849                                 WriteStartElement (element, namesp, ob);
1850                         }
1851
1852                         if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
1853
1854                         WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1855                         WriteAttribute ("name", "", ob.@Name);
1856
1857                         if (ob.@DocumentationElement != null) {
1858                                 XmlNode o83 = ob.@DocumentationElement;
1859                                 if (o83 is XmlElement) {
1860                                 if ((o83.LocalName == "documentation" && o83.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1861                                         }
1862                                         else o83.WriteTo (Writer);
1863                                         WriteElementLiteral (o83, "", "", false, true);
1864                                 }
1865                                 else
1866                                         throw CreateUnknownAnyElementException (o83.Name, o83.NamespaceURI);
1867                         }
1868                         if (writeWrappingElem) WriteEndElement (ob);
1869                 }
1870
1871                 void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1872                 {
1873                         if (((object)ob) == null)
1874                         {
1875                                 if (isNullable)
1876                                         WriteNullTagLiteral(element, namesp);
1877                                 return;
1878                         }
1879
1880                         System.Type type = ob.GetType ();
1881                         if (type == typeof(System.Web.Services.Description.OperationOutput))
1882                         { }
1883                         else {
1884                                 throw CreateUnknownTypeException (ob);
1885                         }
1886
1887                         if (writeWrappingElem) {
1888                                 WriteStartElement (element, namesp, ob);
1889                         }
1890
1891                         if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
1892
1893                         WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1894                         WriteAttribute ("name", "", ob.@Name);
1895
1896                         if (ob.@DocumentationElement != null) {
1897                                 XmlNode o84 = ob.@DocumentationElement;
1898                                 if (o84 is XmlElement) {
1899                                 if ((o84.LocalName == "documentation" && o84.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1900                                         }
1901                                         else o84.WriteTo (Writer);
1902                                         WriteElementLiteral (o84, "", "", false, true);
1903                                 }
1904                                 else
1905                                         throw CreateUnknownAnyElementException (o84.Name, o84.NamespaceURI);
1906                         }
1907                         if (writeWrappingElem) WriteEndElement (ob);
1908                 }
1909
1910                 void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1911                 {
1912                         if (((object)ob) == null)
1913                         {
1914                                 if (isNullable)
1915                                         WriteNullTagLiteral(element, namesp);
1916                                 return;
1917                         }
1918
1919                         System.Type type = ob.GetType ();
1920                         if (type == typeof(System.Web.Services.Description.OperationInput))
1921                         { }
1922                         else {
1923                                 throw CreateUnknownTypeException (ob);
1924                         }
1925
1926                         if (writeWrappingElem) {
1927                                 WriteStartElement (element, namesp, ob);
1928                         }
1929
1930                         if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
1931
1932                         WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1933                         WriteAttribute ("name", "", ob.@Name);
1934
1935                         if (ob.@DocumentationElement != null) {
1936                                 XmlNode o85 = ob.@DocumentationElement;
1937                                 if (o85 is XmlElement) {
1938                                 if ((o85.LocalName == "documentation" && o85.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1939                                         }
1940                                         else o85.WriteTo (Writer);
1941                                         WriteElementLiteral (o85, "", "", false, true);
1942                                 }
1943                                 else
1944                                         throw CreateUnknownAnyElementException (o85.Name, o85.NamespaceURI);
1945                         }
1946                         if (writeWrappingElem) WriteEndElement (ob);
1947                 }
1948
1949                 void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1950                 {
1951                         if (((object)ob) == null)
1952                         {
1953                                 if (isNullable)
1954                                         WriteNullTagLiteral(element, namesp);
1955                                 return;
1956                         }
1957
1958                         System.Type type = ob.GetType ();
1959                         if (type == typeof(System.Web.Services.Description.FaultBinding))
1960                         { }
1961                         else {
1962                                 throw CreateUnknownTypeException (ob);
1963                         }
1964
1965                         if (writeWrappingElem) {
1966                                 WriteStartElement (element, namesp, ob);
1967                         }
1968
1969                         if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
1970
1971                         WriteAttribute ("name", "", ob.@Name);
1972
1973                         ServiceDescription.WriteExtensions (Writer, ob);
1974                         if (ob.@DocumentationElement != null) {
1975                                 XmlNode o86 = ob.@DocumentationElement;
1976                                 if (o86 is XmlElement) {
1977                                 if ((o86.LocalName == "documentation" && o86.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1978                                         }
1979                                         else o86.WriteTo (Writer);
1980                                         WriteElementLiteral (o86, "", "", false, true);
1981                                 }
1982                                 else
1983                                         throw CreateUnknownAnyElementException (o86.Name, o86.NamespaceURI);
1984                         }
1985                         if (writeWrappingElem) WriteEndElement (ob);
1986                 }
1987
1988                 void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1989                 {
1990                         if (((object)ob) == null)
1991                         {
1992                                 if (isNullable)
1993                                         WriteNullTagLiteral(element, namesp);
1994                                 return;
1995                         }
1996
1997                         System.Type type = ob.GetType ();
1998                         if (type == typeof(System.Web.Services.Description.InputBinding))
1999                         { }
2000                         else {
2001                                 throw CreateUnknownTypeException (ob);
2002                         }
2003
2004                         if (writeWrappingElem) {
2005                                 WriteStartElement (element, namesp, ob);
2006                         }
2007
2008                         if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
2009
2010                         WriteAttribute ("name", "", ob.@Name);
2011
2012                         ServiceDescription.WriteExtensions (Writer, ob);
2013                         if (ob.@DocumentationElement != null) {
2014                                 XmlNode o87 = ob.@DocumentationElement;
2015                                 if (o87 is XmlElement) {
2016                                 if ((o87.LocalName == "documentation" && o87.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2017                                         }
2018                                         else o87.WriteTo (Writer);
2019                                         WriteElementLiteral (o87, "", "", false, true);
2020                                 }
2021                                 else
2022                                         throw CreateUnknownAnyElementException (o87.Name, o87.NamespaceURI);
2023                         }
2024                         if (writeWrappingElem) WriteEndElement (ob);
2025                 }
2026
2027                 void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2028                 {
2029                         if (((object)ob) == null)
2030                         {
2031                                 if (isNullable)
2032                                         WriteNullTagLiteral(element, namesp);
2033                                 return;
2034                         }
2035
2036                         System.Type type = ob.GetType ();
2037                         if (type == typeof(System.Web.Services.Description.OutputBinding))
2038                         { }
2039                         else {
2040                                 throw CreateUnknownTypeException (ob);
2041                         }
2042
2043                         if (writeWrappingElem) {
2044                                 WriteStartElement (element, namesp, ob);
2045                         }
2046
2047                         if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
2048
2049                         WriteAttribute ("name", "", ob.@Name);
2050
2051                         ServiceDescription.WriteExtensions (Writer, ob);
2052                         if (ob.@DocumentationElement != null) {
2053                                 XmlNode o88 = ob.@DocumentationElement;
2054                                 if (o88 is XmlElement) {
2055                                 if ((o88.LocalName == "documentation" && o88.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2056                                         }
2057                                         else o88.WriteTo (Writer);
2058                                         WriteElementLiteral (o88, "", "", false, true);
2059                                 }
2060                                 else
2061                                         throw CreateUnknownAnyElementException (o88.Name, o88.NamespaceURI);
2062                         }
2063                         if (writeWrappingElem) WriteEndElement (ob);
2064                 }
2065
2066                 protected override void InitCallbacks ()
2067                 {
2068                 }
2069
2070         }
2071
2072 }
2073
2074 #endif