ServiceDescriptionSerializerBase2.cs 80 KB

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