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