3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 using System.Xml.Schema;
28 using System.Xml.Serialization;
30 using System.Collections;
31 using System.Globalization;
33 namespace System.Web.Services.Description
35 internal class ServiceDescriptionReaderBase : XmlSerializationReader
37 public object ReadRoot_ServiceDescription ()
39 Reader.MoveToContent();
40 if (Reader.LocalName != "definitions" || Reader.NamespaceURI != "http://schemas.xmlsoap.org/wsdl/")
41 throw CreateUnknownNodeException();
42 return ReadObject_ServiceDescription (true, true);
45 public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
47 System.Web.Services.Description.ServiceDescription ob = null;
48 if (isNullable && ReadNull()) return null;
52 System.Xml.XmlQualifiedName t = GetXsiType();
55 else if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
56 throw CreateUnknownTypeException(t);
59 ob = new System.Web.Services.Description.ServiceDescription ();
61 Reader.MoveToElement();
63 while (Reader.MoveToNextAttribute())
65 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
66 ob.@Name = Reader.Value;
68 else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
69 ob.@TargetNamespace = Reader.Value;
71 else if (IsXmlnsAttribute (Reader.Name)) {
78 Reader.MoveToElement();
79 if (Reader.IsEmptyElement) {
84 Reader.ReadStartElement();
85 Reader.MoveToContent();
87 bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
89 System.Web.Services.Description.ImportCollection o8;
91 System.Web.Services.Description.MessageCollection o10;
93 System.Web.Services.Description.PortTypeCollection o12;
95 System.Web.Services.Description.BindingCollection o14;
97 System.Web.Services.Description.ServiceCollection o16;
99 int n7=0, n9=0, n11=0, n13=0, n15=0;
101 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
103 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
105 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 == "service" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b6) {
109 if (((object)o16) == null)
110 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
111 o16.Add (ReadObject_Service (false, true));
114 else if (Reader.LocalName == "message" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b3) {
115 if (((object)o10) == null)
116 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
117 o10.Add (ReadObject_Message (false, true));
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));
138 else if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
140 ob.@Types = ReadObject_Types (false, true);
143 ServiceDescription.ReadExtension (Document, Reader, ob);
149 Reader.MoveToContent();
158 public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
160 System.Web.Services.Description.Service ob = null;
161 if (isNullable && ReadNull()) return null;
165 System.Xml.XmlQualifiedName t = GetXsiType();
168 else if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
169 throw CreateUnknownTypeException(t);
172 ob = new System.Web.Services.Description.Service ();
174 Reader.MoveToElement();
176 while (Reader.MoveToNextAttribute())
178 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
179 ob.@Name = Reader.Value;
181 else if (IsXmlnsAttribute (Reader.Name)) {
188 Reader.MoveToElement();
189 if (Reader.IsEmptyElement) {
194 Reader.ReadStartElement();
195 Reader.MoveToContent();
197 bool b17=false, b18=false;
199 System.Web.Services.Description.PortCollection o20;
203 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
205 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
207 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
208 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
210 else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b18) {
211 if (((object)o20) == null)
212 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
213 o20.Add (ReadObject_Port (false, true));
217 ServiceDescription.ReadExtension (Document, Reader, ob);
223 Reader.MoveToContent();
232 public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
234 System.Web.Services.Description.Message ob = null;
235 if (isNullable && ReadNull()) return null;
239 System.Xml.XmlQualifiedName t = GetXsiType();
242 else if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
243 throw CreateUnknownTypeException(t);
246 ob = new System.Web.Services.Description.Message ();
248 Reader.MoveToElement();
250 while (Reader.MoveToNextAttribute())
252 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
253 ob.@Name = Reader.Value;
255 else if (IsXmlnsAttribute (Reader.Name)) {
262 Reader.MoveToElement();
263 if (Reader.IsEmptyElement) {
268 Reader.ReadStartElement();
269 Reader.MoveToContent();
271 bool b21=false, b22=false;
273 System.Web.Services.Description.MessagePartCollection o24;
277 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
279 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
281 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
282 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
284 else if (Reader.LocalName == "part" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) {
285 if (((object)o24) == null)
286 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
287 o24.Add (ReadObject_MessagePart (false, true));
291 ServiceDescription.ReadExtension (Document, Reader, ob);
297 Reader.MoveToContent();
306 public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
308 System.Web.Services.Description.PortType ob = null;
309 if (isNullable && ReadNull()) return null;
313 System.Xml.XmlQualifiedName t = GetXsiType();
316 else if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
317 throw CreateUnknownTypeException(t);
320 ob = new System.Web.Services.Description.PortType ();
322 Reader.MoveToElement();
324 while (Reader.MoveToNextAttribute())
326 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
327 ob.@Name = Reader.Value;
329 else if (IsXmlnsAttribute (Reader.Name)) {
336 Reader.MoveToElement();
337 if (Reader.IsEmptyElement) {
342 Reader.ReadStartElement();
343 Reader.MoveToContent();
345 bool b25=false, b26=false;
347 System.Web.Services.Description.OperationCollection o28;
348 o28 = ob.@Operations;
351 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
353 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
355 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
356 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
358 else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b26) {
359 if (((object)o28) == null)
360 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
361 o28.Add (ReadObject_Operation (false, true));
365 ServiceDescription.ReadExtension (Document, Reader, ob);
371 Reader.MoveToContent();
380 public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
382 System.Web.Services.Description.Import ob = null;
383 if (isNullable && ReadNull()) return null;
387 System.Xml.XmlQualifiedName t = GetXsiType();
390 else if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
391 throw CreateUnknownTypeException(t);
394 ob = new System.Web.Services.Description.Import ();
396 Reader.MoveToElement();
398 while (Reader.MoveToNextAttribute())
400 if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
401 ob.@Location = Reader.Value;
403 else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
404 ob.@Namespace = Reader.Value;
406 else if (IsXmlnsAttribute (Reader.Name)) {
413 Reader.MoveToElement();
414 if (Reader.IsEmptyElement) {
419 Reader.ReadStartElement();
420 Reader.MoveToContent();
424 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
426 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
428 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b29) {
429 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
432 ServiceDescription.ReadExtension (Document, Reader, ob);
438 Reader.MoveToContent();
446 public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
448 System.Web.Services.Description.Binding ob = null;
449 if (isNullable && ReadNull()) return null;
453 System.Xml.XmlQualifiedName t = GetXsiType();
456 else if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
457 throw CreateUnknownTypeException(t);
460 ob = new System.Web.Services.Description.Binding ();
462 Reader.MoveToElement();
464 while (Reader.MoveToNextAttribute())
466 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
467 ob.@Name = Reader.Value;
469 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
470 ob.@Type = ToXmlQualifiedName (Reader.Value);
472 else if (IsXmlnsAttribute (Reader.Name)) {
479 Reader.MoveToElement();
480 if (Reader.IsEmptyElement) {
485 Reader.ReadStartElement();
486 Reader.MoveToContent();
488 bool b30=false, b31=false;
490 System.Web.Services.Description.OperationBindingCollection o33;
491 o33 = ob.@Operations;
494 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
496 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
498 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b30) {
499 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
501 else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b31) {
502 if (((object)o33) == null)
503 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
504 o33.Add (ReadObject_OperationBinding (false, true));
508 ServiceDescription.ReadExtension (Document, Reader, ob);
514 Reader.MoveToContent();
523 public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
525 System.Web.Services.Description.Types ob = null;
526 if (isNullable && ReadNull()) return null;
530 System.Xml.XmlQualifiedName t = GetXsiType();
533 else if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
534 throw CreateUnknownTypeException(t);
537 ob = new System.Web.Services.Description.Types ();
539 Reader.MoveToElement();
541 while (Reader.MoveToNextAttribute())
543 if (IsXmlnsAttribute (Reader.Name)) {
550 Reader.MoveToElement();
551 if (Reader.IsEmptyElement) {
556 Reader.ReadStartElement();
557 Reader.MoveToContent();
559 bool b34=false, b35=false;
561 System.Xml.Serialization.XmlSchemas o37;
565 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
567 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
569 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
570 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
572 else if (Reader.LocalName == "schema" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b35) {
573 if (((object)o37) == null)
574 throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
575 o37.Add (ReadObject_XmlSchema (false, true));
579 ServiceDescription.ReadExtension (Document, Reader, ob);
585 Reader.MoveToContent();
594 public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
596 System.Web.Services.Description.Port ob = null;
597 if (isNullable && ReadNull()) return null;
601 System.Xml.XmlQualifiedName t = GetXsiType();
604 else if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
605 throw CreateUnknownTypeException(t);
608 ob = new System.Web.Services.Description.Port ();
610 Reader.MoveToElement();
612 while (Reader.MoveToNextAttribute())
614 if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
615 ob.@Binding = ToXmlQualifiedName (Reader.Value);
617 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
618 ob.@Name = Reader.Value;
620 else if (IsXmlnsAttribute (Reader.Name)) {
627 Reader.MoveToElement();
628 if (Reader.IsEmptyElement) {
633 Reader.ReadStartElement();
634 Reader.MoveToContent();
638 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
640 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
642 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
643 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
646 ServiceDescription.ReadExtension (Document, Reader, ob);
652 Reader.MoveToContent();
660 public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
662 System.Web.Services.Description.MessagePart ob = null;
663 if (isNullable && ReadNull()) return null;
667 System.Xml.XmlQualifiedName t = GetXsiType();
670 else if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
671 throw CreateUnknownTypeException(t);
674 ob = new System.Web.Services.Description.MessagePart ();
676 Reader.MoveToElement();
678 while (Reader.MoveToNextAttribute())
680 if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
681 ob.@Element = ToXmlQualifiedName (Reader.Value);
683 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
684 ob.@Name = Reader.Value;
686 else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
687 ob.@Type = ToXmlQualifiedName (Reader.Value);
689 else if (IsXmlnsAttribute (Reader.Name)) {
696 Reader.MoveToElement();
697 if (Reader.IsEmptyElement) {
702 Reader.ReadStartElement();
703 Reader.MoveToContent();
707 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
709 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
711 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
712 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
715 ServiceDescription.ReadExtension (Document, Reader, ob);
721 Reader.MoveToContent();
729 public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
731 System.Web.Services.Description.Operation ob = null;
732 if (isNullable && ReadNull()) return null;
736 System.Xml.XmlQualifiedName t = GetXsiType();
739 else if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
740 throw CreateUnknownTypeException(t);
743 ob = new System.Web.Services.Description.Operation ();
745 Reader.MoveToElement();
747 ob.@ParameterOrderString = "";
748 while (Reader.MoveToNextAttribute())
750 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
751 ob.@Name = Reader.Value;
753 else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
754 ob.@ParameterOrderString = Reader.Value;
756 else if (IsXmlnsAttribute (Reader.Name)) {
763 Reader.MoveToElement();
764 if (Reader.IsEmptyElement) {
769 Reader.ReadStartElement();
770 Reader.MoveToContent();
772 bool b40=false, b41=false, b42=false;
774 System.Web.Services.Description.OperationFaultCollection o44;
776 System.Web.Services.Description.OperationMessageCollection o46;
780 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
782 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
784 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
785 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
787 else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b41) {
788 if (((object)o44) == null)
789 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
790 o44.Add (ReadObject_OperationFault (false, true));
793 else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
794 if (((object)o46) == null)
795 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
796 o46.Add (ReadObject_OperationInput (false, true));
799 else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
800 if (((object)o46) == null)
801 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
802 o46.Add (ReadObject_OperationOutput (false, true));
806 ServiceDescription.ReadExtension (Document, Reader, ob);
812 Reader.MoveToContent();
821 public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
823 System.Web.Services.Description.OperationBinding ob = null;
824 if (isNullable && ReadNull()) return null;
828 System.Xml.XmlQualifiedName t = GetXsiType();
831 else if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
832 throw CreateUnknownTypeException(t);
835 ob = new System.Web.Services.Description.OperationBinding ();
837 Reader.MoveToElement();
839 while (Reader.MoveToNextAttribute())
841 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
842 ob.@Name = Reader.Value;
844 else if (IsXmlnsAttribute (Reader.Name)) {
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 == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
871 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
873 else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b48) {
874 if (((object)o52) == null)
875 throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
876 o52.Add (ReadObject_FaultBinding (false, true));
879 else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b49) {
881 ob.@Input = ReadObject_InputBinding (false, true);
883 else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b50) {
885 ob.@Output = ReadObject_OutputBinding (false, true);
888 ServiceDescription.ReadExtension (Document, Reader, ob);
894 Reader.MoveToContent();
903 public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
905 System.Xml.Schema.XmlSchema ob = null;
906 ob = System.Xml.Schema.XmlSchema.Read (Reader, null); Reader.Read ();
910 public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
912 System.Web.Services.Description.OperationFault ob = null;
913 if (isNullable && ReadNull()) return null;
917 System.Xml.XmlQualifiedName t = GetXsiType();
920 else if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
921 throw CreateUnknownTypeException(t);
924 ob = new System.Web.Services.Description.OperationFault ();
926 Reader.MoveToElement();
928 while (Reader.MoveToNextAttribute())
930 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
931 ob.@Message = ToXmlQualifiedName (Reader.Value);
933 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
934 ob.@Name = Reader.Value;
936 else if (IsXmlnsAttribute (Reader.Name)) {
943 Reader.MoveToElement();
944 if (Reader.IsEmptyElement) {
949 Reader.ReadStartElement();
950 Reader.MoveToContent();
954 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
956 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
958 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
959 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
962 ServiceDescription.ReadExtension (Document, Reader, ob);
968 Reader.MoveToContent();
976 public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
978 System.Web.Services.Description.OperationInput ob = null;
979 if (isNullable && ReadNull()) return null;
983 System.Xml.XmlQualifiedName t = GetXsiType();
986 else if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
987 throw CreateUnknownTypeException(t);
990 ob = new System.Web.Services.Description.OperationInput ();
992 Reader.MoveToElement();
994 while (Reader.MoveToNextAttribute())
996 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
997 ob.@Message = ToXmlQualifiedName (Reader.Value);
999 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1000 ob.@Name = Reader.Value;
1002 else if (IsXmlnsAttribute (Reader.Name)) {
1009 Reader.MoveToElement();
1010 if (Reader.IsEmptyElement) {
1015 Reader.ReadStartElement();
1016 Reader.MoveToContent();
1020 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1022 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1024 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
1025 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1028 ServiceDescription.ReadExtension (Document, Reader, ob);
1034 Reader.MoveToContent();
1042 public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
1044 System.Web.Services.Description.OperationOutput ob = null;
1045 if (isNullable && ReadNull()) return null;
1049 System.Xml.XmlQualifiedName t = GetXsiType();
1052 else if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1053 throw CreateUnknownTypeException(t);
1056 ob = new System.Web.Services.Description.OperationOutput ();
1058 Reader.MoveToElement();
1060 while (Reader.MoveToNextAttribute())
1062 if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
1063 ob.@Message = ToXmlQualifiedName (Reader.Value);
1065 else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1066 ob.@Name = Reader.Value;
1068 else if (IsXmlnsAttribute (Reader.Name)) {
1075 Reader.MoveToElement();
1076 if (Reader.IsEmptyElement) {
1081 Reader.ReadStartElement();
1082 Reader.MoveToContent();
1086 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1088 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1090 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
1091 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1094 ServiceDescription.ReadExtension (Document, Reader, ob);
1100 Reader.MoveToContent();
1108 public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
1110 System.Web.Services.Description.FaultBinding ob = null;
1111 if (isNullable && ReadNull()) return null;
1115 System.Xml.XmlQualifiedName t = GetXsiType();
1118 else if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1119 throw CreateUnknownTypeException(t);
1122 ob = new System.Web.Services.Description.FaultBinding ();
1124 Reader.MoveToElement();
1126 while (Reader.MoveToNextAttribute())
1128 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1129 ob.@Name = Reader.Value;
1131 else if (IsXmlnsAttribute (Reader.Name)) {
1138 Reader.MoveToElement();
1139 if (Reader.IsEmptyElement) {
1144 Reader.ReadStartElement();
1145 Reader.MoveToContent();
1149 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1151 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1153 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b56) {
1154 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1157 ServiceDescription.ReadExtension (Document, Reader, ob);
1163 Reader.MoveToContent();
1171 public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
1173 System.Web.Services.Description.InputBinding ob = null;
1174 if (isNullable && ReadNull()) return null;
1178 System.Xml.XmlQualifiedName t = GetXsiType();
1181 else if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1182 throw CreateUnknownTypeException(t);
1185 ob = new System.Web.Services.Description.InputBinding ();
1187 Reader.MoveToElement();
1189 while (Reader.MoveToNextAttribute())
1191 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1192 ob.@Name = Reader.Value;
1194 else if (IsXmlnsAttribute (Reader.Name)) {
1201 Reader.MoveToElement();
1202 if (Reader.IsEmptyElement) {
1207 Reader.ReadStartElement();
1208 Reader.MoveToContent();
1212 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1214 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1216 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
1217 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1220 ServiceDescription.ReadExtension (Document, Reader, ob);
1226 Reader.MoveToContent();
1234 public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
1236 System.Web.Services.Description.OutputBinding ob = null;
1237 if (isNullable && ReadNull()) return null;
1241 System.Xml.XmlQualifiedName t = GetXsiType();
1244 else if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
1245 throw CreateUnknownTypeException(t);
1248 ob = new System.Web.Services.Description.OutputBinding ();
1250 Reader.MoveToElement();
1252 while (Reader.MoveToNextAttribute())
1254 if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
1255 ob.@Name = Reader.Value;
1257 else if (IsXmlnsAttribute (Reader.Name)) {
1264 Reader.MoveToElement();
1265 if (Reader.IsEmptyElement) {
1270 Reader.ReadStartElement();
1271 Reader.MoveToContent();
1275 while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
1277 if (Reader.NodeType == System.Xml.XmlNodeType.Element)
1279 if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b58) {
1280 ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
1283 ServiceDescription.ReadExtension (Document, Reader, ob);
1289 Reader.MoveToContent();
1297 protected override void InitCallbacks ()
1301 protected override void InitIDs ()
1307 internal class ServiceDescriptionWriterBase : XmlSerializationWriter
1309 const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
1310 public void WriteRoot_ServiceDescription (object o)
1312 WriteStartDocument ();
1313 System.Web.Services.Description.ServiceDescription ob = (System.Web.Services.Description.ServiceDescription) o;
1315 WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
1318 void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1320 if (((object)ob) == null)
1323 WriteNullTagLiteral(element, namesp);
1327 System.Type type = ob.GetType ();
1328 if (type == typeof(System.Web.Services.Description.ServiceDescription))
1331 throw CreateUnknownTypeException (ob);
1334 if (writeWrappingElem) {
1335 WriteStartElement (element, namesp, ob);
1338 if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
1340 WriteAttribute ("name", "", ob.@Name);
1341 WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
1343 ServiceDescription.WriteExtensions (Writer, ob);
1344 if (ob.@DocumentationElement != null) {
1345 XmlNode o59 = ob.@DocumentationElement;
1346 if (o59 is XmlElement) {
1347 if ((o59.Name == "documentation" && o59.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1349 else o59.WriteTo (Writer);
1350 WriteElementLiteral (o59, "", "", false, true);
1353 throw CreateUnknownAnyElementException (o59.Name, o59.NamespaceURI);
1355 if (ob.@Imports != null) {
1356 for (int n60 = 0; n60 < ob.@Imports.Count; n60++) {
1357 WriteObject_Import (ob.@Imports[n60], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1360 WriteObject_Types (ob.@Types, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1361 if (ob.@Messages != null) {
1362 for (int n61 = 0; n61 < ob.@Messages.Count; n61++) {
1363 WriteObject_Message (ob.@Messages[n61], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1366 if (ob.@PortTypes != null) {
1367 for (int n62 = 0; n62 < ob.@PortTypes.Count; n62++) {
1368 WriteObject_PortType (ob.@PortTypes[n62], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1371 if (ob.@Bindings != null) {
1372 for (int n63 = 0; n63 < ob.@Bindings.Count; n63++) {
1373 WriteObject_Binding (ob.@Bindings[n63], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1376 if (ob.@Services != null) {
1377 for (int n64 = 0; n64 < ob.@Services.Count; n64++) {
1378 WriteObject_Service (ob.@Services[n64], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1381 if (writeWrappingElem) WriteEndElement (ob);
1384 void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1386 if (((object)ob) == null)
1389 WriteNullTagLiteral(element, namesp);
1393 System.Type type = ob.GetType ();
1394 if (type == typeof(System.Web.Services.Description.Import))
1397 throw CreateUnknownTypeException (ob);
1400 if (writeWrappingElem) {
1401 WriteStartElement (element, namesp, ob);
1404 if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
1406 WriteAttribute ("location", "", ob.@Location);
1407 WriteAttribute ("namespace", "", ob.@Namespace);
1409 if (ob.@DocumentationElement != null) {
1410 XmlNode o65 = ob.@DocumentationElement;
1411 if (o65 is XmlElement) {
1412 if ((o65.Name == "documentation" && o65.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1414 else o65.WriteTo (Writer);
1415 WriteElementLiteral (o65, "", "", false, true);
1418 throw CreateUnknownAnyElementException (o65.Name, o65.NamespaceURI);
1420 if (writeWrappingElem) WriteEndElement (ob);
1423 void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1425 if (((object)ob) == null)
1428 WriteNullTagLiteral(element, namesp);
1432 System.Type type = ob.GetType ();
1433 if (type == typeof(System.Web.Services.Description.Types))
1436 throw CreateUnknownTypeException (ob);
1439 if (writeWrappingElem) {
1440 WriteStartElement (element, namesp, ob);
1443 if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
1445 ServiceDescription.WriteExtensions (Writer, ob);
1446 if (ob.@DocumentationElement != null) {
1447 XmlNode o66 = ob.@DocumentationElement;
1448 if (o66 is XmlElement) {
1449 if ((o66.Name == "documentation" && o66.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1451 else o66.WriteTo (Writer);
1452 WriteElementLiteral (o66, "", "", false, true);
1455 throw CreateUnknownAnyElementException (o66.Name, o66.NamespaceURI);
1457 if (ob.@Schemas != null) {
1458 for (int n67 = 0; n67 < ob.@Schemas.Count; n67++) {
1459 WriteObject_XmlSchema (ob.@Schemas[n67], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
1462 if (writeWrappingElem) WriteEndElement (ob);
1465 void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1467 if (((object)ob) == null)
1470 WriteNullTagLiteral(element, namesp);
1474 System.Type type = ob.GetType ();
1475 if (type == typeof(System.Web.Services.Description.Message))
1478 throw CreateUnknownTypeException (ob);
1481 if (writeWrappingElem) {
1482 WriteStartElement (element, namesp, ob);
1485 if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
1487 WriteAttribute ("name", "", ob.@Name);
1489 if (ob.@DocumentationElement != null) {
1490 XmlNode o68 = ob.@DocumentationElement;
1491 if (o68 is XmlElement) {
1492 if ((o68.Name == "documentation" && o68.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1494 else o68.WriteTo (Writer);
1495 WriteElementLiteral (o68, "", "", false, true);
1498 throw CreateUnknownAnyElementException (o68.Name, o68.NamespaceURI);
1500 if (ob.@Parts != null) {
1501 for (int n69 = 0; n69 < ob.@Parts.Count; n69++) {
1502 WriteObject_MessagePart (ob.@Parts[n69], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1505 if (writeWrappingElem) WriteEndElement (ob);
1508 void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1510 if (((object)ob) == null)
1513 WriteNullTagLiteral(element, namesp);
1517 System.Type type = ob.GetType ();
1518 if (type == typeof(System.Web.Services.Description.PortType))
1521 throw CreateUnknownTypeException (ob);
1524 if (writeWrappingElem) {
1525 WriteStartElement (element, namesp, ob);
1528 if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
1530 WriteAttribute ("name", "", ob.@Name);
1532 if (ob.@DocumentationElement != null) {
1533 XmlNode o70 = ob.@DocumentationElement;
1534 if (o70 is XmlElement) {
1535 if ((o70.Name == "documentation" && o70.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1537 else o70.WriteTo (Writer);
1538 WriteElementLiteral (o70, "", "", false, true);
1541 throw CreateUnknownAnyElementException (o70.Name, o70.NamespaceURI);
1543 if (ob.@Operations != null) {
1544 for (int n71 = 0; n71 < ob.@Operations.Count; n71++) {
1545 WriteObject_Operation (ob.@Operations[n71], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1548 if (writeWrappingElem) WriteEndElement (ob);
1551 void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1553 if (((object)ob) == null)
1556 WriteNullTagLiteral(element, namesp);
1560 System.Type type = ob.GetType ();
1561 if (type == typeof(System.Web.Services.Description.Binding))
1564 throw CreateUnknownTypeException (ob);
1567 if (writeWrappingElem) {
1568 WriteStartElement (element, namesp, ob);
1571 if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
1573 WriteAttribute ("name", "", ob.@Name);
1574 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1576 ServiceDescription.WriteExtensions (Writer, ob);
1577 if (ob.@DocumentationElement != null) {
1578 XmlNode o72 = ob.@DocumentationElement;
1579 if (o72 is XmlElement) {
1580 if ((o72.Name == "documentation" && o72.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1582 else o72.WriteTo (Writer);
1583 WriteElementLiteral (o72, "", "", false, true);
1586 throw CreateUnknownAnyElementException (o72.Name, o72.NamespaceURI);
1588 if (ob.@Operations != null) {
1589 for (int n73 = 0; n73 < ob.@Operations.Count; n73++) {
1590 WriteObject_OperationBinding (ob.@Operations[n73], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1593 if (writeWrappingElem) WriteEndElement (ob);
1596 void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1598 if (((object)ob) == null)
1601 WriteNullTagLiteral(element, namesp);
1605 System.Type type = ob.GetType ();
1606 if (type == typeof(System.Web.Services.Description.Service))
1609 throw CreateUnknownTypeException (ob);
1612 if (writeWrappingElem) {
1613 WriteStartElement (element, namesp, ob);
1616 if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
1618 WriteAttribute ("name", "", ob.@Name);
1620 if (ob.@DocumentationElement != null) {
1621 XmlNode o74 = ob.@DocumentationElement;
1622 if (o74 is XmlElement) {
1623 if ((o74.Name == "documentation" && o74.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1625 else o74.WriteTo (Writer);
1626 WriteElementLiteral (o74, "", "", false, true);
1629 throw CreateUnknownAnyElementException (o74.Name, o74.NamespaceURI);
1631 if (ob.@Ports != null) {
1632 for (int n75 = 0; n75 < ob.@Ports.Count; n75++) {
1633 WriteObject_Port (ob.@Ports[n75], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1636 if (writeWrappingElem) WriteEndElement (ob);
1639 void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1644 void WriteObject_MessagePart (System.Web.Services.Description.MessagePart ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1646 if (((object)ob) == null)
1649 WriteNullTagLiteral(element, namesp);
1653 System.Type type = ob.GetType ();
1654 if (type == typeof(System.Web.Services.Description.MessagePart))
1657 throw CreateUnknownTypeException (ob);
1660 if (writeWrappingElem) {
1661 WriteStartElement (element, namesp, ob);
1664 if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
1666 WriteAttribute ("element", "", FromXmlQualifiedName (ob.@Element));
1667 WriteAttribute ("name", "", ob.@Name);
1668 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
1670 if (ob.@DocumentationElement != null) {
1671 XmlNode o76 = ob.@DocumentationElement;
1672 if (o76 is XmlElement) {
1673 if ((o76.Name == "documentation" && o76.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1675 else o76.WriteTo (Writer);
1676 WriteElementLiteral (o76, "", "", false, true);
1679 throw CreateUnknownAnyElementException (o76.Name, o76.NamespaceURI);
1681 if (writeWrappingElem) WriteEndElement (ob);
1684 void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1686 if (((object)ob) == null)
1689 WriteNullTagLiteral(element, namesp);
1693 System.Type type = ob.GetType ();
1694 if (type == typeof(System.Web.Services.Description.Operation))
1697 throw CreateUnknownTypeException (ob);
1700 if (writeWrappingElem) {
1701 WriteStartElement (element, namesp, ob);
1704 if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
1706 WriteAttribute ("name", "", ob.@Name);
1707 if (ob.@ParameterOrderString != "") {
1708 WriteAttribute ("parameterOrder", "", ob.@ParameterOrderString);
1711 if (ob.@DocumentationElement != null) {
1712 XmlNode o77 = ob.@DocumentationElement;
1713 if (o77 is XmlElement) {
1714 if ((o77.Name == "documentation" && o77.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1716 else o77.WriteTo (Writer);
1717 WriteElementLiteral (o77, "", "", false, true);
1720 throw CreateUnknownAnyElementException (o77.Name, o77.NamespaceURI);
1722 if (ob.@Faults != null) {
1723 for (int n78 = 0; n78 < ob.@Faults.Count; n78++) {
1724 WriteObject_OperationFault (ob.@Faults[n78], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1727 if (ob.@Messages != null) {
1728 for (int n79 = 0; n79 < ob.@Messages.Count; n79++) {
1729 if (((object)ob.@Messages[n79]) == null) { }
1730 else if (ob.@Messages[n79].GetType() == typeof(System.Web.Services.Description.OperationInput)) {
1731 WriteObject_OperationInput (((System.Web.Services.Description.OperationInput) ob.@Messages[n79]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1733 else if (ob.@Messages[n79].GetType() == typeof(System.Web.Services.Description.OperationOutput)) {
1734 WriteObject_OperationOutput (((System.Web.Services.Description.OperationOutput) ob.@Messages[n79]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1736 else throw CreateUnknownTypeException (ob.@Messages[n79]);
1739 if (writeWrappingElem) WriteEndElement (ob);
1742 void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1744 if (((object)ob) == null)
1747 WriteNullTagLiteral(element, namesp);
1751 System.Type type = ob.GetType ();
1752 if (type == typeof(System.Web.Services.Description.OperationBinding))
1755 throw CreateUnknownTypeException (ob);
1758 if (writeWrappingElem) {
1759 WriteStartElement (element, namesp, ob);
1762 if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
1764 WriteAttribute ("name", "", ob.@Name);
1766 ServiceDescription.WriteExtensions (Writer, ob);
1767 if (ob.@DocumentationElement != null) {
1768 XmlNode o80 = ob.@DocumentationElement;
1769 if (o80 is XmlElement) {
1770 if ((o80.Name == "documentation" && o80.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1772 else o80.WriteTo (Writer);
1773 WriteElementLiteral (o80, "", "", false, true);
1776 throw CreateUnknownAnyElementException (o80.Name, o80.NamespaceURI);
1778 if (ob.@Faults != null) {
1779 for (int n81 = 0; n81 < ob.@Faults.Count; n81++) {
1780 WriteObject_FaultBinding (ob.@Faults[n81], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1783 WriteObject_InputBinding (ob.@Input, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1784 WriteObject_OutputBinding (ob.@Output, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
1785 if (writeWrappingElem) WriteEndElement (ob);
1788 void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1790 if (((object)ob) == null)
1793 WriteNullTagLiteral(element, namesp);
1797 System.Type type = ob.GetType ();
1798 if (type == typeof(System.Web.Services.Description.Port))
1801 throw CreateUnknownTypeException (ob);
1804 if (writeWrappingElem) {
1805 WriteStartElement (element, namesp, ob);
1808 if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
1810 WriteAttribute ("binding", "", FromXmlQualifiedName (ob.@Binding));
1811 WriteAttribute ("name", "", ob.@Name);
1813 ServiceDescription.WriteExtensions (Writer, ob);
1814 if (ob.@DocumentationElement != null) {
1815 XmlNode o82 = ob.@DocumentationElement;
1816 if (o82 is XmlElement) {
1817 if ((o82.Name == "documentation" && o82.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1819 else o82.WriteTo (Writer);
1820 WriteElementLiteral (o82, "", "", false, true);
1823 throw CreateUnknownAnyElementException (o82.Name, o82.NamespaceURI);
1825 if (writeWrappingElem) WriteEndElement (ob);
1828 void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1830 if (((object)ob) == null)
1833 WriteNullTagLiteral(element, namesp);
1837 System.Type type = ob.GetType ();
1838 if (type == typeof(System.Web.Services.Description.OperationFault))
1841 throw CreateUnknownTypeException (ob);
1844 if (writeWrappingElem) {
1845 WriteStartElement (element, namesp, ob);
1848 if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
1850 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1851 WriteAttribute ("name", "", ob.@Name);
1853 if (ob.@DocumentationElement != null) {
1854 XmlNode o83 = ob.@DocumentationElement;
1855 if (o83 is XmlElement) {
1856 if ((o83.Name == "documentation" && o83.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1858 else o83.WriteTo (Writer);
1859 WriteElementLiteral (o83, "", "", false, true);
1862 throw CreateUnknownAnyElementException (o83.Name, o83.NamespaceURI);
1864 if (writeWrappingElem) WriteEndElement (ob);
1867 void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1869 if (((object)ob) == null)
1872 WriteNullTagLiteral(element, namesp);
1876 System.Type type = ob.GetType ();
1877 if (type == typeof(System.Web.Services.Description.OperationInput))
1880 throw CreateUnknownTypeException (ob);
1883 if (writeWrappingElem) {
1884 WriteStartElement (element, namesp, ob);
1887 if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
1889 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1890 WriteAttribute ("name", "", ob.@Name);
1892 if (ob.@DocumentationElement != null) {
1893 XmlNode o84 = ob.@DocumentationElement;
1894 if (o84 is XmlElement) {
1895 if ((o84.Name == "documentation" && o84.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1897 else o84.WriteTo (Writer);
1898 WriteElementLiteral (o84, "", "", false, true);
1901 throw CreateUnknownAnyElementException (o84.Name, o84.NamespaceURI);
1903 if (writeWrappingElem) WriteEndElement (ob);
1906 void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1908 if (((object)ob) == null)
1911 WriteNullTagLiteral(element, namesp);
1915 System.Type type = ob.GetType ();
1916 if (type == typeof(System.Web.Services.Description.OperationOutput))
1919 throw CreateUnknownTypeException (ob);
1922 if (writeWrappingElem) {
1923 WriteStartElement (element, namesp, ob);
1926 if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
1928 WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
1929 WriteAttribute ("name", "", ob.@Name);
1931 if (ob.@DocumentationElement != null) {
1932 XmlNode o85 = ob.@DocumentationElement;
1933 if (o85 is XmlElement) {
1934 if ((o85.Name == "documentation" && o85.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1936 else o85.WriteTo (Writer);
1937 WriteElementLiteral (o85, "", "", false, true);
1940 throw CreateUnknownAnyElementException (o85.Name, o85.NamespaceURI);
1942 if (writeWrappingElem) WriteEndElement (ob);
1945 void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1947 if (((object)ob) == null)
1950 WriteNullTagLiteral(element, namesp);
1954 System.Type type = ob.GetType ();
1955 if (type == typeof(System.Web.Services.Description.FaultBinding))
1958 throw CreateUnknownTypeException (ob);
1961 if (writeWrappingElem) {
1962 WriteStartElement (element, namesp, ob);
1965 if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
1967 WriteAttribute ("name", "", ob.@Name);
1969 ServiceDescription.WriteExtensions (Writer, ob);
1970 if (ob.@DocumentationElement != null) {
1971 XmlNode o86 = ob.@DocumentationElement;
1972 if (o86 is XmlElement) {
1973 if ((o86.Name == "documentation" && o86.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
1975 else o86.WriteTo (Writer);
1976 WriteElementLiteral (o86, "", "", false, true);
1979 throw CreateUnknownAnyElementException (o86.Name, o86.NamespaceURI);
1981 if (writeWrappingElem) WriteEndElement (ob);
1984 void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
1986 if (((object)ob) == null)
1989 WriteNullTagLiteral(element, namesp);
1993 System.Type type = ob.GetType ();
1994 if (type == typeof(System.Web.Services.Description.InputBinding))
1997 throw CreateUnknownTypeException (ob);
2000 if (writeWrappingElem) {
2001 WriteStartElement (element, namesp, ob);
2004 if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
2006 WriteAttribute ("name", "", ob.@Name);
2008 ServiceDescription.WriteExtensions (Writer, ob);
2009 if (ob.@DocumentationElement != null) {
2010 XmlNode o87 = ob.@DocumentationElement;
2011 if (o87 is XmlElement) {
2012 if ((o87.Name == "documentation" && o87.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2014 else o87.WriteTo (Writer);
2015 WriteElementLiteral (o87, "", "", false, true);
2018 throw CreateUnknownAnyElementException (o87.Name, o87.NamespaceURI);
2020 if (writeWrappingElem) WriteEndElement (ob);
2023 void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
2025 if (((object)ob) == null)
2028 WriteNullTagLiteral(element, namesp);
2032 System.Type type = ob.GetType ();
2033 if (type == typeof(System.Web.Services.Description.OutputBinding))
2036 throw CreateUnknownTypeException (ob);
2039 if (writeWrappingElem) {
2040 WriteStartElement (element, namesp, ob);
2043 if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
2045 WriteAttribute ("name", "", ob.@Name);
2047 ServiceDescription.WriteExtensions (Writer, ob);
2048 if (ob.@DocumentationElement != null) {
2049 XmlNode o88 = ob.@DocumentationElement;
2050 if (o88 is XmlElement) {
2051 if ((o88.Name == "documentation" && o88.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
2053 else o88.WriteTo (Writer);
2054 WriteElementLiteral (o88, "", "", false, true);
2057 throw CreateUnknownAnyElementException (o88.Name, o88.NamespaceURI);
2059 if (writeWrappingElem) WriteEndElement (ob);
2062 protected override void InitCallbacks ()