2 // It is automatically generated
5 using System
.Xml
.Schema
;
6 using System
.Xml
.Serialization
;
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;
35 System
.Xml
.XmlQualifiedName t
= GetXsiType();
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 while (Reader
.MoveToNextAttribute())
48 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
49 ob
.@Name
= Reader
.Value
;
51 else if (Reader
.LocalName
== "targetNamespace" && Reader
.NamespaceURI
== "") {
52 ob
.@TargetNamespace
= Reader
.Value
;
54 else if (IsXmlnsAttribute (Reader
.Name
)) {
61 Reader
.MoveToElement ();
62 Reader
.MoveToElement();
63 if (Reader
.IsEmptyElement
) {
68 Reader
.ReadStartElement();
69 Reader
.MoveToContent();
71 bool b0
=false, b1
=false, b2
=false, b3
=false, b4
=false, b5
=false, b6
=false;
73 System
.Web
.Services
.Description
.ImportCollection o8
;
75 System
.Web
.Services
.Description
.MessageCollection o10
;
77 System
.Web
.Services
.Description
.PortTypeCollection o12
;
79 System
.Web
.Services
.Description
.BindingCollection o14
;
81 System
.Web
.Services
.Description
.ServiceCollection o16
;
83 int n7
=0, n9
=0, n11
=0, n13
=0, n15
=0;
85 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
87 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
89 if (Reader
.LocalName
== "types" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b2
) {
91 ob
.@Types
= ReadObject_Types (false, true);
93 else if (Reader
.LocalName
== "service" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b6
) {
94 if (((object)o16
) == null)
95 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
96 o16
.Add (ReadObject_Service (false, true));
99 else if (Reader
.LocalName
== "message" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b3
) {
100 if (((object)o10
) == null)
101 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
102 o10
.Add (ReadObject_Message (false, true));
105 else if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b0
) {
106 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
108 else if (Reader
.LocalName
== "portType" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b4
) {
109 if (((object)o12
) == null)
110 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortTypeCollection");
111 o12
.Add (ReadObject_PortType (false, true));
114 else if (Reader
.LocalName
== "import" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b1
) {
115 if (((object)o8
) == null)
116 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ImportCollection");
117 o8
.Add (ReadObject_Import (false, true));
120 else if (Reader
.LocalName
== "binding" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b5
) {
121 if (((object)o14
) == null)
122 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.BindingCollection");
123 o14
.Add (ReadObject_Binding (false, true));
127 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
133 Reader
.MoveToContent();
142 public System
.Web
.Services
.Description
.Types
ReadObject_Types (bool isNullable
, bool checkType
)
144 System
.Web
.Services
.Description
.Types ob
= null;
145 if (isNullable
&& ReadNull()) return null;
149 System
.Xml
.XmlQualifiedName t
= GetXsiType();
152 else if (t
.Name
!= "Types" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
153 throw CreateUnknownTypeException(t
);
156 ob
= (System
.Web
.Services
.Description
.Types
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Types
), true);
158 Reader
.MoveToElement();
160 while (Reader
.MoveToNextAttribute())
162 if (IsXmlnsAttribute (Reader
.Name
)) {
169 Reader
.MoveToElement ();
170 Reader
.MoveToElement();
171 if (Reader
.IsEmptyElement
) {
176 Reader
.ReadStartElement();
177 Reader
.MoveToContent();
179 bool b17
=false, b18
=false;
181 System
.Xml
.Serialization
.XmlSchemas o20
;
185 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
187 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
189 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b17
) {
190 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
192 else if (Reader
.LocalName
== "schema" && Reader
.NamespaceURI
== "http://www.w3.org/2001/XMLSchema" && !b18
) {
193 if (((object)o20
) == null)
194 throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
195 o20
.Add (ReadObject_XmlSchema (false, true));
199 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
205 Reader
.MoveToContent();
214 public System
.Web
.Services
.Description
.Service
ReadObject_Service (bool isNullable
, bool checkType
)
216 System
.Web
.Services
.Description
.Service ob
= null;
217 if (isNullable
&& ReadNull()) return null;
221 System
.Xml
.XmlQualifiedName t
= GetXsiType();
224 else if (t
.Name
!= "Service" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
225 throw CreateUnknownTypeException(t
);
228 ob
= (System
.Web
.Services
.Description
.Service
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Service
), true);
230 Reader
.MoveToElement();
232 while (Reader
.MoveToNextAttribute())
234 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
235 ob
.@Name
= Reader
.Value
;
237 else if (IsXmlnsAttribute (Reader
.Name
)) {
244 Reader
.MoveToElement ();
245 Reader
.MoveToElement();
246 if (Reader
.IsEmptyElement
) {
251 Reader
.ReadStartElement();
252 Reader
.MoveToContent();
254 bool b21
=false, b22
=false;
256 System
.Web
.Services
.Description
.PortCollection o24
;
260 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
262 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
264 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b21
) {
265 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
267 else if (Reader
.LocalName
== "port" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b22
) {
268 if (((object)o24
) == null)
269 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
270 o24
.Add (ReadObject_Port (false, true));
274 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
280 Reader
.MoveToContent();
289 public System
.Web
.Services
.Description
.Message
ReadObject_Message (bool isNullable
, bool checkType
)
291 System
.Web
.Services
.Description
.Message ob
= null;
292 if (isNullable
&& ReadNull()) return null;
296 System
.Xml
.XmlQualifiedName t
= GetXsiType();
299 else if (t
.Name
!= "Message" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
300 throw CreateUnknownTypeException(t
);
303 ob
= (System
.Web
.Services
.Description
.Message
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Message
), true);
305 Reader
.MoveToElement();
307 while (Reader
.MoveToNextAttribute())
309 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
310 ob
.@Name
= Reader
.Value
;
312 else if (IsXmlnsAttribute (Reader
.Name
)) {
319 Reader
.MoveToElement ();
320 Reader
.MoveToElement();
321 if (Reader
.IsEmptyElement
) {
326 Reader
.ReadStartElement();
327 Reader
.MoveToContent();
329 bool b25
=false, b26
=false;
331 System
.Web
.Services
.Description
.MessagePartCollection o28
;
335 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
337 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
339 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b25
) {
340 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
342 else if (Reader
.LocalName
== "part" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b26
) {
343 if (((object)o28
) == null)
344 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
345 o28
.Add (ReadObject_MessagePart (false, true));
349 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
355 Reader
.MoveToContent();
364 public System
.Web
.Services
.Description
.PortType
ReadObject_PortType (bool isNullable
, bool checkType
)
366 System
.Web
.Services
.Description
.PortType ob
= null;
367 if (isNullable
&& ReadNull()) return null;
371 System
.Xml
.XmlQualifiedName t
= GetXsiType();
374 else if (t
.Name
!= "PortType" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
375 throw CreateUnknownTypeException(t
);
378 ob
= (System
.Web
.Services
.Description
.PortType
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.PortType
), true);
380 Reader
.MoveToElement();
382 while (Reader
.MoveToNextAttribute())
384 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
385 ob
.@Name
= Reader
.Value
;
387 else if (IsXmlnsAttribute (Reader
.Name
)) {
394 Reader
.MoveToElement ();
395 Reader
.MoveToElement();
396 if (Reader
.IsEmptyElement
) {
401 Reader
.ReadStartElement();
402 Reader
.MoveToContent();
404 bool b29
=false, b30
=false;
406 System
.Web
.Services
.Description
.OperationCollection o32
;
407 o32
= ob
.@Operations
;
410 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
412 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
414 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b29
) {
415 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
417 else if (Reader
.LocalName
== "operation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b30
) {
418 if (((object)o32
) == null)
419 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
420 o32
.Add (ReadObject_Operation (false, true));
424 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
430 Reader
.MoveToContent();
439 public System
.Web
.Services
.Description
.Import
ReadObject_Import (bool isNullable
, bool checkType
)
441 System
.Web
.Services
.Description
.Import ob
= null;
442 if (isNullable
&& ReadNull()) return null;
446 System
.Xml
.XmlQualifiedName t
= GetXsiType();
449 else if (t
.Name
!= "Import" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
450 throw CreateUnknownTypeException(t
);
453 ob
= (System
.Web
.Services
.Description
.Import
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Import
), true);
455 Reader
.MoveToElement();
457 while (Reader
.MoveToNextAttribute())
459 if (Reader
.LocalName
== "location" && Reader
.NamespaceURI
== "") {
460 ob
.@Location
= Reader
.Value
;
462 else if (Reader
.LocalName
== "namespace" && Reader
.NamespaceURI
== "") {
463 ob
.@Namespace
= Reader
.Value
;
465 else if (IsXmlnsAttribute (Reader
.Name
)) {
472 Reader
.MoveToElement ();
473 Reader
.MoveToElement();
474 if (Reader
.IsEmptyElement
) {
479 Reader
.ReadStartElement();
480 Reader
.MoveToContent();
484 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
486 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
488 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b33
) {
489 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
492 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
498 Reader
.MoveToContent();
506 public System
.Web
.Services
.Description
.Binding
ReadObject_Binding (bool isNullable
, bool checkType
)
508 System
.Web
.Services
.Description
.Binding ob
= null;
509 if (isNullable
&& ReadNull()) return null;
513 System
.Xml
.XmlQualifiedName t
= GetXsiType();
516 else if (t
.Name
!= "Binding" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
517 throw CreateUnknownTypeException(t
);
520 ob
= (System
.Web
.Services
.Description
.Binding
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Binding
), true);
522 Reader
.MoveToElement();
524 while (Reader
.MoveToNextAttribute())
526 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
527 ob
.@Name
= Reader
.Value
;
529 else if (Reader
.LocalName
== "type" && Reader
.NamespaceURI
== "") {
530 ob
.@Type
= ToXmlQualifiedName (Reader
.Value
);
532 else if (IsXmlnsAttribute (Reader
.Name
)) {
539 Reader
.MoveToElement ();
540 Reader
.MoveToElement();
541 if (Reader
.IsEmptyElement
) {
546 Reader
.ReadStartElement();
547 Reader
.MoveToContent();
549 bool b34
=false, b35
=false;
551 System
.Web
.Services
.Description
.OperationBindingCollection o37
;
552 o37
= ob
.@Operations
;
555 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
557 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
559 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b34
) {
560 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
562 else if (Reader
.LocalName
== "operation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b35
) {
563 if (((object)o37
) == null)
564 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
565 o37
.Add (ReadObject_OperationBinding (false, true));
569 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
575 Reader
.MoveToContent();
584 public System
.Xml
.Schema
.XmlSchema
ReadObject_XmlSchema (bool isNullable
, bool checkType
)
586 System
.Xml
.Schema
.XmlSchema ob
= null;
587 ob
= System
.Xml
.Schema
.XmlSchema
.Read (Reader
, null); Reader
.Read ();
591 public System
.Web
.Services
.Description
.Port
ReadObject_Port (bool isNullable
, bool checkType
)
593 System
.Web
.Services
.Description
.Port ob
= null;
594 if (isNullable
&& ReadNull()) return null;
598 System
.Xml
.XmlQualifiedName t
= GetXsiType();
601 else if (t
.Name
!= "Port" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
602 throw CreateUnknownTypeException(t
);
605 ob
= (System
.Web
.Services
.Description
.Port
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Port
), true);
607 Reader
.MoveToElement();
609 while (Reader
.MoveToNextAttribute())
611 if (Reader
.LocalName
== "binding" && Reader
.NamespaceURI
== "") {
612 ob
.@Binding
= ToXmlQualifiedName (Reader
.Value
);
614 else if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
615 ob
.@Name
= Reader
.Value
;
617 else if (IsXmlnsAttribute (Reader
.Name
)) {
624 Reader
.MoveToElement ();
625 Reader
.MoveToElement();
626 if (Reader
.IsEmptyElement
) {
631 Reader
.ReadStartElement();
632 Reader
.MoveToContent();
636 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
638 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
640 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b38
) {
641 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
644 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
650 Reader
.MoveToContent();
658 public System
.Web
.Services
.Description
.MessagePart
ReadObject_MessagePart (bool isNullable
, bool checkType
)
660 System
.Web
.Services
.Description
.MessagePart ob
= null;
661 if (isNullable
&& ReadNull()) return null;
665 System
.Xml
.XmlQualifiedName t
= GetXsiType();
668 else if (t
.Name
!= "MessagePart" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
669 throw CreateUnknownTypeException(t
);
672 ob
= (System
.Web
.Services
.Description
.MessagePart
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.MessagePart
), true);
674 Reader
.MoveToElement();
676 while (Reader
.MoveToNextAttribute())
678 if (Reader
.LocalName
== "element" && Reader
.NamespaceURI
== "") {
679 ob
.@Element
= ToXmlQualifiedName (Reader
.Value
);
681 else if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
682 ob
.@Name
= Reader
.Value
;
684 else if (Reader
.LocalName
== "type" && Reader
.NamespaceURI
== "") {
685 ob
.@Type
= ToXmlQualifiedName (Reader
.Value
);
687 else if (IsXmlnsAttribute (Reader
.Name
)) {
694 Reader
.MoveToElement ();
695 Reader
.MoveToElement();
696 if (Reader
.IsEmptyElement
) {
701 Reader
.ReadStartElement();
702 Reader
.MoveToContent();
706 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
708 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
710 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b39
) {
711 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
714 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
720 Reader
.MoveToContent();
728 public System
.Web
.Services
.Description
.Operation
ReadObject_Operation (bool isNullable
, bool checkType
)
730 System
.Web
.Services
.Description
.Operation ob
= null;
731 if (isNullable
&& ReadNull()) return null;
735 System
.Xml
.XmlQualifiedName t
= GetXsiType();
738 else if (t
.Name
!= "Operation" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
739 throw CreateUnknownTypeException(t
);
742 ob
= (System
.Web
.Services
.Description
.Operation
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.Operation
), true);
744 Reader
.MoveToElement();
746 while (Reader
.MoveToNextAttribute())
748 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
749 ob
.@Name
= Reader
.Value
;
751 else if (Reader
.LocalName
== "parameterOrder" && Reader
.NamespaceURI
== "") {
752 ob
.@ParameterOrderString
= Reader
.Value
;
754 else if (IsXmlnsAttribute (Reader
.Name
)) {
761 Reader
.MoveToElement ();
762 Reader
.MoveToElement();
763 if (Reader
.IsEmptyElement
) {
768 Reader
.ReadStartElement();
769 Reader
.MoveToContent();
771 bool b40
=false, b41
=false, b42
=false;
773 System
.Web
.Services
.Description
.OperationFaultCollection o44
;
775 System
.Web
.Services
.Description
.OperationMessageCollection o46
;
779 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
781 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
783 if (Reader
.LocalName
== "output" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b42
) {
784 if (((object)o46
) == null)
785 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
786 o46
.Add (ReadObject_OperationOutput (false, true));
789 else if (Reader
.LocalName
== "input" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b42
) {
790 if (((object)o46
) == null)
791 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
792 o46
.Add (ReadObject_OperationInput (false, true));
795 else if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b40
) {
796 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
798 else if (Reader
.LocalName
== "fault" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b41
) {
799 if (((object)o44
) == null)
800 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
801 o44
.Add (ReadObject_OperationFault (false, true));
805 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
811 Reader
.MoveToContent();
820 public System
.Web
.Services
.Description
.OperationBinding
ReadObject_OperationBinding (bool isNullable
, bool checkType
)
822 System
.Web
.Services
.Description
.OperationBinding ob
= null;
823 if (isNullable
&& ReadNull()) return null;
827 System
.Xml
.XmlQualifiedName t
= GetXsiType();
830 else if (t
.Name
!= "OperationBinding" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
831 throw CreateUnknownTypeException(t
);
834 ob
= (System
.Web
.Services
.Description
.OperationBinding
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.OperationBinding
), true);
836 Reader
.MoveToElement();
838 while (Reader
.MoveToNextAttribute())
840 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
841 ob
.@Name
= Reader
.Value
;
843 else if (IsXmlnsAttribute (Reader
.Name
)) {
850 Reader
.MoveToElement ();
851 Reader
.MoveToElement();
852 if (Reader
.IsEmptyElement
) {
857 Reader
.ReadStartElement();
858 Reader
.MoveToContent();
860 bool b47
=false, b48
=false, b49
=false, b50
=false;
862 System
.Web
.Services
.Description
.FaultBindingCollection o52
;
866 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
868 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
870 if (Reader
.LocalName
== "input" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b49
) {
872 ob
.@Input
= ReadObject_InputBinding (false, true);
874 else if (Reader
.LocalName
== "output" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b50
) {
876 ob
.@Output
= ReadObject_OutputBinding (false, true);
878 else if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b47
) {
879 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
881 else if (Reader
.LocalName
== "fault" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b48
) {
882 if (((object)o52
) == null)
883 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
884 o52
.Add (ReadObject_FaultBinding (false, true));
888 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
894 Reader
.MoveToContent();
903 public System
.Web
.Services
.Description
.OperationOutput
ReadObject_OperationOutput (bool isNullable
, bool checkType
)
905 System
.Web
.Services
.Description
.OperationOutput ob
= null;
906 if (isNullable
&& ReadNull()) return null;
910 System
.Xml
.XmlQualifiedName t
= GetXsiType();
913 else if (t
.Name
!= "OperationOutput" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
914 throw CreateUnknownTypeException(t
);
917 ob
= (System
.Web
.Services
.Description
.OperationOutput
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.OperationOutput
), true);
919 Reader
.MoveToElement();
921 while (Reader
.MoveToNextAttribute())
923 if (Reader
.LocalName
== "message" && Reader
.NamespaceURI
== "") {
924 ob
.@Message
= ToXmlQualifiedName (Reader
.Value
);
926 else if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
927 ob
.@Name
= Reader
.Value
;
929 else if (IsXmlnsAttribute (Reader
.Name
)) {
936 Reader
.MoveToElement ();
937 Reader
.MoveToElement();
938 if (Reader
.IsEmptyElement
) {
943 Reader
.ReadStartElement();
944 Reader
.MoveToContent();
948 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
950 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
952 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b53
) {
953 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
956 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
962 Reader
.MoveToContent();
970 public System
.Web
.Services
.Description
.OperationInput
ReadObject_OperationInput (bool isNullable
, bool checkType
)
972 System
.Web
.Services
.Description
.OperationInput ob
= null;
973 if (isNullable
&& ReadNull()) return null;
977 System
.Xml
.XmlQualifiedName t
= GetXsiType();
980 else if (t
.Name
!= "OperationInput" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
981 throw CreateUnknownTypeException(t
);
984 ob
= (System
.Web
.Services
.Description
.OperationInput
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.OperationInput
), true);
986 Reader
.MoveToElement();
988 while (Reader
.MoveToNextAttribute())
990 if (Reader
.LocalName
== "message" && Reader
.NamespaceURI
== "") {
991 ob
.@Message
= ToXmlQualifiedName (Reader
.Value
);
993 else if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
994 ob
.@Name
= Reader
.Value
;
996 else if (IsXmlnsAttribute (Reader
.Name
)) {
1003 Reader
.MoveToElement ();
1004 Reader
.MoveToElement();
1005 if (Reader
.IsEmptyElement
) {
1010 Reader
.ReadStartElement();
1011 Reader
.MoveToContent();
1015 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
1017 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
1019 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b54
) {
1020 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
1023 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
1029 Reader
.MoveToContent();
1037 public System
.Web
.Services
.Description
.OperationFault
ReadObject_OperationFault (bool isNullable
, bool checkType
)
1039 System
.Web
.Services
.Description
.OperationFault ob
= null;
1040 if (isNullable
&& ReadNull()) return null;
1044 System
.Xml
.XmlQualifiedName t
= GetXsiType();
1047 else if (t
.Name
!= "OperationFault" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
1048 throw CreateUnknownTypeException(t
);
1051 ob
= (System
.Web
.Services
.Description
.OperationFault
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.OperationFault
), true);
1053 Reader
.MoveToElement();
1055 while (Reader
.MoveToNextAttribute())
1057 if (Reader
.LocalName
== "message" && Reader
.NamespaceURI
== "") {
1058 ob
.@Message
= ToXmlQualifiedName (Reader
.Value
);
1060 else if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
1061 ob
.@Name
= Reader
.Value
;
1063 else if (IsXmlnsAttribute (Reader
.Name
)) {
1070 Reader
.MoveToElement ();
1071 Reader
.MoveToElement();
1072 if (Reader
.IsEmptyElement
) {
1077 Reader
.ReadStartElement();
1078 Reader
.MoveToContent();
1082 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
1084 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
1086 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b55
) {
1087 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
1090 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
1096 Reader
.MoveToContent();
1104 public System
.Web
.Services
.Description
.InputBinding
ReadObject_InputBinding (bool isNullable
, bool checkType
)
1106 System
.Web
.Services
.Description
.InputBinding ob
= null;
1107 if (isNullable
&& ReadNull()) return null;
1111 System
.Xml
.XmlQualifiedName t
= GetXsiType();
1114 else if (t
.Name
!= "InputBinding" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
1115 throw CreateUnknownTypeException(t
);
1118 ob
= (System
.Web
.Services
.Description
.InputBinding
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.InputBinding
), true);
1120 Reader
.MoveToElement();
1122 while (Reader
.MoveToNextAttribute())
1124 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
1125 ob
.@Name
= Reader
.Value
;
1127 else if (IsXmlnsAttribute (Reader
.Name
)) {
1134 Reader
.MoveToElement ();
1135 Reader
.MoveToElement();
1136 if (Reader
.IsEmptyElement
) {
1141 Reader
.ReadStartElement();
1142 Reader
.MoveToContent();
1146 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
1148 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
1150 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b56
) {
1151 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
1154 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
1160 Reader
.MoveToContent();
1168 public System
.Web
.Services
.Description
.OutputBinding
ReadObject_OutputBinding (bool isNullable
, bool checkType
)
1170 System
.Web
.Services
.Description
.OutputBinding ob
= null;
1171 if (isNullable
&& ReadNull()) return null;
1175 System
.Xml
.XmlQualifiedName t
= GetXsiType();
1178 else if (t
.Name
!= "OutputBinding" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
1179 throw CreateUnknownTypeException(t
);
1182 ob
= (System
.Web
.Services
.Description
.OutputBinding
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.OutputBinding
), true);
1184 Reader
.MoveToElement();
1186 while (Reader
.MoveToNextAttribute())
1188 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
1189 ob
.@Name
= Reader
.Value
;
1191 else if (IsXmlnsAttribute (Reader
.Name
)) {
1198 Reader
.MoveToElement ();
1199 Reader
.MoveToElement();
1200 if (Reader
.IsEmptyElement
) {
1205 Reader
.ReadStartElement();
1206 Reader
.MoveToContent();
1210 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
1212 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
1214 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b57
) {
1215 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
1218 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
1224 Reader
.MoveToContent();
1232 public System
.Web
.Services
.Description
.FaultBinding
ReadObject_FaultBinding (bool isNullable
, bool checkType
)
1234 System
.Web
.Services
.Description
.FaultBinding ob
= null;
1235 if (isNullable
&& ReadNull()) return null;
1239 System
.Xml
.XmlQualifiedName t
= GetXsiType();
1242 else if (t
.Name
!= "FaultBinding" || t
.Namespace
!= "http://schemas.xmlsoap.org/wsdl/")
1243 throw CreateUnknownTypeException(t
);
1246 ob
= (System
.Web
.Services
.Description
.FaultBinding
) Activator
.CreateInstance(typeof(System
.Web
.Services
.Description
.FaultBinding
), true);
1248 Reader
.MoveToElement();
1250 while (Reader
.MoveToNextAttribute())
1252 if (Reader
.LocalName
== "name" && Reader
.NamespaceURI
== "") {
1253 ob
.@Name
= Reader
.Value
;
1255 else if (IsXmlnsAttribute (Reader
.Name
)) {
1262 Reader
.MoveToElement ();
1263 Reader
.MoveToElement();
1264 if (Reader
.IsEmptyElement
) {
1269 Reader
.ReadStartElement();
1270 Reader
.MoveToContent();
1274 while (Reader
.NodeType
!= System
.Xml
.XmlNodeType
.EndElement
)
1276 if (Reader
.NodeType
== System
.Xml
.XmlNodeType
.Element
)
1278 if (Reader
.LocalName
== "documentation" && Reader
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/" && !b58
) {
1279 ob
.@DocumentationElement
= ((System
.Xml
.XmlElement
) ReadXmlNode (false));
1282 ServiceDescription
.ReadExtension (Document
, Reader
, ob
);
1288 Reader
.MoveToContent();
1296 protected override void InitCallbacks ()
1300 protected override void InitIDs ()
1306 internal class ServiceDescriptionWriterBase
: XmlSerializationWriter
1308 const string xmlNamespace
= "http://www.w3.org/2000/xmlns/";
1309 static readonly System
.Reflection
.MethodInfo toBinHexStringMethod
= typeof (XmlConvert
).GetMethod ("ToBinHexString", System
.Reflection
.BindingFlags
.Static
| System
.Reflection
.BindingFlags
.NonPublic
, null, new Type
[] {typeof (byte [])}
, null);
1310 static string ToBinHexString (byte [] input
)
1312 return input
== null ? null : (string) toBinHexStringMethod
.Invoke (null, new object [] {input}
);
1314 public void WriteRoot_ServiceDescription (object o
)
1316 WriteStartDocument ();
1317 System
.Web
.Services
.Description
.ServiceDescription ob
= (System
.Web
.Services
.Description
.ServiceDescription
) o
;
1319 WriteObject_ServiceDescription (ob
, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
1322 void WriteObject_ServiceDescription (System
.Web
.Services
.Description
.ServiceDescription ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1324 if (((object)ob
) == null)
1327 WriteNullTagLiteral(element
, namesp
);
1331 System
.Type type
= ob
.GetType ();
1332 if (type
== typeof(System
.Web
.Services
.Description
.ServiceDescription
))
1335 throw CreateUnknownTypeException (ob
);
1338 if (writeWrappingElem
) {
1339 WriteStartElement (element
, namesp
, ob
);
1342 if (needType
) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
1344 WriteAttribute ("name", "", ob
.@Name
);
1345 WriteAttribute ("targetNamespace", "", ob
.@TargetNamespace
);
1347 ServiceDescription
.WriteExtensions (Writer
, ob
);
1348 if (ob
.@DocumentationElement
!= null) {
1349 XmlNode o59
= ob
.@DocumentationElement
;
1350 if (o59
is XmlElement
) {
1351 if ((o59
.LocalName
== "documentation" && o59
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1353 else o59
.WriteTo (Writer
);
1354 WriteElementLiteral (o59
, "", "", false, true);
1357 throw CreateUnknownAnyElementException (o59
.Name
, o59
.NamespaceURI
);
1359 if (ob
.@Imports
!= null) {
1360 for (int n60
= 0; n60
< ob
.@Imports
.Count
; n60
++) {
1361 WriteObject_Import (ob
.@Imports
[n60
], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1364 WriteObject_Types (ob
.@Types
, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1365 if (ob
.@Messages
!= null) {
1366 for (int n61
= 0; n61
< ob
.@Messages
.Count
; n61
++) {
1367 WriteObject_Message (ob
.@Messages
[n61
], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1370 if (ob
.@PortTypes
!= null) {
1371 for (int n62
= 0; n62
< ob
.@PortTypes
.Count
; n62
++) {
1372 WriteObject_PortType (ob
.@PortTypes
[n62
], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1375 if (ob
.@Bindings
!= null) {
1376 for (int n63
= 0; n63
< ob
.@Bindings
.Count
; n63
++) {
1377 WriteObject_Binding (ob
.@Bindings
[n63
], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1380 if (ob
.@Services
!= null) {
1381 for (int n64
= 0; n64
< ob
.@Services
.Count
; n64
++) {
1382 WriteObject_Service (ob
.@Services
[n64
], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1385 if (writeWrappingElem
) WriteEndElement (ob
);
1388 void WriteObject_Import (System
.Web
.Services
.Description
.Import ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1390 if (((object)ob
) == null)
1393 WriteNullTagLiteral(element
, namesp
);
1397 System
.Type type
= ob
.GetType ();
1398 if (type
== typeof(System
.Web
.Services
.Description
.Import
))
1401 throw CreateUnknownTypeException (ob
);
1404 if (writeWrappingElem
) {
1405 WriteStartElement (element
, namesp
, ob
);
1408 if (needType
) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
1410 WriteAttribute ("location", "", ob
.@Location
);
1411 WriteAttribute ("namespace", "", ob
.@Namespace
);
1413 if (ob
.@DocumentationElement
!= null) {
1414 XmlNode o65
= ob
.@DocumentationElement
;
1415 if (o65
is XmlElement
) {
1416 if ((o65
.LocalName
== "documentation" && o65
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1418 else o65
.WriteTo (Writer
);
1419 WriteElementLiteral (o65
, "", "", false, true);
1422 throw CreateUnknownAnyElementException (o65
.Name
, o65
.NamespaceURI
);
1424 if (writeWrappingElem
) WriteEndElement (ob
);
1427 void WriteObject_Types (System
.Web
.Services
.Description
.Types ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1429 if (((object)ob
) == null)
1432 WriteNullTagLiteral(element
, namesp
);
1436 System
.Type type
= ob
.GetType ();
1437 if (type
== typeof(System
.Web
.Services
.Description
.Types
))
1440 throw CreateUnknownTypeException (ob
);
1443 if (writeWrappingElem
) {
1444 WriteStartElement (element
, namesp
, ob
);
1447 if (needType
) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
1449 ServiceDescription
.WriteExtensions (Writer
, ob
);
1450 if (ob
.@DocumentationElement
!= null) {
1451 XmlNode o66
= ob
.@DocumentationElement
;
1452 if (o66
is XmlElement
) {
1453 if ((o66
.LocalName
== "documentation" && o66
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1455 else o66
.WriteTo (Writer
);
1456 WriteElementLiteral (o66
, "", "", false, true);
1459 throw CreateUnknownAnyElementException (o66
.Name
, o66
.NamespaceURI
);
1461 if (ob
.@Schemas
!= null) {
1462 for (int n67
= 0; n67
< ob
.@Schemas
.Count
; n67
++) {
1463 WriteObject_XmlSchema (ob
.@Schemas
[n67
], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
1466 if (writeWrappingElem
) WriteEndElement (ob
);
1469 void WriteObject_Message (System
.Web
.Services
.Description
.Message ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1471 if (((object)ob
) == null)
1474 WriteNullTagLiteral(element
, namesp
);
1478 System
.Type type
= ob
.GetType ();
1479 if (type
== typeof(System
.Web
.Services
.Description
.Message
))
1482 throw CreateUnknownTypeException (ob
);
1485 if (writeWrappingElem
) {
1486 WriteStartElement (element
, namesp
, ob
);
1489 if (needType
) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
1491 WriteAttribute ("name", "", ob
.@Name
);
1493 if (ob
.@DocumentationElement
!= null) {
1494 XmlNode o68
= ob
.@DocumentationElement
;
1495 if (o68
is XmlElement
) {
1496 if ((o68
.LocalName
== "documentation" && o68
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1498 else o68
.WriteTo (Writer
);
1499 WriteElementLiteral (o68
, "", "", false, true);
1502 throw CreateUnknownAnyElementException (o68
.Name
, o68
.NamespaceURI
);
1504 if (ob
.@Parts
!= null) {
1505 for (int n69
= 0; n69
< ob
.@Parts
.Count
; n69
++) {
1506 WriteObject_MessagePart (ob
.@Parts
[n69
], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1509 if (writeWrappingElem
) WriteEndElement (ob
);
1512 void WriteObject_PortType (System
.Web
.Services
.Description
.PortType ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1514 if (((object)ob
) == null)
1517 WriteNullTagLiteral(element
, namesp
);
1521 System
.Type type
= ob
.GetType ();
1522 if (type
== typeof(System
.Web
.Services
.Description
.PortType
))
1525 throw CreateUnknownTypeException (ob
);
1528 if (writeWrappingElem
) {
1529 WriteStartElement (element
, namesp
, ob
);
1532 if (needType
) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
1534 WriteAttribute ("name", "", ob
.@Name
);
1536 if (ob
.@DocumentationElement
!= null) {
1537 XmlNode o70
= ob
.@DocumentationElement
;
1538 if (o70
is XmlElement
) {
1539 if ((o70
.LocalName
== "documentation" && o70
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1541 else o70
.WriteTo (Writer
);
1542 WriteElementLiteral (o70
, "", "", false, true);
1545 throw CreateUnknownAnyElementException (o70
.Name
, o70
.NamespaceURI
);
1547 if (ob
.@Operations
!= null) {
1548 for (int n71
= 0; n71
< ob
.@Operations
.Count
; n71
++) {
1549 WriteObject_Operation (ob
.@Operations
[n71
], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1552 if (writeWrappingElem
) WriteEndElement (ob
);
1555 void WriteObject_Binding (System
.Web
.Services
.Description
.Binding ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1557 if (((object)ob
) == null)
1560 WriteNullTagLiteral(element
, namesp
);
1564 System
.Type type
= ob
.GetType ();
1565 if (type
== typeof(System
.Web
.Services
.Description
.Binding
))
1568 throw CreateUnknownTypeException (ob
);
1571 if (writeWrappingElem
) {
1572 WriteStartElement (element
, namesp
, ob
);
1575 if (needType
) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
1577 WriteAttribute ("name", "", ob
.@Name
);
1578 WriteAttribute ("type", "", FromXmlQualifiedName (ob
.@Type
));
1580 ServiceDescription
.WriteExtensions (Writer
, ob
);
1581 if (ob
.@DocumentationElement
!= null) {
1582 XmlNode o72
= ob
.@DocumentationElement
;
1583 if (o72
is XmlElement
) {
1584 if ((o72
.LocalName
== "documentation" && o72
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1586 else o72
.WriteTo (Writer
);
1587 WriteElementLiteral (o72
, "", "", false, true);
1590 throw CreateUnknownAnyElementException (o72
.Name
, o72
.NamespaceURI
);
1592 if (ob
.@Operations
!= null) {
1593 for (int n73
= 0; n73
< ob
.@Operations
.Count
; n73
++) {
1594 WriteObject_OperationBinding (ob
.@Operations
[n73
], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1597 if (writeWrappingElem
) WriteEndElement (ob
);
1600 void WriteObject_Service (System
.Web
.Services
.Description
.Service ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1602 if (((object)ob
) == null)
1605 WriteNullTagLiteral(element
, namesp
);
1609 System
.Type type
= ob
.GetType ();
1610 if (type
== typeof(System
.Web
.Services
.Description
.Service
))
1613 throw CreateUnknownTypeException (ob
);
1616 if (writeWrappingElem
) {
1617 WriteStartElement (element
, namesp
, ob
);
1620 if (needType
) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
1622 WriteAttribute ("name", "", ob
.@Name
);
1624 if (ob
.@DocumentationElement
!= null) {
1625 XmlNode o74
= ob
.@DocumentationElement
;
1626 if (o74
is XmlElement
) {
1627 if ((o74
.LocalName
== "documentation" && o74
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1629 else o74
.WriteTo (Writer
);
1630 WriteElementLiteral (o74
, "", "", false, true);
1633 throw CreateUnknownAnyElementException (o74
.Name
, o74
.NamespaceURI
);
1635 if (ob
.@Ports
!= null) {
1636 for (int n75
= 0; n75
< ob
.@Ports
.Count
; n75
++) {
1637 WriteObject_Port (ob
.@Ports
[n75
], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1640 if (writeWrappingElem
) WriteEndElement (ob
);
1643 void WriteObject_XmlSchema (System
.Xml
.Schema
.XmlSchema ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1648 void WriteObject_MessagePart (System
.Web
.Services
.Description
.MessagePart ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1650 if (((object)ob
) == null)
1653 WriteNullTagLiteral(element
, namesp
);
1657 System
.Type type
= ob
.GetType ();
1658 if (type
== typeof(System
.Web
.Services
.Description
.MessagePart
))
1661 throw CreateUnknownTypeException (ob
);
1664 if (writeWrappingElem
) {
1665 WriteStartElement (element
, namesp
, ob
);
1668 if (needType
) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
1670 WriteAttribute ("element", "", FromXmlQualifiedName (ob
.@Element
));
1671 WriteAttribute ("name", "", ob
.@Name
);
1672 WriteAttribute ("type", "", FromXmlQualifiedName (ob
.@Type
));
1674 if (ob
.@DocumentationElement
!= null) {
1675 XmlNode o76
= ob
.@DocumentationElement
;
1676 if (o76
is XmlElement
) {
1677 if ((o76
.LocalName
== "documentation" && o76
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1679 else o76
.WriteTo (Writer
);
1680 WriteElementLiteral (o76
, "", "", false, true);
1683 throw CreateUnknownAnyElementException (o76
.Name
, o76
.NamespaceURI
);
1685 if (writeWrappingElem
) WriteEndElement (ob
);
1688 void WriteObject_Operation (System
.Web
.Services
.Description
.Operation ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1690 if (((object)ob
) == null)
1693 WriteNullTagLiteral(element
, namesp
);
1697 System
.Type type
= ob
.GetType ();
1698 if (type
== typeof(System
.Web
.Services
.Description
.Operation
))
1701 throw CreateUnknownTypeException (ob
);
1704 if (writeWrappingElem
) {
1705 WriteStartElement (element
, namesp
, ob
);
1708 if (needType
) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
1710 WriteAttribute ("name", "", ob
.@Name
);
1711 if (ob
.@ParameterOrderString
!= "") {
1712 WriteAttribute ("parameterOrder", "", ob
.@ParameterOrderString
);
1715 if (ob
.@DocumentationElement
!= null) {
1716 XmlNode o77
= ob
.@DocumentationElement
;
1717 if (o77
is XmlElement
) {
1718 if ((o77
.LocalName
== "documentation" && o77
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1720 else o77
.WriteTo (Writer
);
1721 WriteElementLiteral (o77
, "", "", false, true);
1724 throw CreateUnknownAnyElementException (o77
.Name
, o77
.NamespaceURI
);
1726 if (ob
.@Faults
!= null) {
1727 for (int n78
= 0; n78
< ob
.@Faults
.Count
; n78
++) {
1728 WriteObject_OperationFault (ob
.@Faults
[n78
], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1731 if (ob
.@Messages
!= null) {
1732 for (int n79
= 0; n79
< ob
.@Messages
.Count
; n79
++) {
1733 if (((object)ob
.@Messages
[n79
]) == null) { }
1734 else if (ob
.@Messages
[n79
].GetType() == typeof(System
.Web
.Services
.Description
.OperationOutput
)) {
1735 WriteObject_OperationOutput (((System
.Web
.Services
.Description
.OperationOutput
) ob
.@Messages
[n79
]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1737 else if (ob
.@Messages
[n79
].GetType() == typeof(System
.Web
.Services
.Description
.OperationInput
)) {
1738 WriteObject_OperationInput (((System
.Web
.Services
.Description
.OperationInput
) ob
.@Messages
[n79
]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1740 else throw CreateUnknownTypeException (ob
.@Messages
[n79
]);
1743 if (writeWrappingElem
) WriteEndElement (ob
);
1746 void WriteObject_OperationBinding (System
.Web
.Services
.Description
.OperationBinding ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1748 if (((object)ob
) == null)
1751 WriteNullTagLiteral(element
, namesp
);
1755 System
.Type type
= ob
.GetType ();
1756 if (type
== typeof(System
.Web
.Services
.Description
.OperationBinding
))
1759 throw CreateUnknownTypeException (ob
);
1762 if (writeWrappingElem
) {
1763 WriteStartElement (element
, namesp
, ob
);
1766 if (needType
) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
1768 WriteAttribute ("name", "", ob
.@Name
);
1770 ServiceDescription
.WriteExtensions (Writer
, ob
);
1771 if (ob
.@DocumentationElement
!= null) {
1772 XmlNode o80
= ob
.@DocumentationElement
;
1773 if (o80
is XmlElement
) {
1774 if ((o80
.LocalName
== "documentation" && o80
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1776 else o80
.WriteTo (Writer
);
1777 WriteElementLiteral (o80
, "", "", false, true);
1780 throw CreateUnknownAnyElementException (o80
.Name
, o80
.NamespaceURI
);
1782 if (ob
.@Faults
!= null) {
1783 for (int n81
= 0; n81
< ob
.@Faults
.Count
; n81
++) {
1784 WriteObject_FaultBinding (ob
.@Faults
[n81
], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1787 WriteObject_InputBinding (ob
.@Input
, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1788 WriteObject_OutputBinding (ob
.@Output
, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1789 if (writeWrappingElem
) WriteEndElement (ob
);
1792 void WriteObject_Port (System
.Web
.Services
.Description
.Port ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1794 if (((object)ob
) == null)
1797 WriteNullTagLiteral(element
, namesp
);
1801 System
.Type type
= ob
.GetType ();
1802 if (type
== typeof(System
.Web
.Services
.Description
.Port
))
1805 throw CreateUnknownTypeException (ob
);
1808 if (writeWrappingElem
) {
1809 WriteStartElement (element
, namesp
, ob
);
1812 if (needType
) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
1814 WriteAttribute ("binding", "", FromXmlQualifiedName (ob
.@Binding
));
1815 WriteAttribute ("name", "", ob
.@Name
);
1817 ServiceDescription
.WriteExtensions (Writer
, ob
);
1818 if (ob
.@DocumentationElement
!= null) {
1819 XmlNode o82
= ob
.@DocumentationElement
;
1820 if (o82
is XmlElement
) {
1821 if ((o82
.LocalName
== "documentation" && o82
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1823 else o82
.WriteTo (Writer
);
1824 WriteElementLiteral (o82
, "", "", false, true);
1827 throw CreateUnknownAnyElementException (o82
.Name
, o82
.NamespaceURI
);
1829 if (writeWrappingElem
) WriteEndElement (ob
);
1832 void WriteObject_OperationFault (System
.Web
.Services
.Description
.OperationFault ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1834 if (((object)ob
) == null)
1837 WriteNullTagLiteral(element
, namesp
);
1841 System
.Type type
= ob
.GetType ();
1842 if (type
== typeof(System
.Web
.Services
.Description
.OperationFault
))
1845 throw CreateUnknownTypeException (ob
);
1848 if (writeWrappingElem
) {
1849 WriteStartElement (element
, namesp
, ob
);
1852 if (needType
) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
1854 WriteAttribute ("message", "", FromXmlQualifiedName (ob
.@Message
));
1855 WriteAttribute ("name", "", ob
.@Name
);
1857 if (ob
.@DocumentationElement
!= null) {
1858 XmlNode o83
= ob
.@DocumentationElement
;
1859 if (o83
is XmlElement
) {
1860 if ((o83
.LocalName
== "documentation" && o83
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1862 else o83
.WriteTo (Writer
);
1863 WriteElementLiteral (o83
, "", "", false, true);
1866 throw CreateUnknownAnyElementException (o83
.Name
, o83
.NamespaceURI
);
1868 if (writeWrappingElem
) WriteEndElement (ob
);
1871 void WriteObject_OperationOutput (System
.Web
.Services
.Description
.OperationOutput ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1873 if (((object)ob
) == null)
1876 WriteNullTagLiteral(element
, namesp
);
1880 System
.Type type
= ob
.GetType ();
1881 if (type
== typeof(System
.Web
.Services
.Description
.OperationOutput
))
1884 throw CreateUnknownTypeException (ob
);
1887 if (writeWrappingElem
) {
1888 WriteStartElement (element
, namesp
, ob
);
1891 if (needType
) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
1893 WriteAttribute ("message", "", FromXmlQualifiedName (ob
.@Message
));
1894 WriteAttribute ("name", "", ob
.@Name
);
1896 if (ob
.@DocumentationElement
!= null) {
1897 XmlNode o84
= ob
.@DocumentationElement
;
1898 if (o84
is XmlElement
) {
1899 if ((o84
.LocalName
== "documentation" && o84
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1901 else o84
.WriteTo (Writer
);
1902 WriteElementLiteral (o84
, "", "", false, true);
1905 throw CreateUnknownAnyElementException (o84
.Name
, o84
.NamespaceURI
);
1907 if (writeWrappingElem
) WriteEndElement (ob
);
1910 void WriteObject_OperationInput (System
.Web
.Services
.Description
.OperationInput ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1912 if (((object)ob
) == null)
1915 WriteNullTagLiteral(element
, namesp
);
1919 System
.Type type
= ob
.GetType ();
1920 if (type
== typeof(System
.Web
.Services
.Description
.OperationInput
))
1923 throw CreateUnknownTypeException (ob
);
1926 if (writeWrappingElem
) {
1927 WriteStartElement (element
, namesp
, ob
);
1930 if (needType
) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
1932 WriteAttribute ("message", "", FromXmlQualifiedName (ob
.@Message
));
1933 WriteAttribute ("name", "", ob
.@Name
);
1935 if (ob
.@DocumentationElement
!= null) {
1936 XmlNode o85
= ob
.@DocumentationElement
;
1937 if (o85
is XmlElement
) {
1938 if ((o85
.LocalName
== "documentation" && o85
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1940 else o85
.WriteTo (Writer
);
1941 WriteElementLiteral (o85
, "", "", false, true);
1944 throw CreateUnknownAnyElementException (o85
.Name
, o85
.NamespaceURI
);
1946 if (writeWrappingElem
) WriteEndElement (ob
);
1949 void WriteObject_FaultBinding (System
.Web
.Services
.Description
.FaultBinding ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1951 if (((object)ob
) == null)
1954 WriteNullTagLiteral(element
, namesp
);
1958 System
.Type type
= ob
.GetType ();
1959 if (type
== typeof(System
.Web
.Services
.Description
.FaultBinding
))
1962 throw CreateUnknownTypeException (ob
);
1965 if (writeWrappingElem
) {
1966 WriteStartElement (element
, namesp
, ob
);
1969 if (needType
) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
1971 WriteAttribute ("name", "", ob
.@Name
);
1973 ServiceDescription
.WriteExtensions (Writer
, ob
);
1974 if (ob
.@DocumentationElement
!= null) {
1975 XmlNode o86
= ob
.@DocumentationElement
;
1976 if (o86
is XmlElement
) {
1977 if ((o86
.LocalName
== "documentation" && o86
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
1979 else o86
.WriteTo (Writer
);
1980 WriteElementLiteral (o86
, "", "", false, true);
1983 throw CreateUnknownAnyElementException (o86
.Name
, o86
.NamespaceURI
);
1985 if (writeWrappingElem
) WriteEndElement (ob
);
1988 void WriteObject_InputBinding (System
.Web
.Services
.Description
.InputBinding ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
1990 if (((object)ob
) == null)
1993 WriteNullTagLiteral(element
, namesp
);
1997 System
.Type type
= ob
.GetType ();
1998 if (type
== typeof(System
.Web
.Services
.Description
.InputBinding
))
2001 throw CreateUnknownTypeException (ob
);
2004 if (writeWrappingElem
) {
2005 WriteStartElement (element
, namesp
, ob
);
2008 if (needType
) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
2010 WriteAttribute ("name", "", ob
.@Name
);
2012 ServiceDescription
.WriteExtensions (Writer
, ob
);
2013 if (ob
.@DocumentationElement
!= null) {
2014 XmlNode o87
= ob
.@DocumentationElement
;
2015 if (o87
is XmlElement
) {
2016 if ((o87
.LocalName
== "documentation" && o87
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
2018 else o87
.WriteTo (Writer
);
2019 WriteElementLiteral (o87
, "", "", false, true);
2022 throw CreateUnknownAnyElementException (o87
.Name
, o87
.NamespaceURI
);
2024 if (writeWrappingElem
) WriteEndElement (ob
);
2027 void WriteObject_OutputBinding (System
.Web
.Services
.Description
.OutputBinding ob
, string element
, string namesp
, bool isNullable
, bool needType
, bool writeWrappingElem
)
2029 if (((object)ob
) == null)
2032 WriteNullTagLiteral(element
, namesp
);
2036 System
.Type type
= ob
.GetType ();
2037 if (type
== typeof(System
.Web
.Services
.Description
.OutputBinding
))
2040 throw CreateUnknownTypeException (ob
);
2043 if (writeWrappingElem
) {
2044 WriteStartElement (element
, namesp
, ob
);
2047 if (needType
) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
2049 WriteAttribute ("name", "", ob
.@Name
);
2051 ServiceDescription
.WriteExtensions (Writer
, ob
);
2052 if (ob
.@DocumentationElement
!= null) {
2053 XmlNode o88
= ob
.@DocumentationElement
;
2054 if (o88
is XmlElement
) {
2055 if ((o88
.LocalName
== "documentation" && o88
.NamespaceURI
== "http://schemas.xmlsoap.org/wsdl/")) {
2057 else o88
.WriteTo (Writer
);
2058 WriteElementLiteral (o88
, "", "", false, true);
2061 throw CreateUnknownAnyElementException (o88
.Name
, o88
.NamespaceURI
);
2063 if (writeWrappingElem
) WriteEndElement (ob
);
2066 protected override void InitCallbacks ()