1 // It is automatically generated
4 using System.Xml.Schema;
5 using System.Xml.Serialization;
7 using System.Collections;
8 using System.Globalization;
10 namespace System.Web.Services.Description
12 internal class ServiceDescriptionReaderBase : XmlSerializationReader
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);
15 static byte [] FromBinHexString (string input)
17 return input == null ? null : (byte []) fromBinHexStringMethod.Invoke (null, new object [] {input});
19 public object ReadRoot_ServiceDescription ()
21 Reader.MoveToContent();
22 if (Reader.LocalName != "definitions" || Reader.NamespaceURI != "http://schemas.xmlsoap.org/wsdl/")
23 throw CreateUnknownNodeException();
24 return ReadObject_ServiceDescription (true, true);
27 public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
29 System.Web.Services.Description.ServiceDescription ob = null;
30 if (isNullable && ReadNull()) return null;
34 System.Xml.XmlQualifiedName t = GetXsiType();
37 else if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
38 throw CreateUnknownTypeException(t);
41 ob = (System.Web.Services.Description.ServiceDescription) Activator.CreateInstance(typeof(System.Web.Services.Description.ServiceDescription), true);
43 Reader.MoveToElement();
45 int anyAttributeIndex = 0;
46 System.Xml.XmlAttribute[] anyAttributeArray = null;
47 while (Reader.MoveToNextAttribute())
49 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
50 ob.@Name = Reader.Value;
52 else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
53 ob.@TargetNamespace = Reader.Value;
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);
60 ob.@Namespaces.Add ("", Reader.Value);
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);
70 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
71 ob.@ExtensibleAttributes = anyAttributeArray;
73 Reader.MoveToElement ();
74 Reader.MoveToElement();
75 if (Reader.IsEmptyElement) {
80 Reader.ReadStartElement();
81 Reader.MoveToContent();
83 bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
85 System.Web.Services.Description.ImportCollection o8;
87 System.Web.Services.Description.MessageCollection o10;
89 System.Web.Services.Description.PortTypeCollection o12;
91 System.Web.Services.Description.BindingCollection o14;
93 System.Web.Services.Description.ServiceCollection o16;
95 int n7=0, n9=0, n11=0, n13=0, n15=0;
97 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
99 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
101 if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
103 ob.@Types = ReadObject_Types (false, true);
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));
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));
117 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b0) {
118 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
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));
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));
139 ServiceDescription.ReadExtension (Document, Reader, ob);
145 Reader.MoveToContent();
154 public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
156 System.Web.Services.Description.Types ob = null;
157 if (isNullable && ReadNull()) return null;
161 System.Xml.XmlQualifiedName t = GetXsiType();
164 else if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
165 throw CreateUnknownTypeException(t);
168 ob = (System.Web.Services.Description.Types) Activator.CreateInstance(typeof(System.Web.Services.Description.Types), true);
170 Reader.MoveToElement();
172 int anyAttributeIndex = 0;
173 System.Xml.XmlAttribute[] anyAttributeArray = null;
174 while (Reader.MoveToNextAttribute())
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);
181 ob.@Namespaces.Add ("", Reader.Value);
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);
191 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
192 ob.@ExtensibleAttributes = anyAttributeArray;
194 Reader.MoveToElement ();
195 Reader.MoveToElement();
196 if (Reader.IsEmptyElement) {
201 Reader.ReadStartElement();
202 Reader.MoveToContent();
204 bool b17=false, b18=false;
206 System.Xml.Serialization.XmlSchemas o20;
210 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
212 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
214 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
215 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
224 ServiceDescription.ReadExtension (Document, Reader, ob);
230 Reader.MoveToContent();
239 public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
241 System.Web.Services.Description.Service ob = null;
242 if (isNullable && ReadNull()) return null;
246 System.Xml.XmlQualifiedName t = GetXsiType();
249 else if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
250 throw CreateUnknownTypeException(t);
253 ob = (System.Web.Services.Description.Service) Activator.CreateInstance(typeof(System.Web.Services.Description.Service), true);
255 Reader.MoveToElement();
257 int anyAttributeIndex = 0;
258 System.Xml.XmlAttribute[] anyAttributeArray = null;
259 while (Reader.MoveToNextAttribute())
261 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
262 ob.@Name = Reader.Value;
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);
269 ob.@Namespaces.Add ("", Reader.Value);
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);
279 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
280 ob.@ExtensibleAttributes = anyAttributeArray;
282 Reader.MoveToElement ();
283 Reader.MoveToElement();
284 if (Reader.IsEmptyElement) {
289 Reader.ReadStartElement();
290 Reader.MoveToContent();
292 bool b21=false, b22=false;
294 System.Web.Services.Description.PortCollection o24;
298 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
300 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
302 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
303 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
312 ServiceDescription.ReadExtension (Document, Reader, ob);
318 Reader.MoveToContent();
327 public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
329 System.Web.Services.Description.Message ob = null;
330 if (isNullable && ReadNull()) return null;
334 System.Xml.XmlQualifiedName t = GetXsiType();
337 else if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
338 throw CreateUnknownTypeException(t);
341 ob = (System.Web.Services.Description.Message) Activator.CreateInstance(typeof(System.Web.Services.Description.Message), true);
343 Reader.MoveToElement();
345 int anyAttributeIndex = 0;
346 System.Xml.XmlAttribute[] anyAttributeArray = null;
347 while (Reader.MoveToNextAttribute())
349 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
350 ob.@Name = Reader.Value;
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);
357 ob.@Namespaces.Add ("", Reader.Value);
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);
367 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
368 ob.@ExtensibleAttributes = anyAttributeArray;
370 Reader.MoveToElement ();
371 Reader.MoveToElement();
372 if (Reader.IsEmptyElement) {
377 Reader.ReadStartElement();
378 Reader.MoveToContent();
380 bool b25=false, b26=false;
382 System.Web.Services.Description.MessagePartCollection o28;
386 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
388 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
390 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
391 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
400 ServiceDescription.ReadExtension (Document, Reader, ob);
406 Reader.MoveToContent();
415 public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
417 System.Web.Services.Description.PortType ob = null;
418 if (isNullable && ReadNull()) return null;
422 System.Xml.XmlQualifiedName t = GetXsiType();
425 else if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
426 throw CreateUnknownTypeException(t);
429 ob = (System.Web.Services.Description.PortType) Activator.CreateInstance(typeof(System.Web.Services.Description.PortType), true);
431 Reader.MoveToElement();
433 int anyAttributeIndex = 0;
434 System.Xml.XmlAttribute[] anyAttributeArray = null;
435 while (Reader.MoveToNextAttribute())
437 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
438 ob.@Name = Reader.Value;
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);
445 ob.@Namespaces.Add ("", Reader.Value);
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);
455 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
456 ob.@ExtensibleAttributes = anyAttributeArray;
458 Reader.MoveToElement ();
459 Reader.MoveToElement();
460 if (Reader.IsEmptyElement) {
465 Reader.ReadStartElement();
466 Reader.MoveToContent();
468 bool b29=false, b30=false;
470 System.Web.Services.Description.OperationCollection o32;
471 o32 = ob.@Operations;
474 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
476 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
478 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b29) {
479 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
488 ServiceDescription.ReadExtension (Document, Reader, ob);
494 Reader.MoveToContent();
503 public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
505 System.Web.Services.Description.Import ob = null;
506 if (isNullable && ReadNull()) return null;
510 System.Xml.XmlQualifiedName t = GetXsiType();
513 else if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
514 throw CreateUnknownTypeException(t);
517 ob = (System.Web.Services.Description.Import) Activator.CreateInstance(typeof(System.Web.Services.Description.Import), true);
519 Reader.MoveToElement();
521 int anyAttributeIndex = 0;
522 System.Xml.XmlAttribute[] anyAttributeArray = null;
523 while (Reader.MoveToNextAttribute())
525 if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
526 ob.@Location = Reader.Value;
528 else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
529 ob.@Namespace = Reader.Value;
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);
536 ob.@Namespaces.Add ("", Reader.Value);
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);
546 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
547 ob.@ExtensibleAttributes = anyAttributeArray;
549 Reader.MoveToElement ();
550 Reader.MoveToElement();
551 if (Reader.IsEmptyElement) {
556 Reader.ReadStartElement();
557 Reader.MoveToContent();
561 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
563 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
565 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b33) {
566 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
569 ServiceDescription.ReadExtension (Document, Reader, ob);
575 Reader.MoveToContent();
583 public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
585 System.Web.Services.Description.Binding ob = null;
586 if (isNullable && ReadNull()) return null;
590 System.Xml.XmlQualifiedName t = GetXsiType();
593 else if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
594 throw CreateUnknownTypeException(t);
597 ob = (System.Web.Services.Description.Binding) Activator.CreateInstance(typeof(System.Web.Services.Description.Binding), true);
599 Reader.MoveToElement();
601 int anyAttributeIndex = 0;
602 System.Xml.XmlAttribute[] anyAttributeArray = null;
603 while (Reader.MoveToNextAttribute())
605 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
606 ob.@Name = Reader.Value;
608 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
609 ob.@Type = ToXmlQualifiedName (Reader.Value);
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);
616 ob.@Namespaces.Add ("", Reader.Value);
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);
626 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
627 ob.@ExtensibleAttributes = anyAttributeArray;
629 Reader.MoveToElement ();
630 Reader.MoveToElement();
631 if (Reader.IsEmptyElement) {
636 Reader.ReadStartElement();
637 Reader.MoveToContent();
639 bool b34=false, b35=false;
641 System.Web.Services.Description.OperationBindingCollection o37;
642 o37 = ob.@Operations;
645 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
647 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
649 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
650 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
659 ServiceDescription.ReadExtension (Document, Reader, ob);
665 Reader.MoveToContent();
674 public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
676 System.Xml.Schema.XmlSchema ob = null;
677 ob = System.Xml.Schema.XmlSchema.Read (Reader, null); Reader.Read ();
681 public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
683 System.Web.Services.Description.Port ob = null;
684 if (isNullable && ReadNull()) return null;
688 System.Xml.XmlQualifiedName t = GetXsiType();
691 else if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
692 throw CreateUnknownTypeException(t);
695 ob = (System.Web.Services.Description.Port) Activator.CreateInstance(typeof(System.Web.Services.Description.Port), true);
697 Reader.MoveToElement();
699 int anyAttributeIndex = 0;
700 System.Xml.XmlAttribute[] anyAttributeArray = null;
701 while (Reader.MoveToNextAttribute())
703 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
704 ob.@Name = Reader.Value;
706 else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
707 ob.@Binding = ToXmlQualifiedName (Reader.Value);
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);
714 ob.@Namespaces.Add ("", Reader.Value);
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);
724 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
725 ob.@ExtensibleAttributes = anyAttributeArray;
727 Reader.MoveToElement ();
728 Reader.MoveToElement();
729 if (Reader.IsEmptyElement) {
734 Reader.ReadStartElement();
735 Reader.MoveToContent();
739 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
741 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
743 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
744 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
747 ServiceDescription.ReadExtension (Document, Reader, ob);
753 Reader.MoveToContent();
761 public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
763 System.Web.Services.Description.MessagePart ob = null;
764 if (isNullable && ReadNull()) return null;
768 System.Xml.XmlQualifiedName t = GetXsiType();
771 else if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
772 throw CreateUnknownTypeException(t);
775 ob = (System.Web.Services.Description.MessagePart) Activator.CreateInstance(typeof(System.Web.Services.Description.MessagePart), true);
777 Reader.MoveToElement();
779 int anyAttributeIndex = 0;
780 System.Xml.XmlAttribute[] anyAttributeArray = null;
781 while (Reader.MoveToNextAttribute())
783 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
784 ob.@Name = Reader.Value;
786 else if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
787 ob.@Element = ToXmlQualifiedName (Reader.Value);
789 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
790 ob.@Type = ToXmlQualifiedName (Reader.Value);
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);
797 ob.@Namespaces.Add ("", Reader.Value);
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);
807 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
808 ob.@ExtensibleAttributes = anyAttributeArray;
810 Reader.MoveToElement ();
811 Reader.MoveToElement();
812 if (Reader.IsEmptyElement) {
817 Reader.ReadStartElement();
818 Reader.MoveToContent();
822 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
824 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
826 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
827 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
830 ServiceDescription.ReadExtension (Document, Reader, ob);
836 Reader.MoveToContent();
844 public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
846 System.Web.Services.Description.Operation ob = null;
847 if (isNullable && ReadNull()) return null;
851 System.Xml.XmlQualifiedName t = GetXsiType();
854 else if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
855 throw CreateUnknownTypeException(t);
858 ob = (System.Web.Services.Description.Operation) Activator.CreateInstance(typeof(System.Web.Services.Description.Operation), true);
860 Reader.MoveToElement();
862 int anyAttributeIndex = 0;
863 System.Xml.XmlAttribute[] anyAttributeArray = null;
864 while (Reader.MoveToNextAttribute())
866 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
867 ob.@Name = Reader.Value;
869 else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
870 ob.@ParameterOrderString = Reader.Value;
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);
877 ob.@Namespaces.Add ("", Reader.Value);
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);
887 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
888 ob.@ExtensibleAttributes = anyAttributeArray;
890 Reader.MoveToElement ();
891 Reader.MoveToElement();
892 if (Reader.IsEmptyElement) {
897 Reader.ReadStartElement();
898 Reader.MoveToContent();
900 bool b40=false, b41=false, b42=false;
902 System.Web.Services.Description.OperationFaultCollection o44;
904 System.Web.Services.Description.OperationMessageCollection o46;
908 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
910 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
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));
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));
924 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
925 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
934 ServiceDescription.ReadExtension (Document, Reader, ob);
940 Reader.MoveToContent();
949 public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
951 System.Web.Services.Description.OperationBinding ob = null;
952 if (isNullable && ReadNull()) return null;
956 System.Xml.XmlQualifiedName t = GetXsiType();
959 else if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
960 throw CreateUnknownTypeException(t);
963 ob = (System.Web.Services.Description.OperationBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationBinding), true);
965 Reader.MoveToElement();
967 int anyAttributeIndex = 0;
968 System.Xml.XmlAttribute[] anyAttributeArray = null;
969 while (Reader.MoveToNextAttribute())
971 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
972 ob.@Name = Reader.Value;
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);
979 ob.@Namespaces.Add ("", Reader.Value);
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);
989 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
990 ob.@ExtensibleAttributes = anyAttributeArray;
992 Reader.MoveToElement ();
993 Reader.MoveToElement();
994 if (Reader.IsEmptyElement) {
999 Reader.ReadStartElement();
1000 Reader.MoveToContent();
1002 bool b47=false, b48=false, b49=false, b50=false;
1004 System.Web.Services.Description.FaultBindingCollection o52;
1008 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1010 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1012 if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b49) {
1014 ob.@Input = ReadObject_InputBinding (false, true);
1016 else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b50) {
1018 ob.@Output = ReadObject_OutputBinding (false, true);
1020 else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
1021 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
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));
1030 ServiceDescription.ReadExtension (Document, Reader, ob);
1036 Reader.MoveToContent();
1045 public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
1047 System.Web.Services.Description.OperationOutput ob = null;
1048 if (isNullable && ReadNull()) return null;
1052 System.Xml.XmlQualifiedName t = GetXsiType();
1055 else if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1056 throw CreateUnknownTypeException(t);
1059 ob = (System.Web.Services.Description.OperationOutput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationOutput), true);
1061 Reader.MoveToElement();
1063 int anyAttributeIndex = 0;
1064 System.Xml.XmlAttribute[] anyAttributeArray = null;
1065 while (Reader.MoveToNextAttribute())
1067 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1068 ob.@Name = Reader.Value;
1070 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1071 ob.@Message = ToXmlQualifiedName (Reader.Value);
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);
1078 ob.@Namespaces.Add ("", Reader.Value);
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++;
1088 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1089 ob.@ExtensibleAttributes = anyAttributeArray;
1091 Reader.MoveToElement ();
1092 Reader.MoveToElement();
1093 if (Reader.IsEmptyElement) {
1098 Reader.ReadStartElement();
1099 Reader.MoveToContent();
1103 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1105 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1107 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
1108 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1111 ServiceDescription.ReadExtension (Document, Reader, ob);
1117 Reader.MoveToContent();
1125 public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
1127 System.Web.Services.Description.OperationInput ob = null;
1128 if (isNullable && ReadNull()) return null;
1132 System.Xml.XmlQualifiedName t = GetXsiType();
1135 else if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1136 throw CreateUnknownTypeException(t);
1139 ob = (System.Web.Services.Description.OperationInput) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationInput), true);
1141 Reader.MoveToElement();
1143 int anyAttributeIndex = 0;
1144 System.Xml.XmlAttribute[] anyAttributeArray = null;
1145 while (Reader.MoveToNextAttribute())
1147 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1148 ob.@Name = Reader.Value;
1150 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1151 ob.@Message = ToXmlQualifiedName (Reader.Value);
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);
1158 ob.@Namespaces.Add ("", Reader.Value);
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++;
1168 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1169 ob.@ExtensibleAttributes = anyAttributeArray;
1171 Reader.MoveToElement ();
1172 Reader.MoveToElement();
1173 if (Reader.IsEmptyElement) {
1178 Reader.ReadStartElement();
1179 Reader.MoveToContent();
1183 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1185 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1187 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
1188 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1191 ServiceDescription.ReadExtension (Document, Reader, ob);
1197 Reader.MoveToContent();
1205 public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
1207 System.Web.Services.Description.OperationFault ob = null;
1208 if (isNullable && ReadNull()) return null;
1212 System.Xml.XmlQualifiedName t = GetXsiType();
1215 else if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1216 throw CreateUnknownTypeException(t);
1219 ob = (System.Web.Services.Description.OperationFault) Activator.CreateInstance(typeof(System.Web.Services.Description.OperationFault), true);
1221 Reader.MoveToElement();
1223 int anyAttributeIndex = 0;
1224 System.Xml.XmlAttribute[] anyAttributeArray = null;
1225 while (Reader.MoveToNextAttribute())
1227 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1228 ob.@Name = Reader.Value;
1230 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1231 ob.@Message = ToXmlQualifiedName (Reader.Value);
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);
1238 ob.@Namespaces.Add ("", Reader.Value);
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++;
1248 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1249 ob.@ExtensibleAttributes = anyAttributeArray;
1251 Reader.MoveToElement ();
1252 Reader.MoveToElement();
1253 if (Reader.IsEmptyElement) {
1258 Reader.ReadStartElement();
1259 Reader.MoveToContent();
1263 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1265 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1267 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
1268 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1271 ServiceDescription.ReadExtension (Document, Reader, ob);
1277 Reader.MoveToContent();
1285 public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
1287 System.Web.Services.Description.InputBinding ob = null;
1288 if (isNullable && ReadNull()) return null;
1292 System.Xml.XmlQualifiedName t = GetXsiType();
1295 else if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1296 throw CreateUnknownTypeException(t);
1299 ob = (System.Web.Services.Description.InputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.InputBinding), true);
1301 Reader.MoveToElement();
1303 int anyAttributeIndex = 0;
1304 System.Xml.XmlAttribute[] anyAttributeArray = null;
1305 while (Reader.MoveToNextAttribute())
1307 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1308 ob.@Name = Reader.Value;
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);
1315 ob.@Namespaces.Add ("", Reader.Value);
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++;
1325 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1326 ob.@ExtensibleAttributes = anyAttributeArray;
1328 Reader.MoveToElement ();
1329 Reader.MoveToElement();
1330 if (Reader.IsEmptyElement) {
1335 Reader.ReadStartElement();
1336 Reader.MoveToContent();
1340 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1342 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1344 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b56) {
1345 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1348 ServiceDescription.ReadExtension (Document, Reader, ob);
1354 Reader.MoveToContent();
1362 public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
1364 System.Web.Services.Description.OutputBinding ob = null;
1365 if (isNullable && ReadNull()) return null;
1369 System.Xml.XmlQualifiedName t = GetXsiType();
1372 else if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1373 throw CreateUnknownTypeException(t);
1376 ob = (System.Web.Services.Description.OutputBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.OutputBinding), true);
1378 Reader.MoveToElement();
1380 int anyAttributeIndex = 0;
1381 System.Xml.XmlAttribute[] anyAttributeArray = null;
1382 while (Reader.MoveToNextAttribute())
1384 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1385 ob.@Name = Reader.Value;
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);
1392 ob.@Namespaces.Add ("", Reader.Value);
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++;
1402 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1403 ob.@ExtensibleAttributes = anyAttributeArray;
1405 Reader.MoveToElement ();
1406 Reader.MoveToElement();
1407 if (Reader.IsEmptyElement) {
1412 Reader.ReadStartElement();
1413 Reader.MoveToContent();
1417 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1419 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1421 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
1422 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1425 ServiceDescription.ReadExtension (Document, Reader, ob);
1431 Reader.MoveToContent();
1439 public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
1441 System.Web.Services.Description.FaultBinding ob = null;
1442 if (isNullable && ReadNull()) return null;
1446 System.Xml.XmlQualifiedName t = GetXsiType();
1449 else if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1450 throw CreateUnknownTypeException(t);
1453 ob = (System.Web.Services.Description.FaultBinding) Activator.CreateInstance(typeof(System.Web.Services.Description.FaultBinding), true);
1455 Reader.MoveToElement();
1457 int anyAttributeIndex = 0;
1458 System.Xml.XmlAttribute[] anyAttributeArray = null;
1459 while (Reader.MoveToNextAttribute())
1461 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1462 ob.@Name = Reader.Value;
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);
1469 ob.@Namespaces.Add ("", Reader.Value);
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++;
1479 anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
1480 ob.@ExtensibleAttributes = anyAttributeArray;
1482 Reader.MoveToElement ();
1483 Reader.MoveToElement();
1484 if (Reader.IsEmptyElement) {
1489 Reader.ReadStartElement();
1490 Reader.MoveToContent();
1494 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1496 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1498 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b58) {
1499 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1502 ServiceDescription.ReadExtension (Document, Reader, ob);
1508 Reader.MoveToContent();
1516 protected override void InitCallbacks ()
1520 protected override void InitIDs ()
1526 internal class ServiceDescriptionWriterBase : XmlSerializationWriter
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);
1530 static string ToBinHexString (byte [] input)
1532 return input == null ? null : (string) toBinHexStringMethod.Invoke (null, new object [] {input});
1534 public void WriteRoot_ServiceDescription (object o)
1536 WriteStartDocument ();
1537 System.Web.Services.Description.ServiceDescription ob = (System.Web.Services.Description.ServiceDescription) o;
1539 WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
1542 void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1544 if (((object)ob) == null)
1547 WriteNullTagLiteral(element, namesp);
1551 System.Type type = ob.GetType ();
1552 if (type == typeof(System.Web.Services.Description.ServiceDescription))
1555 throw CreateUnknownTypeException (ob);
1558 if (writeWrappingElem) {
1559 WriteStartElement (element, namesp, ob);
1562 if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
1564 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1566 ICollection o59 = ob.@ExtensibleAttributes;
1568 foreach (XmlAttribute o60 in o59)
1569 if (o60.NamespaceURI != xmlNamespace)
1570 WriteXmlAttribute (o60, ob);
1573 WriteAttribute ("name", "", ob.@Name);
1574 WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
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/")) {
1582 else o61.WriteTo (Writer);
1583 WriteElementLiteral (o61, "", "", false, true);
1586 throw CreateUnknownAnyElementException (o61.Name, o61.NamespaceURI);
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);
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);
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);
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);
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);
1614 if (writeWrappingElem) WriteEndElement (ob);
1617 void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1619 if (((object)ob) == null)
1622 WriteNullTagLiteral(element, namesp);
1626 System.Type type = ob.GetType ();
1627 if (type == typeof(System.Web.Services.Description.Import))
1630 throw CreateUnknownTypeException (ob);
1633 if (writeWrappingElem) {
1634 WriteStartElement (element, namesp, ob);
1637 if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
1639 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1641 ICollection o67 = ob.@ExtensibleAttributes;
1643 foreach (XmlAttribute o68 in o67)
1644 if (o68.NamespaceURI != xmlNamespace)
1645 WriteXmlAttribute (o68, ob);
1648 WriteAttribute ("location", "", ob.@Location);
1649 WriteAttribute ("namespace", "", ob.@Namespace);
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/")) {
1657 else o69.WriteTo (Writer);
1658 WriteElementLiteral (o69, "", "", false, true);
1661 throw CreateUnknownAnyElementException (o69.Name, o69.NamespaceURI);
1663 if (writeWrappingElem) WriteEndElement (ob);
1666 void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1668 if (((object)ob) == null)
1671 WriteNullTagLiteral(element, namesp);
1675 System.Type type = ob.GetType ();
1676 if (type == typeof(System.Web.Services.Description.Types))
1679 throw CreateUnknownTypeException (ob);
1682 if (writeWrappingElem) {
1683 WriteStartElement (element, namesp, ob);
1686 if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
1688 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1690 ICollection o70 = ob.@ExtensibleAttributes;
1692 foreach (XmlAttribute o71 in o70)
1693 if (o71.NamespaceURI != xmlNamespace)
1694 WriteXmlAttribute (o71, ob);
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/")) {
1703 else o72.WriteTo (Writer);
1704 WriteElementLiteral (o72, "", "", false, true);
1707 throw CreateUnknownAnyElementException (o72.Name, o72.NamespaceURI);
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);
1714 if (writeWrappingElem) WriteEndElement (ob);
1717 void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1719 if (((object)ob) == null)
1722 WriteNullTagLiteral(element, namesp);
1726 System.Type type = ob.GetType ();
1727 if (type == typeof(System.Web.Services.Description.Message))
1730 throw CreateUnknownTypeException (ob);
1733 if (writeWrappingElem) {
1734 WriteStartElement (element, namesp, ob);
1737 if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
1739 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1741 ICollection o74 = ob.@ExtensibleAttributes;
1743 foreach (XmlAttribute o75 in o74)
1744 if (o75.NamespaceURI != xmlNamespace)
1745 WriteXmlAttribute (o75, ob);
1748 WriteAttribute ("name", "", ob.@Name);
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/")) {
1756 else o76.WriteTo (Writer);
1757 WriteElementLiteral (o76, "", "", false, true);
1760 throw CreateUnknownAnyElementException (o76.Name, o76.NamespaceURI);
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);
1767 if (writeWrappingElem) WriteEndElement (ob);
1770 void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1772 if (((object)ob) == null)
1775 WriteNullTagLiteral(element, namesp);
1779 System.Type type = ob.GetType ();
1780 if (type == typeof(System.Web.Services.Description.PortType))
1783 throw CreateUnknownTypeException (ob);
1786 if (writeWrappingElem) {
1787 WriteStartElement (element, namesp, ob);
1790 if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
1792 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1794 ICollection o78 = ob.@ExtensibleAttributes;
1796 foreach (XmlAttribute o79 in o78)
1797 if (o79.NamespaceURI != xmlNamespace)
1798 WriteXmlAttribute (o79, ob);
1801 WriteAttribute ("name", "", ob.@Name);
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/")) {
1809 else o80.WriteTo (Writer);
1810 WriteElementLiteral (o80, "", "", false, true);
1813 throw CreateUnknownAnyElementException (o80.Name, o80.NamespaceURI);
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);
1820 if (writeWrappingElem) WriteEndElement (ob);
1823 void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1825 if (((object)ob) == null)
1828 WriteNullTagLiteral(element, namesp);
1832 System.Type type = ob.GetType ();
1833 if (type == typeof(System.Web.Services.Description.Binding))
1836 throw CreateUnknownTypeException (ob);
1839 if (writeWrappingElem) {
1840 WriteStartElement (element, namesp, ob);
1843 if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
1845 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1847 ICollection o82 = ob.@ExtensibleAttributes;
1849 foreach (XmlAttribute o83 in o82)
1850 if (o83.NamespaceURI != xmlNamespace)
1851 WriteXmlAttribute (o83, ob);
1854 WriteAttribute ("name", "", ob.@Name);
1855 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
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/")) {
1863 else o84.WriteTo (Writer);
1864 WriteElementLiteral (o84, "", "", false, true);
1867 throw CreateUnknownAnyElementException (o84.Name, o84.NamespaceURI);
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);
1874 if (writeWrappingElem) WriteEndElement (ob);
1877 void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1879 if (((object)ob) == null)
1882 WriteNullTagLiteral(element, namesp);
1886 System.Type type = ob.GetType ();
1887 if (type == typeof(System.Web.Services.Description.Service))
1890 throw CreateUnknownTypeException (ob);
1893 if (writeWrappingElem) {
1894 WriteStartElement (element, namesp, ob);
1897 if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
1899 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1901 ICollection o86 = ob.@ExtensibleAttributes;
1903 foreach (XmlAttribute o87 in o86)
1904 if (o87.NamespaceURI != xmlNamespace)
1905 WriteXmlAttribute (o87, ob);
1908 WriteAttribute ("name", "", ob.@Name);
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/")) {
1916 else o88.WriteTo (Writer);
1917 WriteElementLiteral (o88, "", "", false, true);
1920 throw CreateUnknownAnyElementException (o88.Name, o88.NamespaceURI);
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);
1927 if (writeWrappingElem) WriteEndElement (ob);
1930 void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema 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)
1937 if (((object)ob) == null)
1940 WriteNullTagLiteral(element, namesp);
1944 System.Type type = ob.GetType ();
1945 if (type == typeof(System.Web.Services.Description.MessagePart))
1948 throw CreateUnknownTypeException (ob);
1951 if (writeWrappingElem) {
1952 WriteStartElement (element, namesp, ob);
1955 if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
1957 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
1959 ICollection o90 = ob.@ExtensibleAttributes;
1961 foreach (XmlAttribute o91 in o90)
1962 if (o91.NamespaceURI != xmlNamespace)
1963 WriteXmlAttribute (o91, ob);
1966 WriteAttribute ("name", "", ob.@Name);
1967 WriteAttribute ("element", "", FromXmlQualifiedName (ob.@Element));
1968 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
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/")) {
1976 else o92.WriteTo (Writer);
1977 WriteElementLiteral (o92, "", "", false, true);
1980 throw CreateUnknownAnyElementException (o92.Name, o92.NamespaceURI);
1982 if (writeWrappingElem) WriteEndElement (ob);
1985 void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1987 if (((object)ob) == null)
1990 WriteNullTagLiteral(element, namesp);
1994 System.Type type = ob.GetType ();
1995 if (type == typeof(System.Web.Services.Description.Operation))
1998 throw CreateUnknownTypeException (ob);
2001 if (writeWrappingElem) {
2002 WriteStartElement (element, namesp, ob);
2005 if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
2007 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2009 ICollection o93 = ob.@ExtensibleAttributes;
2011 foreach (XmlAttribute o94 in o93)
2012 if (o94.NamespaceURI != xmlNamespace)
2013 WriteXmlAttribute (o94, ob);
2016 WriteAttribute ("name", "", ob.@Name);
2017 if (ob.@ParameterOrderString != "") {
2018 WriteAttribute ("parameterOrder", "", ob.@ParameterOrderString);
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/")) {
2027 else o95.WriteTo (Writer);
2028 WriteElementLiteral (o95, "", "", false, true);
2031 throw CreateUnknownAnyElementException (o95.Name, o95.NamespaceURI);
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);
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);
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);
2047 else throw CreateUnknownTypeException (ob.@Messages[n97]);
2050 if (writeWrappingElem) WriteEndElement (ob);
2053 void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2055 if (((object)ob) == null)
2058 WriteNullTagLiteral(element, namesp);
2062 System.Type type = ob.GetType ();
2063 if (type == typeof(System.Web.Services.Description.OperationBinding))
2066 throw CreateUnknownTypeException (ob);
2069 if (writeWrappingElem) {
2070 WriteStartElement (element, namesp, ob);
2073 if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
2075 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2077 ICollection o98 = ob.@ExtensibleAttributes;
2079 foreach (XmlAttribute o99 in o98)
2080 if (o99.NamespaceURI != xmlNamespace)
2081 WriteXmlAttribute (o99, ob);
2084 WriteAttribute ("name", "", ob.@Name);
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/")) {
2092 else o100.WriteTo (Writer);
2093 WriteElementLiteral (o100, "", "", false, true);
2096 throw CreateUnknownAnyElementException (o100.Name, o100.NamespaceURI);
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);
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);
2108 void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2110 if (((object)ob) == null)
2113 WriteNullTagLiteral(element, namesp);
2117 System.Type type = ob.GetType ();
2118 if (type == typeof(System.Web.Services.Description.Port))
2121 throw CreateUnknownTypeException (ob);
2124 if (writeWrappingElem) {
2125 WriteStartElement (element, namesp, ob);
2128 if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
2130 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2132 ICollection o102 = ob.@ExtensibleAttributes;
2134 foreach (XmlAttribute o103 in o102)
2135 if (o103.NamespaceURI != xmlNamespace)
2136 WriteXmlAttribute (o103, ob);
2139 WriteAttribute ("name", "", ob.@Name);
2140 WriteAttribute ("binding", "", FromXmlQualifiedName (ob.@Binding));
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/")) {
2148 else o104.WriteTo (Writer);
2149 WriteElementLiteral (o104, "", "", false, true);
2152 throw CreateUnknownAnyElementException (o104.Name, o104.NamespaceURI);
2154 if (writeWrappingElem) WriteEndElement (ob);
2157 void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2159 if (((object)ob) == null)
2162 WriteNullTagLiteral(element, namesp);
2166 System.Type type = ob.GetType ();
2167 if (type == typeof(System.Web.Services.Description.OperationFault))
2170 throw CreateUnknownTypeException (ob);
2173 if (writeWrappingElem) {
2174 WriteStartElement (element, namesp, ob);
2177 if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
2179 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2181 ICollection o105 = ob.@ExtensibleAttributes;
2183 foreach (XmlAttribute o106 in o105)
2184 if (o106.NamespaceURI != xmlNamespace)
2185 WriteXmlAttribute (o106, ob);
2188 WriteAttribute ("name", "", ob.@Name);
2189 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
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/")) {
2197 else o107.WriteTo (Writer);
2198 WriteElementLiteral (o107, "", "", false, true);
2201 throw CreateUnknownAnyElementException (o107.Name, o107.NamespaceURI);
2203 if (writeWrappingElem) WriteEndElement (ob);
2206 void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2208 if (((object)ob) == null)
2211 WriteNullTagLiteral(element, namesp);
2215 System.Type type = ob.GetType ();
2216 if (type == typeof(System.Web.Services.Description.OperationOutput))
2219 throw CreateUnknownTypeException (ob);
2222 if (writeWrappingElem) {
2223 WriteStartElement (element, namesp, ob);
2226 if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
2228 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2230 ICollection o108 = ob.@ExtensibleAttributes;
2232 foreach (XmlAttribute o109 in o108)
2233 if (o109.NamespaceURI != xmlNamespace)
2234 WriteXmlAttribute (o109, ob);
2237 WriteAttribute ("name", "", ob.@Name);
2238 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
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/")) {
2246 else o110.WriteTo (Writer);
2247 WriteElementLiteral (o110, "", "", false, true);
2250 throw CreateUnknownAnyElementException (o110.Name, o110.NamespaceURI);
2252 if (writeWrappingElem) WriteEndElement (ob);
2255 void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2257 if (((object)ob) == null)
2260 WriteNullTagLiteral(element, namesp);
2264 System.Type type = ob.GetType ();
2265 if (type == typeof(System.Web.Services.Description.OperationInput))
2268 throw CreateUnknownTypeException (ob);
2271 if (writeWrappingElem) {
2272 WriteStartElement (element, namesp, ob);
2275 if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
2277 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2279 ICollection o111 = ob.@ExtensibleAttributes;
2281 foreach (XmlAttribute o112 in o111)
2282 if (o112.NamespaceURI != xmlNamespace)
2283 WriteXmlAttribute (o112, ob);
2286 WriteAttribute ("name", "", ob.@Name);
2287 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
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/")) {
2295 else o113.WriteTo (Writer);
2296 WriteElementLiteral (o113, "", "", false, true);
2299 throw CreateUnknownAnyElementException (o113.Name, o113.NamespaceURI);
2301 if (writeWrappingElem) WriteEndElement (ob);
2304 void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2306 if (((object)ob) == null)
2309 WriteNullTagLiteral(element, namesp);
2313 System.Type type = ob.GetType ();
2314 if (type == typeof(System.Web.Services.Description.FaultBinding))
2317 throw CreateUnknownTypeException (ob);
2320 if (writeWrappingElem) {
2321 WriteStartElement (element, namesp, ob);
2324 if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
2326 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2328 ICollection o114 = ob.@ExtensibleAttributes;
2330 foreach (XmlAttribute o115 in o114)
2331 if (o115.NamespaceURI != xmlNamespace)
2332 WriteXmlAttribute (o115, ob);
2335 WriteAttribute ("name", "", ob.@Name);
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/")) {
2343 else o116.WriteTo (Writer);
2344 WriteElementLiteral (o116, "", "", false, true);
2347 throw CreateUnknownAnyElementException (o116.Name, o116.NamespaceURI);
2349 if (writeWrappingElem) WriteEndElement (ob);
2352 void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2354 if (((object)ob) == null)
2357 WriteNullTagLiteral(element, namesp);
2361 System.Type type = ob.GetType ();
2362 if (type == typeof(System.Web.Services.Description.InputBinding))
2365 throw CreateUnknownTypeException (ob);
2368 if (writeWrappingElem) {
2369 WriteStartElement (element, namesp, ob);
2372 if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
2374 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2376 ICollection o117 = ob.@ExtensibleAttributes;
2378 foreach (XmlAttribute o118 in o117)
2379 if (o118.NamespaceURI != xmlNamespace)
2380 WriteXmlAttribute (o118, ob);
2383 WriteAttribute ("name", "", ob.@Name);
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/")) {
2391 else o119.WriteTo (Writer);
2392 WriteElementLiteral (o119, "", "", false, true);
2395 throw CreateUnknownAnyElementException (o119.Name, o119.NamespaceURI);
2397 if (writeWrappingElem) WriteEndElement (ob);
2400 void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2402 if (((object)ob) == null)
2405 WriteNullTagLiteral(element, namesp);
2409 System.Type type = ob.GetType ();
2410 if (type == typeof(System.Web.Services.Description.OutputBinding))
2413 throw CreateUnknownTypeException (ob);
2416 if (writeWrappingElem) {
2417 WriteStartElement (element, namesp, ob);
2420 if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
2422 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
2424 ICollection o120 = ob.@ExtensibleAttributes;
2426 foreach (XmlAttribute o121 in o120)
2427 if (o121.NamespaceURI != xmlNamespace)
2428 WriteXmlAttribute (o121, ob);
2431 WriteAttribute ("name", "", ob.@Name);
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/")) {
2439 else o122.WriteTo (Writer);
2440 WriteElementLiteral (o122, "", "", false, true);
2443 throw CreateUnknownAnyElementException (o122.Name, o122.NamespaceURI);
2445 if (writeWrappingElem) WriteEndElement (ob);
2448 protected override void InitCallbacks ()
2455 internal class BaseXmlSerializer : System.Xml.Serialization.XmlSerializer
2457 protected override System.Xml.Serialization.XmlSerializationReader CreateReader () {
2458 return new ServiceDescriptionReaderBase ();
2461 protected override System.Xml.Serialization.XmlSerializationWriter CreateWriter () {
2462 return new ServiceDescriptionWriterBase ();
2465 public override bool CanDeserialize (System.Xml.XmlReader xmlReader) {
2470 internal sealed class definitionsSerializer : BaseXmlSerializer
2472 protected override void Serialize (object obj, System.Xml.Serialization.XmlSerializationWriter writer) {
2473 ((ServiceDescriptionWriterBase)writer).WriteRoot_ServiceDescription(obj);
2476 protected override object Deserialize (System.Xml.Serialization.XmlSerializationReader reader) {
2477 return ((ServiceDescriptionReaderBase)reader).ReadRoot_ServiceDescription();
2481 internal class XmlSerializerContract : System.Xml.Serialization.XmlSerializerImplementation
2483 System.Collections.Hashtable readMethods = null;
2484 System.Collections.Hashtable writeMethods = null;
2485 System.Collections.Hashtable typedSerializers = null;
2487 public override System.Xml.Serialization.XmlSerializationReader Reader {
2489 return new ServiceDescriptionReaderBase();
2493 public override System.Xml.Serialization.XmlSerializationWriter Writer {
2495 return new ServiceDescriptionWriterBase();
2499 public override System.Collections.Hashtable ReadMethods {
2502 if (readMethods == null) {
2503 readMethods = new System.Collections.Hashtable ();
2504 readMethods.Add (@"System.Web.Services.Description.ServiceDescription", @"ReadRoot_ServiceDescription");
2511 public override System.Collections.Hashtable WriteMethods {
2514 if (writeMethods == null) {
2515 writeMethods = new System.Collections.Hashtable ();
2516 writeMethods.Add (@"System.Web.Services.Description.ServiceDescription", @"WriteRoot_ServiceDescription");
2518 return writeMethods;
2523 public override System.Collections.Hashtable TypedSerializers {
2526 if (typedSerializers == null) {
2527 typedSerializers = new System.Collections.Hashtable ();
2528 typedSerializers.Add (@"System.Web.Services.Description.ServiceDescription", new definitionsSerializer());
2530 return typedSerializers;
2535 public override XmlSerializer GetSerializer (Type type)
2537 switch (type.FullName) {
2538 case "System.Web.Services.Description.ServiceDescription":
2539 return (XmlSerializer) TypedSerializers ["System.Web.Services.Description.ServiceDescription"];
2542 return base.GetSerializer (type);
2545 public override bool CanSerialize (System.Type type) {
2546 if (type == typeof(System.Web.Services.Description.ServiceDescription)) return true;