2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / class / System.Web.Services / System.Web.Services.Description / ServiceDescriptionSerializerBase2.cs
blob69e87d037ad04547118bdbab88a457725746c949
1 #if NET_2_0
2 // It is automatically generated
3 using System;
4 using System.Xml;
5 using System.Xml.Schema;
6 using System.Xml.Serialization;
7 using System.Text;
8 using System.Collections;
9 using System.Globalization;
11 namespace System.Web.Services.Description
13 internal class ServiceDescriptionReaderBase : XmlSerializationReader
15 static readonly System.Reflection.MethodInfo fromBinHexStringMethod = typeof (XmlConvert).GetMethod ("FromBinHexString", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic, null, new Type [] {typeof (string)}, null);
16 static byte [] FromBinHexString (string input)
18 return input == null ? null : (byte []) fromBinHexStringMethod.Invoke (null, new object [] {input});
20 public object ReadRoot_ServiceDescription ()
22 Reader.MoveToContent();
23 if (Reader.LocalName != "definitions" || Reader.NamespaceURI != "http://schemas.xmlsoap.org/wsdl/")
24 throw CreateUnknownNodeException();
25 return ReadObject_ServiceDescription (true, true);
28 public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
30 System.Web.Services.Description.ServiceDescription ob = null;
31 if (isNullable && ReadNull()) return null;
33 if (checkType)
35 System.Xml.XmlQualifiedName t = GetXsiType();
36 if (t == null)
37 { }
38 else if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
39 throw CreateUnknownTypeException(t);
42 ob = (System.Web.Services.Description.ServiceDescription) Activator.CreateInstance(typeof(System.Web.Services.Description.ServiceDescription), true);
44 Reader.MoveToElement();
46 int anyAttributeIndex = 0;
47 System.Xml.XmlAttribute[] anyAttributeArray = null;
48 while (Reader.MoveToNextAttribute())
50 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
51 ob.@Name = Reader.Value;
53 else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
54 ob.@TargetNamespace = Reader.Value;
56 else if (IsXmlnsAttribute (Reader.Name)) {
57 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
58 if (Reader.Prefix == "xmlns")
59 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
60 else
61 ob.@Namespaces.Add ("", Reader.Value);
63 else {
64 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
65 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
66 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
67 anyAttributeIndex++;
71 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
72 ob.@ExtensibleAttributes = anyAttributeArray;
74 Reader.MoveToElement ();
75 Reader.MoveToElement();
76 if (Reader.IsEmptyElement) {
77 Reader.Skip ();
78 return ob;
81 Reader.ReadStartElement();
82 Reader.MoveToContent();
84 bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
86 System.Web.Services.Description.ImportCollection o8;
87 o8 = ob.@Imports;
88 System.Web.Services.Description.MessageCollection o10;
89 o10 = ob.@Messages;
90 System.Web.Services.Description.PortTypeCollection o12;
91 o12 = ob.@PortTypes;
92 System.Web.Services.Description.BindingCollection o14;
93 o14 = ob.@Bindings;
94 System.Web.Services.Description.ServiceCollection o16;
95 o16 = ob.@Services;
96 int n7=0, n9=0, n11=0, n13=0, n15=0;
98 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
100 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
102 if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
103 b2 = true;
104 ob.@Types = ReadObject_Types (false, true);
106 else if (Reader.LocalName == "service" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b6) {
107 if (((object)o16) == null)
108 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
109 o16.Add (ReadObject_Service (false, true));
110 n15++;
112 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b3) {
113 if (((object)o10) == null)
114 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
115 o10.Add (ReadObject_Message (false, true));
116 n9++;
118 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b0) {
119 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
121 else if (Reader.LocalName == "portType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b4) {
122 if (((object)o12) == null)
123 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortTypeCollection");
124 o12.Add (ReadObject_PortType (false, true));
125 n11++;
127 else if (Reader.LocalName == "import" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b1) {
128 if (((object)o8) == null)
129 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ImportCollection");
130 o8.Add (ReadObject_Import (false, true));
131 n7++;
133 else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b5) {
134 if (((object)o14) == null)
135 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.BindingCollection");
136 o14.Add (ReadObject_Binding (false, true));
137 n13++;
139 else {
140 ServiceDescription.ReadExtension (Document, Reader, ob);
143 else
144 UnknownNode(ob);
146 Reader.MoveToContent();
150 ReadEndElement();
152 return ob;
155 public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
157 System.Web.Services.Description.Types ob = null;
158 if (isNullable && ReadNull()) return null;
160 if (checkType)
162 System.Xml.XmlQualifiedName t = GetXsiType();
163 if (t == null)
165 else if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
166 throw CreateUnknownTypeException(t);
169 ob = (System.Web.Services.Description.Types) Activator.CreateInstance(typeof(System.Web.Services.Description.Types), true);
171 Reader.MoveToElement();
173 int anyAttributeIndex = 0;
174 System.Xml.XmlAttribute[] anyAttributeArray = null;
175 while (Reader.MoveToNextAttribute())
177 if (IsXmlnsAttribute (Reader.Name)) {
178 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
179 if (Reader.Prefix == "xmlns")
180 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
181 else
182 ob.@Namespaces.Add ("", Reader.Value);
184 else {
185 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
186 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
187 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
188 anyAttributeIndex++;
192 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
193 ob.@ExtensibleAttributes = anyAttributeArray;
195 Reader.MoveToElement ();
196 Reader.MoveToElement();
197 if (Reader.IsEmptyElement) {
198 Reader.Skip ();
199 return ob;
202 Reader.ReadStartElement();
203 Reader.MoveToContent();
205 bool b17=false, b18=false;
207 System.Xml.Serialization.XmlSchemas o20;
208 o20 = ob.@Schemas;
209 int n19=0;
211 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
213 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
215 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
216 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
218 else if (Reader.LocalName == "schema" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b18) {
219 if (((object)o20) == null)
220 throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
221 o20.Add (ReadObject_XmlSchema (false, true));
222 n19++;
224 else {
225 ServiceDescription.ReadExtension (Document, Reader, ob);
228 else
229 UnknownNode(ob);
231 Reader.MoveToContent();
235 ReadEndElement();
237 return ob;
240 public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
242 System.Web.Services.Description.Service ob = null;
243 if (isNullable && ReadNull()) return null;
245 if (checkType)
247 System.Xml.XmlQualifiedName t = GetXsiType();
248 if (t == null)
250 else if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
251 throw CreateUnknownTypeException(t);
254 ob = (System.Web.Services.Description.Service) Activator.CreateInstance(typeof(System.Web.Services.Description.Service), true);
256 Reader.MoveToElement();
258 int anyAttributeIndex = 0;
259 System.Xml.XmlAttribute[] anyAttributeArray = null;
260 while (Reader.MoveToNextAttribute())
262 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
263 ob.@Name = Reader.Value;
265 else if (IsXmlnsAttribute (Reader.Name)) {
266 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
267 if (Reader.Prefix == "xmlns")
268 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
269 else
270 ob.@Namespaces.Add ("", Reader.Value);
272 else {
273 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
274 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
275 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
276 anyAttributeIndex++;
280 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
281 ob.@ExtensibleAttributes = anyAttributeArray;
283 Reader.MoveToElement ();
284 Reader.MoveToElement();
285 if (Reader.IsEmptyElement) {
286 Reader.Skip ();
287 return ob;
290 Reader.ReadStartElement();
291 Reader.MoveToContent();
293 bool b21=false, b22=false;
295 System.Web.Services.Description.PortCollection o24;
296 o24 = ob.@Ports;
297 int n23=0;
299 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
301 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
303 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
304 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
306 else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) {
307 if (((object)o24) == null)
308 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
309 o24.Add (ReadObject_Port (false, true));
310 n23++;
312 else {
313 ServiceDescription.ReadExtension (Document, Reader, ob);
316 else
317 UnknownNode(ob);
319 Reader.MoveToContent();
323 ReadEndElement();
325 return ob;
328 public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
330 System.Web.Services.Description.Message ob = null;
331 if (isNullable && ReadNull()) return null;
333 if (checkType)
335 System.Xml.XmlQualifiedName t = GetXsiType();
336 if (t == null)
338 else if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
339 throw CreateUnknownTypeException(t);
342 ob = (System.Web.Services.Description.Message) Activator.CreateInstance(typeof(System.Web.Services.Description.Message), true);
344 Reader.MoveToElement();
346 int anyAttributeIndex = 0;
347 System.Xml.XmlAttribute[] anyAttributeArray = null;
348 while (Reader.MoveToNextAttribute())
350 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
351 ob.@Name = Reader.Value;
353 else if (IsXmlnsAttribute (Reader.Name)) {
354 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
355 if (Reader.Prefix == "xmlns")
356 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
357 else
358 ob.@Namespaces.Add ("", Reader.Value);
360 else {
361 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
362 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
363 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
364 anyAttributeIndex++;
368 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
369 ob.@ExtensibleAttributes = anyAttributeArray;
371 Reader.MoveToElement ();
372 Reader.MoveToElement();
373 if (Reader.IsEmptyElement) {
374 Reader.Skip ();
375 return ob;
378 Reader.ReadStartElement();
379 Reader.MoveToContent();
381 bool b25=false, b26=false;
383 System.Web.Services.Description.MessagePartCollection o28;
384 o28 = ob.@Parts;
385 int n27=0;
387 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
389 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
391 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
392 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
394 else if (Reader.LocalName == "part" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b26) {
395 if (((object)o28) == null)
396 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
397 o28.Add (ReadObject_MessagePart (false, true));
398 n27++;
400 else {
401 ServiceDescription.ReadExtension (Document, Reader, ob);
404 else
405 UnknownNode(ob);
407 Reader.MoveToContent();
411 ReadEndElement();
413 return ob;
416 public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
418 System.Web.Services.Description.PortType ob = null;
419 if (isNullable && ReadNull()) return null;
421 if (checkType)
423 System.Xml.XmlQualifiedName t = GetXsiType();
424 if (t == null)
426 else if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
427 throw CreateUnknownTypeException(t);
430 ob = (System.Web.Services.Description.PortType) Activator.CreateInstance(typeof(System.Web.Services.Description.PortType), true);
432 Reader.MoveToElement();
434 int anyAttributeIndex = 0;
435 System.Xml.XmlAttribute[] anyAttributeArray = null;
436 while (Reader.MoveToNextAttribute())
438 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
439 ob.@Name = Reader.Value;
441 else if (IsXmlnsAttribute (Reader.Name)) {
442 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
443 if (Reader.Prefix == "xmlns")
444 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
445 else
446 ob.@Namespaces.Add ("", Reader.Value);
448 else {
449 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
450 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
451 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
452 anyAttributeIndex++;
456 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
457 ob.@ExtensibleAttributes = anyAttributeArray;
459 Reader.MoveToElement ();
460 Reader.MoveToElement();
461 if (Reader.IsEmptyElement) {
462 Reader.Skip ();
463 return ob;
466 Reader.ReadStartElement();
467 Reader.MoveToContent();
469 bool b29=false, b30=false;
471 System.Web.Services.Description.OperationCollection o32;
472 o32 = ob.@Operations;
473 int n31=0;
475 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
477 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
479 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b29) {
480 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
482 else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b30) {
483 if (((object)o32) == null)
484 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
485 o32.Add (ReadObject_Operation (false, true));
486 n31++;
488 else {
489 ServiceDescription.ReadExtension (Document, Reader, ob);
492 else
493 UnknownNode(ob);
495 Reader.MoveToContent();
499 ReadEndElement();
501 return ob;
504 public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
506 System.Web.Services.Description.Import ob = null;
507 if (isNullable && ReadNull()) return null;
509 if (checkType)
511 System.Xml.XmlQualifiedName t = GetXsiType();
512 if (t == null)
514 else if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
515 throw CreateUnknownTypeException(t);
518 ob = (System.Web.Services.Description.Import) Activator.CreateInstance(typeof(System.Web.Services.Description.Import), true);
520 Reader.MoveToElement();
522 int anyAttributeIndex = 0;
523 System.Xml.XmlAttribute[] anyAttributeArray = null;
524 while (Reader.MoveToNextAttribute())
526 if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
527 ob.@Location = Reader.Value;
529 else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
530 ob.@Namespace = Reader.Value;
532 else if (IsXmlnsAttribute (Reader.Name)) {
533 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
534 if (Reader.Prefix == "xmlns")
535 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
536 else
537 ob.@Namespaces.Add ("", Reader.Value);
539 else {
540 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
541 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
542 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
543 anyAttributeIndex++;
547 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
548 ob.@ExtensibleAttributes = anyAttributeArray;
550 Reader.MoveToElement ();
551 Reader.MoveToElement();
552 if (Reader.IsEmptyElement) {
553 Reader.Skip ();
554 return ob;
557 Reader.ReadStartElement();
558 Reader.MoveToContent();
560 bool b33=false;
562 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
564 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
566 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b33) {
567 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
569 else {
570 ServiceDescription.ReadExtension (Document, Reader, ob);
573 else
574 UnknownNode(ob);
576 Reader.MoveToContent();
579 ReadEndElement();
581 return ob;
584 public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
586 System.Web.Services.Description.Binding ob = null;
587 if (isNullable && ReadNull()) return null;
589 if (checkType)
591 System.Xml.XmlQualifiedName t = GetXsiType();
592 if (t == null)
594 else if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
595 throw CreateUnknownTypeException(t);
598 ob = (System.Web.Services.Description.Binding) Activator.CreateInstance(typeof(System.Web.Services.Description.Binding), true);
600 Reader.MoveToElement();
602 int anyAttributeIndex = 0;
603 System.Xml.XmlAttribute[] anyAttributeArray = null;
604 while (Reader.MoveToNextAttribute())
606 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
607 ob.@Name = Reader.Value;
609 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
610 ob.@Type = ToXmlQualifiedName (Reader.Value);
612 else if (IsXmlnsAttribute (Reader.Name)) {
613 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
614 if (Reader.Prefix == "xmlns")
615 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
616 else
617 ob.@Namespaces.Add ("", Reader.Value);
619 else {
620 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
621 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
622 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
623 anyAttributeIndex++;
627 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
628 ob.@ExtensibleAttributes = anyAttributeArray;
630 Reader.MoveToElement ();
631 Reader.MoveToElement();
632 if (Reader.IsEmptyElement) {
633 Reader.Skip ();
634 return ob;
637 Reader.ReadStartElement();
638 Reader.MoveToContent();
640 bool b34=false, b35=false;
642 System.Web.Services.Description.OperationBindingCollection o37;
643 o37 = ob.@Operations;
644 int n36=0;
646 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
648 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
650 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
651 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
653 else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b35) {
654 if (((object)o37) == null)
655 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
656 o37.Add (ReadObject_OperationBinding (false, true));
657 n36++;
659 else {
660 ServiceDescription.ReadExtension (Document, Reader, ob);
663 else
664 UnknownNode(ob);
666 Reader.MoveToContent();
670 ReadEndElement();
672 return ob;
675 public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
677 System.Xml.Schema.XmlSchema ob = null;
678 ob = System.Xml.Schema.XmlSchema.Read (Reader, null); Reader.Read ();
679 return ob;
682 public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
684 System.Web.Services.Description.Port ob = null;
685 if (isNullable && ReadNull()) return null;
687 if (checkType)
689 System.Xml.XmlQualifiedName t = GetXsiType();
690 if (t == null)
692 else if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
693 throw CreateUnknownTypeException(t);
696 ob = (System.Web.Services.Description.Port) Activator.CreateInstance(typeof(System.Web.Services.Description.Port), true);
698 Reader.MoveToElement();
700 int anyAttributeIndex = 0;
701 System.Xml.XmlAttribute[] anyAttributeArray = null;
702 while (Reader.MoveToNextAttribute())
704 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
705 ob.@Name = Reader.Value;
707 else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
708 ob.@Binding = ToXmlQualifiedName (Reader.Value);
710 else if (IsXmlnsAttribute (Reader.Name)) {
711 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
712 if (Reader.Prefix == "xmlns")
713 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
714 else
715 ob.@Namespaces.Add ("", Reader.Value);
717 else {
718 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
719 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
720 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
721 anyAttributeIndex++;
725 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
726 ob.@ExtensibleAttributes = anyAttributeArray;
728 Reader.MoveToElement ();
729 Reader.MoveToElement();
730 if (Reader.IsEmptyElement) {
731 Reader.Skip ();
732 return ob;
735 Reader.ReadStartElement();
736 Reader.MoveToContent();
738 bool b38=false;
740 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
742 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
744 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
745 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
747 else {
748 ServiceDescription.ReadExtension (Document, Reader, ob);
751 else
752 UnknownNode(ob);
754 Reader.MoveToContent();
757 ReadEndElement();
759 return ob;
762 public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
764 System.Web.Services.Description.MessagePart ob = null;
765 if (isNullable && ReadNull()) return null;
767 if (checkType)
769 System.Xml.XmlQualifiedName t = GetXsiType();
770 if (t == null)
772 else if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
773 throw CreateUnknownTypeException(t);
776 ob = (System.Web.Services.Description.MessagePart) Activator.CreateInstance(typeof(System.Web.Services.Description.MessagePart), true);
778 Reader.MoveToElement();
780 int anyAttributeIndex = 0;
781 System.Xml.XmlAttribute[] anyAttributeArray = null;
782 while (Reader.MoveToNextAttribute())
784 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
785 ob.@Name = Reader.Value;
787 else if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
788 ob.@Element = ToXmlQualifiedName (Reader.Value);
790 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
791 ob.@Type = ToXmlQualifiedName (Reader.Value);
793 else if (IsXmlnsAttribute (Reader.Name)) {
794 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
795 if (Reader.Prefix == "xmlns")
796 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
797 else
798 ob.@Namespaces.Add ("", Reader.Value);
800 else {
801 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
802 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
803 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
804 anyAttributeIndex++;
808 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
809 ob.@ExtensibleAttributes = anyAttributeArray;
811 Reader.MoveToElement ();
812 Reader.MoveToElement();
813 if (Reader.IsEmptyElement) {
814 Reader.Skip ();
815 return ob;
818 Reader.ReadStartElement();
819 Reader.MoveToContent();
821 bool b39=false;
823 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
825 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
827 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
828 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
830 else {
831 ServiceDescription.ReadExtension (Document, Reader, ob);
834 else
835 UnknownNode(ob);
837 Reader.MoveToContent();
840 ReadEndElement();
842 return ob;
845 public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
847 System.Web.Services.Description.Operation ob = null;
848 if (isNullable && ReadNull()) return null;
850 if (checkType)
852 System.Xml.XmlQualifiedName t = GetXsiType();
853 if (t == null)
855 else if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
856 throw CreateUnknownTypeException(t);
859 ob = (System.Web.Services.Description.Operation) Activator.CreateInstance(typeof(System.Web.Services.Description.Operation), true);
861 Reader.MoveToElement();
863 int anyAttributeIndex = 0;
864 System.Xml.XmlAttribute[] anyAttributeArray = null;
865 while (Reader.MoveToNextAttribute())
867 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
868 ob.@Name = Reader.Value;
870 else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
871 ob.@ParameterOrderString = Reader.Value;
873 else if (IsXmlnsAttribute (Reader.Name)) {
874 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
875 if (Reader.Prefix == "xmlns")
876 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
877 else
878 ob.@Namespaces.Add ("", Reader.Value);
880 else {
881 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
882 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
883 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
884 anyAttributeIndex++;
888 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
889 ob.@ExtensibleAttributes = anyAttributeArray;
891 Reader.MoveToElement ();
892 Reader.MoveToElement();
893 if (Reader.IsEmptyElement) {
894 Reader.Skip ();
895 return ob;
898 Reader.ReadStartElement();
899 Reader.MoveToContent();
901 bool b40=false, b41=false, b42=false;
903 System.Web.Services.Description.OperationFaultCollection o44;
904 o44 = ob.@Faults;
905 System.Web.Services.Description.OperationMessageCollection o46;
906 o46 = ob.@Messages;
907 int n43=0, n45=0;
909 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
911 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
913 if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
914 if (((object)o46) == null)
915 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
916 o46.Add (ReadObject_OperationOutput (false, true));
917 n45++;
919 else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
920 if (((object)o46) == null)
921 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
922 o46.Add (ReadObject_OperationInput (false, true));
923 n45++;
925 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
926 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
928 else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b41) {
929 if (((object)o44) == null)
930 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
931 o44.Add (ReadObject_OperationFault (false, true));
932 n43++;
934 else {
935 ServiceDescription.ReadExtension (Document, Reader, ob);
938 else
939 UnknownNode(ob);
941 Reader.MoveToContent();
945 ReadEndElement();
947 return ob;
950 public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
952 System.Web.Services.Description.OperationBinding ob = null;
953 if (isNullable && ReadNull()) return null;
955 if (checkType)
957 System.Xml.XmlQualifiedName t = GetXsiType();
958 if (t == null)
960 else if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
961 throw CreateUnknownTypeException(t);
964 ob = (System.Web.Services.Description.OperationBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationBinding), true);
966 Reader.MoveToElement();
968 int anyAttributeIndex = 0;
969 System.Xml.XmlAttribute[] anyAttributeArray = null;
970 while (Reader.MoveToNextAttribute())
972 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
973 ob.@Name = Reader.Value;
975 else if (IsXmlnsAttribute (Reader.Name)) {
976 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
977 if (Reader.Prefix == "xmlns")
978 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
979 else
980 ob.@Namespaces.Add ("", Reader.Value);
982 else {
983 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
984 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
985 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
986 anyAttributeIndex++;
990 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
991 ob.@ExtensibleAttributes = anyAttributeArray;
993 Reader.MoveToElement ();
994 Reader.MoveToElement();
995 if (Reader.IsEmptyElement) {
996 Reader.Skip ();
997 return ob;
1000 Reader.ReadStartElement();
1001 Reader.MoveToContent();
1003 bool b47=false, b48=false, b49=false, b50=false;
1005 System.Web.Services.Description.FaultBindingCollection o52;
1006 o52 = ob.@Faults;
1007 int n51=0;
1009 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1011 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1013 if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b49) {
1014 b49 = true;
1015 ob.@Input = ReadObject_InputBinding (false, true);
1017 else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b50) {
1018 b50 = true;
1019 ob.@Output = ReadObject_OutputBinding (false, true);
1021 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
1022 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1024 else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b48) {
1025 if (((object)o52) == null)
1026 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
1027 o52.Add (ReadObject_FaultBinding (false, true));
1028 n51++;
1030 else {
1031 ServiceDescription.ReadExtension (Document, Reader, ob);
1034 else
1035 UnknownNode(ob);
1037 Reader.MoveToContent();
1041 ReadEndElement();
1043 return ob;
1046 public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
1048 System.Web.Services.Description.OperationOutput ob = null;
1049 if (isNullable && ReadNull()) return null;
1051 if (checkType)
1053 System.Xml.XmlQualifiedName t = GetXsiType();
1054 if (t == null)
1056 else if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1057 throw CreateUnknownTypeException(t);
1060 ob = (System.Web.Services.Description.OperationOutput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationOutput), true);
1062 Reader.MoveToElement();
1064 int anyAttributeIndex = 0;
1065 System.Xml.XmlAttribute[] anyAttributeArray = null;
1066 while (Reader.MoveToNextAttribute())
1068 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1069 ob.@Name = Reader.Value;
1071 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1072 ob.@Message = ToXmlQualifiedName (Reader.Value);
1074 else if (IsXmlnsAttribute (Reader.Name)) {
1075 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1076 if (Reader.Prefix == "xmlns")
1077 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1078 else
1079 ob.@Namespaces.Add ("", Reader.Value);
1081 else {
1082 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1083 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1084 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1085 anyAttributeIndex++;
1089 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1090 ob.@ExtensibleAttributes = anyAttributeArray;
1092 Reader.MoveToElement ();
1093 Reader.MoveToElement();
1094 if (Reader.IsEmptyElement) {
1095 Reader.Skip ();
1096 return ob;
1099 Reader.ReadStartElement();
1100 Reader.MoveToContent();
1102 bool b53=false;
1104 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1106 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1108 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
1109 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1111 else {
1112 ServiceDescription.ReadExtension (Document, Reader, ob);
1115 else
1116 UnknownNode(ob);
1118 Reader.MoveToContent();
1121 ReadEndElement();
1123 return ob;
1126 public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
1128 System.Web.Services.Description.OperationInput ob = null;
1129 if (isNullable && ReadNull()) return null;
1131 if (checkType)
1133 System.Xml.XmlQualifiedName t = GetXsiType();
1134 if (t == null)
1136 else if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1137 throw CreateUnknownTypeException(t);
1140 ob = (System.Web.Services.Description.OperationInput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationInput), true);
1142 Reader.MoveToElement();
1144 int anyAttributeIndex = 0;
1145 System.Xml.XmlAttribute[] anyAttributeArray = null;
1146 while (Reader.MoveToNextAttribute())
1148 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1149 ob.@Name = Reader.Value;
1151 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1152 ob.@Message = ToXmlQualifiedName (Reader.Value);
1154 else if (IsXmlnsAttribute (Reader.Name)) {
1155 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1156 if (Reader.Prefix == "xmlns")
1157 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1158 else
1159 ob.@Namespaces.Add ("", Reader.Value);
1161 else {
1162 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1163 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1164 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1165 anyAttributeIndex++;
1169 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1170 ob.@ExtensibleAttributes = anyAttributeArray;
1172 Reader.MoveToElement ();
1173 Reader.MoveToElement();
1174 if (Reader.IsEmptyElement) {
1175 Reader.Skip ();
1176 return ob;
1179 Reader.ReadStartElement();
1180 Reader.MoveToContent();
1182 bool b54=false;
1184 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1186 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1188 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
1189 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1191 else {
1192 ServiceDescription.ReadExtension (Document, Reader, ob);
1195 else
1196 UnknownNode(ob);
1198 Reader.MoveToContent();
1201 ReadEndElement();
1203 return ob;
1206 public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
1208 System.Web.Services.Description.OperationFault ob = null;
1209 if (isNullable && ReadNull()) return null;
1211 if (checkType)
1213 System.Xml.XmlQualifiedName t = GetXsiType();
1214 if (t == null)
1216 else if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1217 throw CreateUnknownTypeException(t);
1220 ob = (System.Web.Services.Description.OperationFault) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationFault), true);
1222 Reader.MoveToElement();
1224 int anyAttributeIndex = 0;
1225 System.Xml.XmlAttribute[] anyAttributeArray = null;
1226 while (Reader.MoveToNextAttribute())
1228 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1229 ob.@Name = Reader.Value;
1231 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1232 ob.@Message = ToXmlQualifiedName (Reader.Value);
1234 else if (IsXmlnsAttribute (Reader.Name)) {
1235 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1236 if (Reader.Prefix == "xmlns")
1237 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1238 else
1239 ob.@Namespaces.Add ("", Reader.Value);
1241 else {
1242 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1243 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1244 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1245 anyAttributeIndex++;
1249 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1250 ob.@ExtensibleAttributes = anyAttributeArray;
1252 Reader.MoveToElement ();
1253 Reader.MoveToElement();
1254 if (Reader.IsEmptyElement) {
1255 Reader.Skip ();
1256 return ob;
1259 Reader.ReadStartElement();
1260 Reader.MoveToContent();
1262 bool b55=false;
1264 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1266 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1268 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
1269 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1271 else {
1272 ServiceDescription.ReadExtension (Document, Reader, ob);
1275 else
1276 UnknownNode(ob);
1278 Reader.MoveToContent();
1281 ReadEndElement();
1283 return ob;
1286 public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
1288 System.Web.Services.Description.InputBinding ob = null;
1289 if (isNullable && ReadNull()) return null;
1291 if (checkType)
1293 System.Xml.XmlQualifiedName t = GetXsiType();
1294 if (t == null)
1296 else if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1297 throw CreateUnknownTypeException(t);
1300 ob = (System.Web.Services.Description.InputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.InputBinding), true);
1302 Reader.MoveToElement();
1304 int anyAttributeIndex = 0;
1305 System.Xml.XmlAttribute[] anyAttributeArray = null;
1306 while (Reader.MoveToNextAttribute())
1308 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1309 ob.@Name = Reader.Value;
1311 else if (IsXmlnsAttribute (Reader.Name)) {
1312 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1313 if (Reader.Prefix == "xmlns")
1314 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1315 else
1316 ob.@Namespaces.Add ("", Reader.Value);
1318 else {
1319 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1320 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1321 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1322 anyAttributeIndex++;
1326 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1327 ob.@ExtensibleAttributes = anyAttributeArray;
1329 Reader.MoveToElement ();
1330 Reader.MoveToElement();
1331 if (Reader.IsEmptyElement) {
1332 Reader.Skip ();
1333 return ob;
1336 Reader.ReadStartElement();
1337 Reader.MoveToContent();
1339 bool b56=false;
1341 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1343 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1345 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b56) {
1346 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1348 else {
1349 ServiceDescription.ReadExtension (Document, Reader, ob);
1352 else
1353 UnknownNode(ob);
1355 Reader.MoveToContent();
1358 ReadEndElement();
1360 return ob;
1363 public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
1365 System.Web.Services.Description.OutputBinding ob = null;
1366 if (isNullable && ReadNull()) return null;
1368 if (checkType)
1370 System.Xml.XmlQualifiedName t = GetXsiType();
1371 if (t == null)
1373 else if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1374 throw CreateUnknownTypeException(t);
1377 ob = (System.Web.Services.Description.OutputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OutputBinding), true);
1379 Reader.MoveToElement();
1381 int anyAttributeIndex = 0;
1382 System.Xml.XmlAttribute[] anyAttributeArray = null;
1383 while (Reader.MoveToNextAttribute())
1385 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1386 ob.@Name = Reader.Value;
1388 else if (IsXmlnsAttribute (Reader.Name)) {
1389 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1390 if (Reader.Prefix == "xmlns")
1391 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1392 else
1393 ob.@Namespaces.Add ("", Reader.Value);
1395 else {
1396 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1397 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1398 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1399 anyAttributeIndex++;
1403 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1404 ob.@ExtensibleAttributes = anyAttributeArray;
1406 Reader.MoveToElement ();
1407 Reader.MoveToElement();
1408 if (Reader.IsEmptyElement) {
1409 Reader.Skip ();
1410 return ob;
1413 Reader.ReadStartElement();
1414 Reader.MoveToContent();
1416 bool b57=false;
1418 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1420 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1422 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
1423 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1425 else {
1426 ServiceDescription.ReadExtension (Document, Reader, ob);
1429 else
1430 UnknownNode(ob);
1432 Reader.MoveToContent();
1435 ReadEndElement();
1437 return ob;
1440 public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
1442 System.Web.Services.Description.FaultBinding ob = null;
1443 if (isNullable && ReadNull()) return null;
1445 if (checkType)
1447 System.Xml.XmlQualifiedName t = GetXsiType();
1448 if (t == null)
1450 else if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1451 throw CreateUnknownTypeException(t);
1454 ob = (System.Web.Services.Description.FaultBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.FaultBinding), true);
1456 Reader.MoveToElement();
1458 int anyAttributeIndex = 0;
1459 System.Xml.XmlAttribute[] anyAttributeArray = null;
1460 while (Reader.MoveToNextAttribute())
1462 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1463 ob.@Name = Reader.Value;
1465 else if (IsXmlnsAttribute (Reader.Name)) {
1466 if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
1467 if (Reader.Prefix == "xmlns")
1468 ob.@Namespaces.Add (Reader.LocalName, Reader.Value);
1469 else
1470 ob.@Namespaces.Add ("", Reader.Value);
1472 else {
1473 System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
1474 anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
1475 anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
1476 anyAttributeIndex++;
1480 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1481 ob.@ExtensibleAttributes = anyAttributeArray;
1483 Reader.MoveToElement ();
1484 Reader.MoveToElement();
1485 if (Reader.IsEmptyElement) {
1486 Reader.Skip ();
1487 return ob;
1490 Reader.ReadStartElement();
1491 Reader.MoveToContent();
1493 bool b58=false;
1495 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1497 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1499 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b58) {
1500 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1502 else {
1503 ServiceDescription.ReadExtension (Document, Reader, ob);
1506 else
1507 UnknownNode(ob);
1509 Reader.MoveToContent();
1512 ReadEndElement();
1514 return ob;
1517 protected override void InitCallbacks ()
1521 protected override void InitIDs ()
1527 internal class ServiceDescriptionWriterBase : XmlSerializationWriter
1529 const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
1530 static readonly System.Reflection.MethodInfo toBinHexStringMethod = typeof (XmlConvert).GetMethod ("ToBinHexString", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic, null, new Type [] {typeof (byte [])}, null);
1531 static string ToBinHexString (byte [] input)
1533 return input == null ? null : (string) toBinHexStringMethod.Invoke (null, new object [] {input});
1535 public void WriteRoot_ServiceDescription (object o)
1537 WriteStartDocument ();
1538 System.Web.Services.Description.ServiceDescription ob = (System.Web.Services.Description.ServiceDescription) o;
1539 TopLevelElement ();
1540 WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
1543 void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1545 if (((object)ob) == null)
1547 if (isNullable)
1548 WriteNullTagLiteral(element, namesp);
1549 return;
1552 System.Type type = ob.GetType ();
1553 if (type == typeof(System.Web.Services.Description.ServiceDescription))
1555 else {
1556 throw CreateUnknownTypeException (ob);
1559 if (writeWrappingElem) {
1560 WriteStartElement (element, namesp, ob);
1563 if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
1565 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1567 ICollection o59 = ob.@ExtensibleAttributes;
1568 if (o59 != null) {
1569 foreach (XmlAttribute o60 in o59)
1570 if (o60.NamespaceURI != xmlNamespace)
1571 WriteXmlAttribute (o60, ob);
1574 WriteAttribute ("name", "", ob.@Name);
1575 WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
1577 ServiceDescription.WriteExtensions (Writer, ob);
1578 if (ob.@DocumentationElement != null) {
1579 XmlNode o61 = ob.@DocumentationElement;
1580 if (o61 is XmlElement) {
1581 if ((o61.LocalName == "documentation" && o61.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1583 else o61.WriteTo (Writer);
1584 WriteElementLiteral (o61, "", "", false, true);
1586 else
1587 throw CreateUnknownAnyElementException (o61.Name, o61.NamespaceURI);
1589 if (ob.@Imports != null) {
1590 for (int n62 = 0; n62 < ob.@Imports.Count; n62++) {
1591 WriteObject_Import (ob.@Imports[n62], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1594 WriteObject_Types (ob.@Types, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1595 if (ob.@Messages != null) {
1596 for (int n63 = 0; n63 < ob.@Messages.Count; n63++) {
1597 WriteObject_Message (ob.@Messages[n63], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1600 if (ob.@PortTypes != null) {
1601 for (int n64 = 0; n64 < ob.@PortTypes.Count; n64++) {
1602 WriteObject_PortType (ob.@PortTypes[n64], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1605 if (ob.@Bindings != null) {
1606 for (int n65 = 0; n65 < ob.@Bindings.Count; n65++) {
1607 WriteObject_Binding (ob.@Bindings[n65], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1610 if (ob.@Services != null) {
1611 for (int n66 = 0; n66 < ob.@Services.Count; n66++) {
1612 WriteObject_Service (ob.@Services[n66], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1615 if (writeWrappingElem) WriteEndElement (ob);
1618 void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1620 if (((object)ob) == null)
1622 if (isNullable)
1623 WriteNullTagLiteral(element, namesp);
1624 return;
1627 System.Type type = ob.GetType ();
1628 if (type == typeof(System.Web.Services.Description.Import))
1630 else {
1631 throw CreateUnknownTypeException (ob);
1634 if (writeWrappingElem) {
1635 WriteStartElement (element, namesp, ob);
1638 if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
1640 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1642 ICollection o67 = ob.@ExtensibleAttributes;
1643 if (o67 != null) {
1644 foreach (XmlAttribute o68 in o67)
1645 if (o68.NamespaceURI != xmlNamespace)
1646 WriteXmlAttribute (o68, ob);
1649 WriteAttribute ("location", "", ob.@Location);
1650 WriteAttribute ("namespace", "", ob.@Namespace);
1652 ServiceDescription.WriteExtensions (Writer, ob);
1653 if (ob.@DocumentationElement != null) {
1654 XmlNode o69 = ob.@DocumentationElement;
1655 if (o69 is XmlElement) {
1656 if ((o69.LocalName == "documentation" && o69.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1658 else o69.WriteTo (Writer);
1659 WriteElementLiteral (o69, "", "", false, true);
1661 else
1662 throw CreateUnknownAnyElementException (o69.Name, o69.NamespaceURI);
1664 if (writeWrappingElem) WriteEndElement (ob);
1667 void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1669 if (((object)ob) == null)
1671 if (isNullable)
1672 WriteNullTagLiteral(element, namesp);
1673 return;
1676 System.Type type = ob.GetType ();
1677 if (type == typeof(System.Web.Services.Description.Types))
1679 else {
1680 throw CreateUnknownTypeException (ob);
1683 if (writeWrappingElem) {
1684 WriteStartElement (element, namesp, ob);
1687 if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
1689 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1691 ICollection o70 = ob.@ExtensibleAttributes;
1692 if (o70 != null) {
1693 foreach (XmlAttribute o71 in o70)
1694 if (o71.NamespaceURI != xmlNamespace)
1695 WriteXmlAttribute (o71, ob);
1698 ServiceDescription.WriteExtensions (Writer, ob);
1699 if (ob.@DocumentationElement != null) {
1700 XmlNode o72 = ob.@DocumentationElement;
1701 if (o72 is XmlElement) {
1702 if ((o72.LocalName == "documentation" && o72.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1704 else o72.WriteTo (Writer);
1705 WriteElementLiteral (o72, "", "", false, true);
1707 else
1708 throw CreateUnknownAnyElementException (o72.Name, o72.NamespaceURI);
1710 if (ob.@Schemas != null) {
1711 for (int n73 = 0; n73 < ob.@Schemas.Count; n73++) {
1712 WriteObject_XmlSchema (ob.@Schemas[n73], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
1715 if (writeWrappingElem) WriteEndElement (ob);
1718 void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1720 if (((object)ob) == null)
1722 if (isNullable)
1723 WriteNullTagLiteral(element, namesp);
1724 return;
1727 System.Type type = ob.GetType ();
1728 if (type == typeof(System.Web.Services.Description.Message))
1730 else {
1731 throw CreateUnknownTypeException (ob);
1734 if (writeWrappingElem) {
1735 WriteStartElement (element, namesp, ob);
1738 if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
1740 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1742 ICollection o74 = ob.@ExtensibleAttributes;
1743 if (o74 != null) {
1744 foreach (XmlAttribute o75 in o74)
1745 if (o75.NamespaceURI != xmlNamespace)
1746 WriteXmlAttribute (o75, ob);
1749 WriteAttribute ("name", "", ob.@Name);
1751 ServiceDescription.WriteExtensions (Writer, ob);
1752 if (ob.@DocumentationElement != null) {
1753 XmlNode o76 = ob.@DocumentationElement;
1754 if (o76 is XmlElement) {
1755 if ((o76.LocalName == "documentation" && o76.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1757 else o76.WriteTo (Writer);
1758 WriteElementLiteral (o76, "", "", false, true);
1760 else
1761 throw CreateUnknownAnyElementException (o76.Name, o76.NamespaceURI);
1763 if (ob.@Parts != null) {
1764 for (int n77 = 0; n77 < ob.@Parts.Count; n77++) {
1765 WriteObject_MessagePart (ob.@Parts[n77], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1768 if (writeWrappingElem) WriteEndElement (ob);
1771 void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1773 if (((object)ob) == null)
1775 if (isNullable)
1776 WriteNullTagLiteral(element, namesp);
1777 return;
1780 System.Type type = ob.GetType ();
1781 if (type == typeof(System.Web.Services.Description.PortType))
1783 else {
1784 throw CreateUnknownTypeException (ob);
1787 if (writeWrappingElem) {
1788 WriteStartElement (element, namesp, ob);
1791 if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
1793 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1795 ICollection o78 = ob.@ExtensibleAttributes;
1796 if (o78 != null) {
1797 foreach (XmlAttribute o79 in o78)
1798 if (o79.NamespaceURI != xmlNamespace)
1799 WriteXmlAttribute (o79, ob);
1802 WriteAttribute ("name", "", ob.@Name);
1804 ServiceDescription.WriteExtensions (Writer, ob);
1805 if (ob.@DocumentationElement != null) {
1806 XmlNode o80 = ob.@DocumentationElement;
1807 if (o80 is XmlElement) {
1808 if ((o80.LocalName == "documentation" && o80.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1810 else o80.WriteTo (Writer);
1811 WriteElementLiteral (o80, "", "", false, true);
1813 else
1814 throw CreateUnknownAnyElementException (o80.Name, o80.NamespaceURI);
1816 if (ob.@Operations != null) {
1817 for (int n81 = 0; n81 < ob.@Operations.Count; n81++) {
1818 WriteObject_Operation (ob.@Operations[n81], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1821 if (writeWrappingElem) WriteEndElement (ob);
1824 void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1826 if (((object)ob) == null)
1828 if (isNullable)
1829 WriteNullTagLiteral(element, namesp);
1830 return;
1833 System.Type type = ob.GetType ();
1834 if (type == typeof(System.Web.Services.Description.Binding))
1836 else {
1837 throw CreateUnknownTypeException (ob);
1840 if (writeWrappingElem) {
1841 WriteStartElement (element, namesp, ob);
1844 if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
1846 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1848 ICollection o82 = ob.@ExtensibleAttributes;
1849 if (o82 != null) {
1850 foreach (XmlAttribute o83 in o82)
1851 if (o83.NamespaceURI != xmlNamespace)
1852 WriteXmlAttribute (o83, ob);
1855 WriteAttribute ("name", "", ob.@Name);
1856 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1858 ServiceDescription.WriteExtensions (Writer, ob);
1859 if (ob.@DocumentationElement != null) {
1860 XmlNode o84 = ob.@DocumentationElement;
1861 if (o84 is XmlElement) {
1862 if ((o84.LocalName == "documentation" && o84.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1864 else o84.WriteTo (Writer);
1865 WriteElementLiteral (o84, "", "", false, true);
1867 else
1868 throw CreateUnknownAnyElementException (o84.Name, o84.NamespaceURI);
1870 if (ob.@Operations != null) {
1871 for (int n85 = 0; n85 < ob.@Operations.Count; n85++) {
1872 WriteObject_OperationBinding (ob.@Operations[n85], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1875 if (writeWrappingElem) WriteEndElement (ob);
1878 void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1880 if (((object)ob) == null)
1882 if (isNullable)
1883 WriteNullTagLiteral(element, namesp);
1884 return;
1887 System.Type type = ob.GetType ();
1888 if (type == typeof(System.Web.Services.Description.Service))
1890 else {
1891 throw CreateUnknownTypeException (ob);
1894 if (writeWrappingElem) {
1895 WriteStartElement (element, namesp, ob);
1898 if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
1900 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1902 ICollection o86 = ob.@ExtensibleAttributes;
1903 if (o86 != null) {
1904 foreach (XmlAttribute o87 in o86)
1905 if (o87.NamespaceURI != xmlNamespace)
1906 WriteXmlAttribute (o87, ob);
1909 WriteAttribute ("name", "", ob.@Name);
1911 ServiceDescription.WriteExtensions (Writer, ob);
1912 if (ob.@DocumentationElement != null) {
1913 XmlNode o88 = ob.@DocumentationElement;
1914 if (o88 is XmlElement) {
1915 if ((o88.LocalName == "documentation" && o88.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1917 else o88.WriteTo (Writer);
1918 WriteElementLiteral (o88, "", "", false, true);
1920 else
1921 throw CreateUnknownAnyElementException (o88.Name, o88.NamespaceURI);
1923 if (ob.@Ports != null) {
1924 for (int n89 = 0; n89 < ob.@Ports.Count; n89++) {
1925 WriteObject_Port (ob.@Ports[n89], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1928 if (writeWrappingElem) WriteEndElement (ob);
1931 void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1933 ob.Write (Writer);
1936 void WriteObject_MessagePart (System.Web.Services.Description.MessagePart ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1938 if (((object)ob) == null)
1940 if (isNullable)
1941 WriteNullTagLiteral(element, namesp);
1942 return;
1945 System.Type type = ob.GetType ();
1946 if (type == typeof(System.Web.Services.Description.MessagePart))
1948 else {
1949 throw CreateUnknownTypeException (ob);
1952 if (writeWrappingElem) {
1953 WriteStartElement (element, namesp, ob);
1956 if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
1958 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1960 ICollection o90 = ob.@ExtensibleAttributes;
1961 if (o90 != null) {
1962 foreach (XmlAttribute o91 in o90)
1963 if (o91.NamespaceURI != xmlNamespace)
1964 WriteXmlAttribute (o91, ob);
1967 WriteAttribute ("name", "", ob.@Name);
1968 WriteAttribute ("element", "", FromXmlQualifiedName (ob.@Element));
1969 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1971 ServiceDescription.WriteExtensions (Writer, ob);
1972 if (ob.@DocumentationElement != null) {
1973 XmlNode o92 = ob.@DocumentationElement;
1974 if (o92 is XmlElement) {
1975 if ((o92.LocalName == "documentation" && o92.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1977 else o92.WriteTo (Writer);
1978 WriteElementLiteral (o92, "", "", false, true);
1980 else
1981 throw CreateUnknownAnyElementException (o92.Name, o92.NamespaceURI);
1983 if (writeWrappingElem) WriteEndElement (ob);
1986 void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1988 if (((object)ob) == null)
1990 if (isNullable)
1991 WriteNullTagLiteral(element, namesp);
1992 return;
1995 System.Type type = ob.GetType ();
1996 if (type == typeof(System.Web.Services.Description.Operation))
1998 else {
1999 throw CreateUnknownTypeException (ob);
2002 if (writeWrappingElem) {
2003 WriteStartElement (element, namesp, ob);
2006 if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
2008 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2010 ICollection o93 = ob.@ExtensibleAttributes;
2011 if (o93 != null) {
2012 foreach (XmlAttribute o94 in o93)
2013 if (o94.NamespaceURI != xmlNamespace)
2014 WriteXmlAttribute (o94, ob);
2017 WriteAttribute ("name", "", ob.@Name);
2018 if (ob.@ParameterOrderString != "") {
2019 WriteAttribute ("parameterOrder", "", ob.@ParameterOrderString);
2022 ServiceDescription.WriteExtensions (Writer, ob);
2023 if (ob.@DocumentationElement != null) {
2024 XmlNode o95 = ob.@DocumentationElement;
2025 if (o95 is XmlElement) {
2026 if ((o95.LocalName == "documentation" && o95.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2028 else o95.WriteTo (Writer);
2029 WriteElementLiteral (o95, "", "", false, true);
2031 else
2032 throw CreateUnknownAnyElementException (o95.Name, o95.NamespaceURI);
2034 if (ob.@Faults != null) {
2035 for (int n96 = 0; n96 < ob.@Faults.Count; n96++) {
2036 WriteObject_OperationFault (ob.@Faults[n96], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2039 if (ob.@Messages != null) {
2040 for (int n97 = 0; n97 < ob.@Messages.Count; n97++) {
2041 if (((object)ob.@Messages[n97]) == null) { }
2042 else if (ob.@Messages[n97].GetType() == typeof(System.Web.Services.Description.OperationOutput)) {
2043 WriteObject_OperationOutput (((System.Web.Services.Description.OperationOutput) ob.@Messages[n97]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2045 else if (ob.@Messages[n97].GetType() == typeof(System.Web.Services.Description.OperationInput)) {
2046 WriteObject_OperationInput (((System.Web.Services.Description.OperationInput) ob.@Messages[n97]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2048 else throw CreateUnknownTypeException (ob.@Messages[n97]);
2051 if (writeWrappingElem) WriteEndElement (ob);
2054 void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2056 if (((object)ob) == null)
2058 if (isNullable)
2059 WriteNullTagLiteral(element, namesp);
2060 return;
2063 System.Type type = ob.GetType ();
2064 if (type == typeof(System.Web.Services.Description.OperationBinding))
2066 else {
2067 throw CreateUnknownTypeException (ob);
2070 if (writeWrappingElem) {
2071 WriteStartElement (element, namesp, ob);
2074 if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
2076 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2078 ICollection o98 = ob.@ExtensibleAttributes;
2079 if (o98 != null) {
2080 foreach (XmlAttribute o99 in o98)
2081 if (o99.NamespaceURI != xmlNamespace)
2082 WriteXmlAttribute (o99, ob);
2085 WriteAttribute ("name", "", ob.@Name);
2087 ServiceDescription.WriteExtensions (Writer, ob);
2088 if (ob.@DocumentationElement != null) {
2089 XmlNode o100 = ob.@DocumentationElement;
2090 if (o100 is XmlElement) {
2091 if ((o100.LocalName == "documentation" && o100.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2093 else o100.WriteTo (Writer);
2094 WriteElementLiteral (o100, "", "", false, true);
2096 else
2097 throw CreateUnknownAnyElementException (o100.Name, o100.NamespaceURI);
2099 if (ob.@Faults != null) {
2100 for (int n101 = 0; n101 < ob.@Faults.Count; n101++) {
2101 WriteObject_FaultBinding (ob.@Faults[n101], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2104 WriteObject_InputBinding (ob.@Input, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2105 WriteObject_OutputBinding (ob.@Output, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
2106 if (writeWrappingElem) WriteEndElement (ob);
2109 void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2111 if (((object)ob) == null)
2113 if (isNullable)
2114 WriteNullTagLiteral(element, namesp);
2115 return;
2118 System.Type type = ob.GetType ();
2119 if (type == typeof(System.Web.Services.Description.Port))
2121 else {
2122 throw CreateUnknownTypeException (ob);
2125 if (writeWrappingElem) {
2126 WriteStartElement (element, namesp, ob);
2129 if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
2131 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2133 ICollection o102 = ob.@ExtensibleAttributes;
2134 if (o102 != null) {
2135 foreach (XmlAttribute o103 in o102)
2136 if (o103.NamespaceURI != xmlNamespace)
2137 WriteXmlAttribute (o103, ob);
2140 WriteAttribute ("name", "", ob.@Name);
2141 WriteAttribute ("binding", "", FromXmlQualifiedName (ob.@Binding));
2143 ServiceDescription.WriteExtensions (Writer, ob);
2144 if (ob.@DocumentationElement != null) {
2145 XmlNode o104 = ob.@DocumentationElement;
2146 if (o104 is XmlElement) {
2147 if ((o104.LocalName == "documentation" && o104.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2149 else o104.WriteTo (Writer);
2150 WriteElementLiteral (o104, "", "", false, true);
2152 else
2153 throw CreateUnknownAnyElementException (o104.Name, o104.NamespaceURI);
2155 if (writeWrappingElem) WriteEndElement (ob);
2158 void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2160 if (((object)ob) == null)
2162 if (isNullable)
2163 WriteNullTagLiteral(element, namesp);
2164 return;
2167 System.Type type = ob.GetType ();
2168 if (type == typeof(System.Web.Services.Description.OperationFault))
2170 else {
2171 throw CreateUnknownTypeException (ob);
2174 if (writeWrappingElem) {
2175 WriteStartElement (element, namesp, ob);
2178 if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
2180 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2182 ICollection o105 = ob.@ExtensibleAttributes;
2183 if (o105 != null) {
2184 foreach (XmlAttribute o106 in o105)
2185 if (o106.NamespaceURI != xmlNamespace)
2186 WriteXmlAttribute (o106, ob);
2189 WriteAttribute ("name", "", ob.@Name);
2190 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
2192 ServiceDescription.WriteExtensions (Writer, ob);
2193 if (ob.@DocumentationElement != null) {
2194 XmlNode o107 = ob.@DocumentationElement;
2195 if (o107 is XmlElement) {
2196 if ((o107.LocalName == "documentation" && o107.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2198 else o107.WriteTo (Writer);
2199 WriteElementLiteral (o107, "", "", false, true);
2201 else
2202 throw CreateUnknownAnyElementException (o107.Name, o107.NamespaceURI);
2204 if (writeWrappingElem) WriteEndElement (ob);
2207 void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2209 if (((object)ob) == null)
2211 if (isNullable)
2212 WriteNullTagLiteral(element, namesp);
2213 return;
2216 System.Type type = ob.GetType ();
2217 if (type == typeof(System.Web.Services.Description.OperationOutput))
2219 else {
2220 throw CreateUnknownTypeException (ob);
2223 if (writeWrappingElem) {
2224 WriteStartElement (element, namesp, ob);
2227 if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
2229 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2231 ICollection o108 = ob.@ExtensibleAttributes;
2232 if (o108 != null) {
2233 foreach (XmlAttribute o109 in o108)
2234 if (o109.NamespaceURI != xmlNamespace)
2235 WriteXmlAttribute (o109, ob);
2238 WriteAttribute ("name", "", ob.@Name);
2239 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
2241 ServiceDescription.WriteExtensions (Writer, ob);
2242 if (ob.@DocumentationElement != null) {
2243 XmlNode o110 = ob.@DocumentationElement;
2244 if (o110 is XmlElement) {
2245 if ((o110.LocalName == "documentation" && o110.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2247 else o110.WriteTo (Writer);
2248 WriteElementLiteral (o110, "", "", false, true);
2250 else
2251 throw CreateUnknownAnyElementException (o110.Name, o110.NamespaceURI);
2253 if (writeWrappingElem) WriteEndElement (ob);
2256 void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2258 if (((object)ob) == null)
2260 if (isNullable)
2261 WriteNullTagLiteral(element, namesp);
2262 return;
2265 System.Type type = ob.GetType ();
2266 if (type == typeof(System.Web.Services.Description.OperationInput))
2268 else {
2269 throw CreateUnknownTypeException (ob);
2272 if (writeWrappingElem) {
2273 WriteStartElement (element, namesp, ob);
2276 if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
2278 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2280 ICollection o111 = ob.@ExtensibleAttributes;
2281 if (o111 != null) {
2282 foreach (XmlAttribute o112 in o111)
2283 if (o112.NamespaceURI != xmlNamespace)
2284 WriteXmlAttribute (o112, ob);
2287 WriteAttribute ("name", "", ob.@Name);
2288 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
2290 ServiceDescription.WriteExtensions (Writer, ob);
2291 if (ob.@DocumentationElement != null) {
2292 XmlNode o113 = ob.@DocumentationElement;
2293 if (o113 is XmlElement) {
2294 if ((o113.LocalName == "documentation" && o113.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2296 else o113.WriteTo (Writer);
2297 WriteElementLiteral (o113, "", "", false, true);
2299 else
2300 throw CreateUnknownAnyElementException (o113.Name, o113.NamespaceURI);
2302 if (writeWrappingElem) WriteEndElement (ob);
2305 void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2307 if (((object)ob) == null)
2309 if (isNullable)
2310 WriteNullTagLiteral(element, namesp);
2311 return;
2314 System.Type type = ob.GetType ();
2315 if (type == typeof(System.Web.Services.Description.FaultBinding))
2317 else {
2318 throw CreateUnknownTypeException (ob);
2321 if (writeWrappingElem) {
2322 WriteStartElement (element, namesp, ob);
2325 if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
2327 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2329 ICollection o114 = ob.@ExtensibleAttributes;
2330 if (o114 != null) {
2331 foreach (XmlAttribute o115 in o114)
2332 if (o115.NamespaceURI != xmlNamespace)
2333 WriteXmlAttribute (o115, ob);
2336 WriteAttribute ("name", "", ob.@Name);
2338 ServiceDescription.WriteExtensions (Writer, ob);
2339 if (ob.@DocumentationElement != null) {
2340 XmlNode o116 = ob.@DocumentationElement;
2341 if (o116 is XmlElement) {
2342 if ((o116.LocalName == "documentation" && o116.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2344 else o116.WriteTo (Writer);
2345 WriteElementLiteral (o116, "", "", false, true);
2347 else
2348 throw CreateUnknownAnyElementException (o116.Name, o116.NamespaceURI);
2350 if (writeWrappingElem) WriteEndElement (ob);
2353 void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2355 if (((object)ob) == null)
2357 if (isNullable)
2358 WriteNullTagLiteral(element, namesp);
2359 return;
2362 System.Type type = ob.GetType ();
2363 if (type == typeof(System.Web.Services.Description.InputBinding))
2365 else {
2366 throw CreateUnknownTypeException (ob);
2369 if (writeWrappingElem) {
2370 WriteStartElement (element, namesp, ob);
2373 if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
2375 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2377 ICollection o117 = ob.@ExtensibleAttributes;
2378 if (o117 != null) {
2379 foreach (XmlAttribute o118 in o117)
2380 if (o118.NamespaceURI != xmlNamespace)
2381 WriteXmlAttribute (o118, ob);
2384 WriteAttribute ("name", "", ob.@Name);
2386 ServiceDescription.WriteExtensions (Writer, ob);
2387 if (ob.@DocumentationElement != null) {
2388 XmlNode o119 = ob.@DocumentationElement;
2389 if (o119 is XmlElement) {
2390 if ((o119.LocalName == "documentation" && o119.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2392 else o119.WriteTo (Writer);
2393 WriteElementLiteral (o119, "", "", false, true);
2395 else
2396 throw CreateUnknownAnyElementException (o119.Name, o119.NamespaceURI);
2398 if (writeWrappingElem) WriteEndElement (ob);
2401 void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2403 if (((object)ob) == null)
2405 if (isNullable)
2406 WriteNullTagLiteral(element, namesp);
2407 return;
2410 System.Type type = ob.GetType ();
2411 if (type == typeof(System.Web.Services.Description.OutputBinding))
2413 else {
2414 throw CreateUnknownTypeException (ob);
2417 if (writeWrappingElem) {
2418 WriteStartElement (element, namesp, ob);
2421 if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
2423 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2425 ICollection o120 = ob.@ExtensibleAttributes;
2426 if (o120 != null) {
2427 foreach (XmlAttribute o121 in o120)
2428 if (o121.NamespaceURI != xmlNamespace)
2429 WriteXmlAttribute (o121, ob);
2432 WriteAttribute ("name", "", ob.@Name);
2434 ServiceDescription.WriteExtensions (Writer, ob);
2435 if (ob.@DocumentationElement != null) {
2436 XmlNode o122 = ob.@DocumentationElement;
2437 if (o122 is XmlElement) {
2438 if ((o122.LocalName == "documentation" && o122.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2440 else o122.WriteTo (Writer);
2441 WriteElementLiteral (o122, "", "", false, true);
2443 else
2444 throw CreateUnknownAnyElementException (o122.Name, o122.NamespaceURI);
2446 if (writeWrappingElem) WriteEndElement (ob);
2449 protected override void InitCallbacks ()
2456 internal class BaseXmlSerializer : System.Xml.Serialization.XmlSerializer
2458 protected override System.Xml.Serialization.XmlSerializationReader CreateReader () {
2459 return new ServiceDescriptionReaderBase ();
2462 protected override System.Xml.Serialization.XmlSerializationWriter CreateWriter () {
2463 return new ServiceDescriptionWriterBase ();
2466 public override bool CanDeserialize (System.Xml.XmlReader xmlReader) {
2467 return true;
2471 internal sealed class definitionsSerializer : BaseXmlSerializer
2473 protected override void Serialize (object obj, System.Xml.Serialization.XmlSerializationWriter writer) {
2474 ((ServiceDescriptionWriterBase)writer).WriteRoot_ServiceDescription(obj);
2477 protected override object Deserialize (System.Xml.Serialization.XmlSerializationReader reader) {
2478 return ((ServiceDescriptionReaderBase)reader).ReadRoot_ServiceDescription();
2482 #if !TARGET_JVM
2483 internal class XmlSerializerContract : System.Xml.Serialization.XmlSerializerImplementation
2485 System.Collections.Hashtable readMethods = null;
2486 System.Collections.Hashtable writeMethods = null;
2487 System.Collections.Hashtable typedSerializers = null;
2489 public override System.Xml.Serialization.XmlSerializationReader Reader {
2490 get {
2491 return new ServiceDescriptionReaderBase();
2495 public override System.Xml.Serialization.XmlSerializationWriter Writer {
2496 get {
2497 return new ServiceDescriptionWriterBase();
2501 public override System.Collections.Hashtable ReadMethods {
2502 get {
2503 lock (this) {
2504 if (readMethods == null) {
2505 readMethods = new System.Collections.Hashtable ();
2506 readMethods.Add (@"System.Web.Services.Description.ServiceDescription", @"ReadRoot_ServiceDescription");
2508 return readMethods;
2513 public override System.Collections.Hashtable WriteMethods {
2514 get {
2515 lock (this) {
2516 if (writeMethods == null) {
2517 writeMethods = new System.Collections.Hashtable ();
2518 writeMethods.Add (@"System.Web.Services.Description.ServiceDescription", @"WriteRoot_ServiceDescription");
2520 return writeMethods;
2525 public override System.Collections.Hashtable TypedSerializers {
2526 get {
2527 lock (this) {
2528 if (typedSerializers == null) {
2529 typedSerializers = new System.Collections.Hashtable ();
2530 typedSerializers.Add (@"System.Web.Services.Description.ServiceDescription", new definitionsSerializer());
2532 return typedSerializers;
2537 public override XmlSerializer GetSerializer (Type type)
2539 switch (type.FullName) {
2540 case "System.Web.Services.Description.ServiceDescription":
2541 return (XmlSerializer) TypedSerializers ["System.Web.Services.Description.ServiceDescription"];
2544 return base.GetSerializer (type);
2547 public override bool CanSerialize (System.Type type) {
2548 if (type == typeof(System.Web.Services.Description.ServiceDescription)) return true;
2549 return false;
2553 #endif
2556 #endif