ServiceDescriptionSerializerBase.cs 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808
  1. using System;
  2. using System.Xml;
  3. using System.Xml.Serialization;
  4. using System.Text;
  5. using System.Collections;
  6. using System.Globalization;
  7. namespace System.Web.Services.Description
  8. {
  9. public class ServiceDescriptionReaderBase : XmlSerializationReader
  10. {
  11. public System.Web.Services.Description.ServiceDescription ReadTree ()
  12. {
  13. Reader.MoveToContent();
  14. return ReadObject_ServiceDescription (true, true);
  15. }
  16. public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
  17. {
  18. System.Web.Services.Description.ServiceDescription ob = null;
  19. if (isNullable && ReadNull()) return null;
  20. if (checkType)
  21. {
  22. System.Xml.XmlQualifiedName t = GetXsiType();
  23. if (t != null)
  24. {
  25. if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  26. throw CreateUnknownTypeException(t);
  27. }
  28. }
  29. ob = new System.Web.Services.Description.ServiceDescription ();
  30. Reader.MoveToElement();
  31. while (Reader.MoveToNextAttribute())
  32. {
  33. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  34. ob.Name = Reader.Value;
  35. }
  36. else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
  37. ob.TargetNamespace = Reader.Value;
  38. }
  39. else if (IsXmlnsAttribute (Reader.Name)) {
  40. }
  41. else {
  42. UnknownNode (ob);
  43. }
  44. }
  45. Reader.MoveToElement();
  46. if (Reader.IsEmptyElement) {
  47. Reader.Skip ();
  48. return ob;
  49. }
  50. Reader.ReadStartElement();
  51. Reader.MoveToContent();
  52. bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
  53. System.Web.Services.Description.ImportCollection o8 = ob.Imports;
  54. System.Web.Services.Description.MessageCollection o10 = ob.Messages;
  55. System.Web.Services.Description.PortTypeCollection o12 = ob.PortTypes;
  56. System.Web.Services.Description.BindingCollection o14 = ob.Bindings;
  57. System.Web.Services.Description.ServiceCollection o16 = ob.Services;
  58. int n7=0, n9=0, n11=0, n13=0, n15=0;
  59. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  60. {
  61. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  62. {
  63. if (Reader.LocalName == "binding" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b4) {
  64. if (o14 == null)
  65. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.BindingCollection");
  66. o14.Add (ReadObject_Binding (false, true));
  67. n13++;
  68. }
  69. else if (Reader.LocalName == "service" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b5) {
  70. if (o16 == null)
  71. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
  72. o16.Add (ReadObject_Service (false, true));
  73. n15++;
  74. }
  75. else if (Reader.LocalName == "import" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b0) {
  76. if (o8 == null)
  77. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ImportCollection");
  78. o8.Add (ReadObject_Import (false, true));
  79. n7++;
  80. }
  81. else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b6) {
  82. b6 = true;
  83. ob.Documentation = Reader.ReadElementString ();
  84. }
  85. else if (Reader.LocalName == "message" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
  86. if (o10 == null)
  87. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
  88. o10.Add (ReadObject_Message (false, true));
  89. n9++;
  90. }
  91. else if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b1) {
  92. b1 = true;
  93. ob.Types = ReadObject_Types (false, true);
  94. }
  95. else if (Reader.LocalName == "portType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b3) {
  96. if (o12 == null)
  97. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortTypeCollection");
  98. o12.Add (ReadObject_PortType (false, true));
  99. n11++;
  100. }
  101. else {
  102. ServiceDescription.ReadExtension (Reader, ob);
  103. }
  104. }
  105. else
  106. UnknownNode(ob);
  107. Reader.MoveToContent();
  108. }
  109. ReadEndElement();
  110. return ob;
  111. }
  112. public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
  113. {
  114. System.Web.Services.Description.Binding ob = null;
  115. if (isNullable && ReadNull()) return null;
  116. if (checkType)
  117. {
  118. System.Xml.XmlQualifiedName t = GetXsiType();
  119. if (t != null)
  120. {
  121. if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  122. throw CreateUnknownTypeException(t);
  123. }
  124. }
  125. ob = new System.Web.Services.Description.Binding ();
  126. Reader.MoveToElement();
  127. while (Reader.MoveToNextAttribute())
  128. {
  129. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  130. ob.Name = Reader.Value;
  131. }
  132. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  133. ob.Type = ToXmlQualifiedName (Reader.Value);
  134. }
  135. else if (IsXmlnsAttribute (Reader.Name)) {
  136. }
  137. else {
  138. UnknownNode (ob);
  139. }
  140. }
  141. Reader.MoveToElement();
  142. if (Reader.IsEmptyElement) {
  143. Reader.Skip ();
  144. return ob;
  145. }
  146. Reader.ReadStartElement();
  147. Reader.MoveToContent();
  148. bool b17=false, b18=false;
  149. System.Web.Services.Description.OperationBindingCollection o20 = ob.Operations;
  150. int n19=0;
  151. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  152. {
  153. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  154. {
  155. if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
  156. if (o20 == null)
  157. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
  158. o20.Add (ReadObject_OperationBinding (false, true));
  159. n19++;
  160. }
  161. else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b18) {
  162. b18 = true;
  163. ob.Documentation = Reader.ReadElementString ();
  164. }
  165. else {
  166. ServiceDescription.ReadExtension (Reader, ob);
  167. }
  168. }
  169. else
  170. UnknownNode(ob);
  171. Reader.MoveToContent();
  172. }
  173. ReadEndElement();
  174. return ob;
  175. }
  176. public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
  177. {
  178. System.Web.Services.Description.Service ob = null;
  179. if (isNullable && ReadNull()) return null;
  180. if (checkType)
  181. {
  182. System.Xml.XmlQualifiedName t = GetXsiType();
  183. if (t != null)
  184. {
  185. if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  186. throw CreateUnknownTypeException(t);
  187. }
  188. }
  189. ob = new System.Web.Services.Description.Service ();
  190. Reader.MoveToElement();
  191. while (Reader.MoveToNextAttribute())
  192. {
  193. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  194. ob.Name = Reader.Value;
  195. }
  196. else if (IsXmlnsAttribute (Reader.Name)) {
  197. }
  198. else {
  199. UnknownNode (ob);
  200. }
  201. }
  202. Reader.MoveToElement();
  203. if (Reader.IsEmptyElement) {
  204. Reader.Skip ();
  205. return ob;
  206. }
  207. Reader.ReadStartElement();
  208. Reader.MoveToContent();
  209. bool b21=false, b22=false;
  210. System.Web.Services.Description.PortCollection o24 = ob.Ports;
  211. int n23=0;
  212. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  213. {
  214. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  215. {
  216. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) {
  217. b22 = true;
  218. ob.Documentation = Reader.ReadElementString ();
  219. }
  220. else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
  221. if (o24 == null)
  222. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
  223. o24.Add (ReadObject_Port (false, true));
  224. n23++;
  225. }
  226. else {
  227. UnknownNode (ob);
  228. }
  229. }
  230. else
  231. UnknownNode(ob);
  232. Reader.MoveToContent();
  233. }
  234. ReadEndElement();
  235. return ob;
  236. }
  237. public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
  238. {
  239. System.Web.Services.Description.Import ob = null;
  240. if (isNullable && ReadNull()) return null;
  241. if (checkType)
  242. {
  243. System.Xml.XmlQualifiedName t = GetXsiType();
  244. if (t != null)
  245. {
  246. if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  247. throw CreateUnknownTypeException(t);
  248. }
  249. }
  250. ob = new System.Web.Services.Description.Import ();
  251. Reader.MoveToElement();
  252. while (Reader.MoveToNextAttribute())
  253. {
  254. if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
  255. ob.Namespace = Reader.Value;
  256. }
  257. else if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
  258. ob.Location = Reader.Value;
  259. }
  260. else if (IsXmlnsAttribute (Reader.Name)) {
  261. }
  262. else {
  263. UnknownNode (ob);
  264. }
  265. }
  266. Reader.MoveToElement();
  267. if (Reader.IsEmptyElement) {
  268. Reader.Skip ();
  269. return ob;
  270. }
  271. Reader.ReadStartElement();
  272. Reader.MoveToContent();
  273. bool b25=false;
  274. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  275. {
  276. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  277. {
  278. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
  279. b25 = true;
  280. ob.Documentation = Reader.ReadElementString ();
  281. }
  282. else {
  283. UnknownNode (ob);
  284. }
  285. }
  286. else
  287. UnknownNode(ob);
  288. Reader.MoveToContent();
  289. }
  290. ReadEndElement();
  291. return ob;
  292. }
  293. public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
  294. {
  295. System.Web.Services.Description.Message ob = null;
  296. if (isNullable && ReadNull()) return null;
  297. if (checkType)
  298. {
  299. System.Xml.XmlQualifiedName t = GetXsiType();
  300. if (t != null)
  301. {
  302. if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  303. throw CreateUnknownTypeException(t);
  304. }
  305. }
  306. ob = new System.Web.Services.Description.Message ();
  307. Reader.MoveToElement();
  308. while (Reader.MoveToNextAttribute())
  309. {
  310. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  311. ob.Name = Reader.Value;
  312. }
  313. else if (IsXmlnsAttribute (Reader.Name)) {
  314. }
  315. else {
  316. UnknownNode (ob);
  317. }
  318. }
  319. Reader.MoveToElement();
  320. if (Reader.IsEmptyElement) {
  321. Reader.Skip ();
  322. return ob;
  323. }
  324. Reader.ReadStartElement();
  325. Reader.MoveToContent();
  326. bool b26=false, b27=false;
  327. System.Web.Services.Description.MessagePartCollection o29 = ob.Parts;
  328. int n28=0;
  329. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  330. {
  331. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  332. {
  333. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b27) {
  334. b27 = true;
  335. ob.Documentation = Reader.ReadElementString ();
  336. }
  337. else if (Reader.LocalName == "part" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b26) {
  338. if (o29 == null)
  339. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
  340. o29.Add (ReadObject_MessagePart (false, true));
  341. n28++;
  342. }
  343. else {
  344. UnknownNode (ob);
  345. }
  346. }
  347. else
  348. UnknownNode(ob);
  349. Reader.MoveToContent();
  350. }
  351. ReadEndElement();
  352. return ob;
  353. }
  354. public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
  355. {
  356. System.Web.Services.Description.Types ob = null;
  357. if (isNullable && ReadNull()) return null;
  358. if (checkType)
  359. {
  360. System.Xml.XmlQualifiedName t = GetXsiType();
  361. if (t != null)
  362. {
  363. if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  364. throw CreateUnknownTypeException(t);
  365. }
  366. }
  367. ob = new System.Web.Services.Description.Types ();
  368. Reader.MoveToElement();
  369. while (Reader.MoveToNextAttribute())
  370. {
  371. if (IsXmlnsAttribute (Reader.Name)) {
  372. }
  373. else {
  374. UnknownNode (ob);
  375. }
  376. }
  377. Reader.MoveToElement();
  378. if (Reader.IsEmptyElement) {
  379. Reader.Skip ();
  380. return ob;
  381. }
  382. Reader.ReadStartElement();
  383. Reader.MoveToContent();
  384. bool b30=false, b31=false;
  385. System.Xml.Serialization.XmlSchemas o33 = ob.Schemas;
  386. int n32=0;
  387. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  388. {
  389. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  390. {
  391. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b31) {
  392. b31 = true;
  393. ob.Documentation = Reader.ReadElementString ();
  394. }
  395. else if (Reader.LocalName == "schema" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b30) {
  396. if (o33 == null)
  397. throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
  398. o33.Add (ReadObject_XmlSchema (false, true));
  399. n32++;
  400. }
  401. else {
  402. ServiceDescription.ReadExtension (Reader, ob);
  403. }
  404. }
  405. else
  406. UnknownNode(ob);
  407. Reader.MoveToContent();
  408. }
  409. ReadEndElement();
  410. return ob;
  411. }
  412. public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
  413. {
  414. System.Web.Services.Description.PortType ob = null;
  415. if (isNullable && ReadNull()) return null;
  416. if (checkType)
  417. {
  418. System.Xml.XmlQualifiedName t = GetXsiType();
  419. if (t != null)
  420. {
  421. if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  422. throw CreateUnknownTypeException(t);
  423. }
  424. }
  425. ob = new System.Web.Services.Description.PortType ();
  426. Reader.MoveToElement();
  427. while (Reader.MoveToNextAttribute())
  428. {
  429. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  430. ob.Name = Reader.Value;
  431. }
  432. else if (IsXmlnsAttribute (Reader.Name)) {
  433. }
  434. else {
  435. UnknownNode (ob);
  436. }
  437. }
  438. Reader.MoveToElement();
  439. if (Reader.IsEmptyElement) {
  440. Reader.Skip ();
  441. return ob;
  442. }
  443. Reader.ReadStartElement();
  444. Reader.MoveToContent();
  445. bool b34=false, b35=false;
  446. System.Web.Services.Description.OperationCollection o37 = ob.Operations;
  447. int n36=0;
  448. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  449. {
  450. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  451. {
  452. if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
  453. if (o37 == null)
  454. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
  455. o37.Add (ReadObject_Operation (false, true));
  456. n36++;
  457. }
  458. else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b35) {
  459. b35 = true;
  460. ob.Documentation = Reader.ReadElementString ();
  461. }
  462. else {
  463. UnknownNode (ob);
  464. }
  465. }
  466. else
  467. UnknownNode(ob);
  468. Reader.MoveToContent();
  469. }
  470. ReadEndElement();
  471. return ob;
  472. }
  473. public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
  474. {
  475. System.Web.Services.Description.OperationBinding ob = null;
  476. if (isNullable && ReadNull()) return null;
  477. if (checkType)
  478. {
  479. System.Xml.XmlQualifiedName t = GetXsiType();
  480. if (t != null)
  481. {
  482. if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  483. throw CreateUnknownTypeException(t);
  484. }
  485. }
  486. ob = new System.Web.Services.Description.OperationBinding ();
  487. Reader.MoveToElement();
  488. while (Reader.MoveToNextAttribute())
  489. {
  490. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  491. ob.Name = Reader.Value;
  492. }
  493. else if (IsXmlnsAttribute (Reader.Name)) {
  494. }
  495. else {
  496. UnknownNode (ob);
  497. }
  498. }
  499. Reader.MoveToElement();
  500. if (Reader.IsEmptyElement) {
  501. Reader.Skip ();
  502. return ob;
  503. }
  504. Reader.ReadStartElement();
  505. Reader.MoveToContent();
  506. bool b38=false, b39=false, b40=false, b41=false;
  507. System.Web.Services.Description.FaultBindingCollection o43 = ob.Faults;
  508. int n42=0;
  509. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  510. {
  511. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  512. {
  513. if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
  514. b39 = true;
  515. ob.Input = ReadObject_InputBinding (false, true);
  516. }
  517. else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
  518. if (o43 == null)
  519. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
  520. o43.Add (ReadObject_FaultBinding (false, true));
  521. n42++;
  522. }
  523. else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b41) {
  524. b41 = true;
  525. ob.Documentation = Reader.ReadElementString ();
  526. }
  527. else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
  528. b40 = true;
  529. ob.Output = ReadObject_OutputBinding (false, true);
  530. }
  531. else {
  532. ServiceDescription.ReadExtension (Reader, ob);
  533. }
  534. }
  535. else
  536. UnknownNode(ob);
  537. Reader.MoveToContent();
  538. }
  539. ReadEndElement();
  540. return ob;
  541. }
  542. public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
  543. {
  544. System.Web.Services.Description.Port ob = null;
  545. if (isNullable && ReadNull()) return null;
  546. if (checkType)
  547. {
  548. System.Xml.XmlQualifiedName t = GetXsiType();
  549. if (t != null)
  550. {
  551. if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  552. throw CreateUnknownTypeException(t);
  553. }
  554. }
  555. ob = new System.Web.Services.Description.Port ();
  556. Reader.MoveToElement();
  557. while (Reader.MoveToNextAttribute())
  558. {
  559. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  560. ob.Name = Reader.Value;
  561. }
  562. else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
  563. ob.Binding = ToXmlQualifiedName (Reader.Value);
  564. }
  565. else if (IsXmlnsAttribute (Reader.Name)) {
  566. }
  567. else {
  568. UnknownNode (ob);
  569. }
  570. }
  571. Reader.MoveToElement();
  572. if (Reader.IsEmptyElement) {
  573. Reader.Skip ();
  574. return ob;
  575. }
  576. Reader.ReadStartElement();
  577. Reader.MoveToContent();
  578. bool b44=false;
  579. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  580. {
  581. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  582. {
  583. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b44) {
  584. b44 = true;
  585. ob.Documentation = Reader.ReadElementString ();
  586. }
  587. else {
  588. ServiceDescription.ReadExtension (Reader, ob);
  589. }
  590. }
  591. else
  592. UnknownNode(ob);
  593. Reader.MoveToContent();
  594. }
  595. ReadEndElement();
  596. return ob;
  597. }
  598. public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
  599. {
  600. System.Web.Services.Description.MessagePart ob = null;
  601. if (isNullable && ReadNull()) return null;
  602. if (checkType)
  603. {
  604. System.Xml.XmlQualifiedName t = GetXsiType();
  605. if (t != null)
  606. {
  607. if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  608. throw CreateUnknownTypeException(t);
  609. }
  610. }
  611. ob = new System.Web.Services.Description.MessagePart ();
  612. Reader.MoveToElement();
  613. while (Reader.MoveToNextAttribute())
  614. {
  615. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  616. ob.Name = Reader.Value;
  617. }
  618. else if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
  619. ob.Element = ToXmlQualifiedName (Reader.Value);
  620. }
  621. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  622. ob.Type = ToXmlQualifiedName (Reader.Value);
  623. }
  624. else if (IsXmlnsAttribute (Reader.Name)) {
  625. }
  626. else {
  627. UnknownNode (ob);
  628. }
  629. }
  630. Reader.MoveToElement();
  631. if (Reader.IsEmptyElement) {
  632. Reader.Skip ();
  633. return ob;
  634. }
  635. Reader.ReadStartElement();
  636. Reader.MoveToContent();
  637. bool b45=false;
  638. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  639. {
  640. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  641. {
  642. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b45) {
  643. b45 = true;
  644. ob.Documentation = Reader.ReadElementString ();
  645. }
  646. else {
  647. UnknownNode (ob);
  648. }
  649. }
  650. else
  651. UnknownNode(ob);
  652. Reader.MoveToContent();
  653. }
  654. ReadEndElement();
  655. return ob;
  656. }
  657. public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
  658. {
  659. System.Xml.Schema.XmlSchema ob = null;
  660. ob = System.Xml.Schema.XmlSchema.Read (Reader, null);
  661. return ob;
  662. }
  663. public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
  664. {
  665. System.Web.Services.Description.Operation ob = null;
  666. if (isNullable && ReadNull()) return null;
  667. if (checkType)
  668. {
  669. System.Xml.XmlQualifiedName t = GetXsiType();
  670. if (t != null)
  671. {
  672. if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  673. throw CreateUnknownTypeException(t);
  674. }
  675. }
  676. ob = new System.Web.Services.Description.Operation ();
  677. Reader.MoveToElement();
  678. while (Reader.MoveToNextAttribute())
  679. {
  680. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  681. ob.Name = Reader.Value;
  682. }
  683. else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
  684. ob.ParameterOrderString = Reader.Value;
  685. }
  686. else if (IsXmlnsAttribute (Reader.Name)) {
  687. }
  688. else {
  689. UnknownNode (ob);
  690. }
  691. }
  692. Reader.MoveToElement();
  693. if (Reader.IsEmptyElement) {
  694. Reader.Skip ();
  695. return ob;
  696. }
  697. Reader.ReadStartElement();
  698. Reader.MoveToContent();
  699. bool b46=false, b47=false, b48=false;
  700. System.Web.Services.Description.OperationFaultCollection o50 = ob.Faults;
  701. System.Web.Services.Description.OperationMessageCollection o52 = ob.Messages;
  702. int n49=0, n51=0;
  703. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  704. {
  705. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  706. {
  707. if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
  708. if (o52 == null)
  709. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
  710. o52.Add (ReadObject_OperationInput (false, true));
  711. n51++;
  712. }
  713. else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b46) {
  714. if (o50 == null)
  715. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
  716. o50.Add (ReadObject_OperationFault (false, true));
  717. n49++;
  718. }
  719. else if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b48) {
  720. b48 = true;
  721. ob.Documentation = Reader.ReadElementString ();
  722. }
  723. else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
  724. if (o52 == null)
  725. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
  726. o52.Add (ReadObject_OperationOutput (false, true));
  727. n51++;
  728. }
  729. else {
  730. UnknownNode (ob);
  731. }
  732. }
  733. else
  734. UnknownNode(ob);
  735. Reader.MoveToContent();
  736. }
  737. ReadEndElement();
  738. return ob;
  739. }
  740. public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
  741. {
  742. System.Web.Services.Description.InputBinding ob = null;
  743. if (isNullable && ReadNull()) return null;
  744. if (checkType)
  745. {
  746. System.Xml.XmlQualifiedName t = GetXsiType();
  747. if (t != null)
  748. {
  749. if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  750. throw CreateUnknownTypeException(t);
  751. }
  752. }
  753. ob = new System.Web.Services.Description.InputBinding ();
  754. Reader.MoveToElement();
  755. while (Reader.MoveToNextAttribute())
  756. {
  757. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  758. ob.Name = Reader.Value;
  759. }
  760. else if (IsXmlnsAttribute (Reader.Name)) {
  761. }
  762. else {
  763. UnknownNode (ob);
  764. }
  765. }
  766. Reader.MoveToElement();
  767. if (Reader.IsEmptyElement) {
  768. Reader.Skip ();
  769. return ob;
  770. }
  771. Reader.ReadStartElement();
  772. Reader.MoveToContent();
  773. bool b53=false;
  774. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  775. {
  776. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  777. {
  778. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
  779. b53 = true;
  780. ob.Documentation = Reader.ReadElementString ();
  781. }
  782. else {
  783. ServiceDescription.ReadExtension (Reader, ob);
  784. }
  785. }
  786. else
  787. UnknownNode(ob);
  788. Reader.MoveToContent();
  789. }
  790. ReadEndElement();
  791. return ob;
  792. }
  793. public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
  794. {
  795. System.Web.Services.Description.FaultBinding ob = null;
  796. if (isNullable && ReadNull()) return null;
  797. if (checkType)
  798. {
  799. System.Xml.XmlQualifiedName t = GetXsiType();
  800. if (t != null)
  801. {
  802. if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  803. throw CreateUnknownTypeException(t);
  804. }
  805. }
  806. ob = new System.Web.Services.Description.FaultBinding ();
  807. Reader.MoveToElement();
  808. while (Reader.MoveToNextAttribute())
  809. {
  810. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  811. ob.Name = Reader.Value;
  812. }
  813. else if (IsXmlnsAttribute (Reader.Name)) {
  814. }
  815. else {
  816. UnknownNode (ob);
  817. }
  818. }
  819. Reader.MoveToElement();
  820. if (Reader.IsEmptyElement) {
  821. Reader.Skip ();
  822. return ob;
  823. }
  824. Reader.ReadStartElement();
  825. Reader.MoveToContent();
  826. bool b54=false;
  827. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  828. {
  829. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  830. {
  831. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
  832. b54 = true;
  833. ob.Documentation = Reader.ReadElementString ();
  834. }
  835. else {
  836. ServiceDescription.ReadExtension (Reader, ob);
  837. }
  838. }
  839. else
  840. UnknownNode(ob);
  841. Reader.MoveToContent();
  842. }
  843. ReadEndElement();
  844. return ob;
  845. }
  846. public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
  847. {
  848. System.Web.Services.Description.OutputBinding ob = null;
  849. if (isNullable && ReadNull()) return null;
  850. if (checkType)
  851. {
  852. System.Xml.XmlQualifiedName t = GetXsiType();
  853. if (t != null)
  854. {
  855. if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  856. throw CreateUnknownTypeException(t);
  857. }
  858. }
  859. ob = new System.Web.Services.Description.OutputBinding ();
  860. Reader.MoveToElement();
  861. while (Reader.MoveToNextAttribute())
  862. {
  863. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  864. ob.Name = Reader.Value;
  865. }
  866. else if (IsXmlnsAttribute (Reader.Name)) {
  867. }
  868. else {
  869. UnknownNode (ob);
  870. }
  871. }
  872. Reader.MoveToElement();
  873. if (Reader.IsEmptyElement) {
  874. Reader.Skip ();
  875. return ob;
  876. }
  877. Reader.ReadStartElement();
  878. Reader.MoveToContent();
  879. bool b55=false;
  880. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  881. {
  882. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  883. {
  884. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
  885. b55 = true;
  886. ob.Documentation = Reader.ReadElementString ();
  887. }
  888. else {
  889. ServiceDescription.ReadExtension (Reader, ob);
  890. }
  891. }
  892. else
  893. UnknownNode(ob);
  894. Reader.MoveToContent();
  895. }
  896. ReadEndElement();
  897. return ob;
  898. }
  899. public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
  900. {
  901. System.Web.Services.Description.OperationInput ob = null;
  902. if (isNullable && ReadNull()) return null;
  903. if (checkType)
  904. {
  905. System.Xml.XmlQualifiedName t = GetXsiType();
  906. if (t != null)
  907. {
  908. if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  909. throw CreateUnknownTypeException(t);
  910. }
  911. }
  912. ob = new System.Web.Services.Description.OperationInput ();
  913. Reader.MoveToElement();
  914. while (Reader.MoveToNextAttribute())
  915. {
  916. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  917. ob.Name = Reader.Value;
  918. }
  919. else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
  920. ob.Message = ToXmlQualifiedName (Reader.Value);
  921. }
  922. else if (IsXmlnsAttribute (Reader.Name)) {
  923. }
  924. else {
  925. UnknownNode (ob);
  926. }
  927. }
  928. Reader.MoveToElement();
  929. if (Reader.IsEmptyElement) {
  930. Reader.Skip ();
  931. return ob;
  932. }
  933. Reader.ReadStartElement();
  934. Reader.MoveToContent();
  935. bool b56=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/" && !b56) {
  941. b56 = true;
  942. ob.Documentation = Reader.ReadElementString ();
  943. }
  944. else {
  945. UnknownNode (ob);
  946. }
  947. }
  948. else
  949. UnknownNode(ob);
  950. Reader.MoveToContent();
  951. }
  952. ReadEndElement();
  953. return ob;
  954. }
  955. public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
  956. {
  957. System.Web.Services.Description.OperationFault ob = null;
  958. if (isNullable && ReadNull()) return null;
  959. if (checkType)
  960. {
  961. System.Xml.XmlQualifiedName t = GetXsiType();
  962. if (t != null)
  963. {
  964. if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  965. throw CreateUnknownTypeException(t);
  966. }
  967. }
  968. ob = new System.Web.Services.Description.OperationFault ();
  969. Reader.MoveToElement();
  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. }
  980. else {
  981. UnknownNode (ob);
  982. }
  983. }
  984. Reader.MoveToElement();
  985. if (Reader.IsEmptyElement) {
  986. Reader.Skip ();
  987. return ob;
  988. }
  989. Reader.ReadStartElement();
  990. Reader.MoveToContent();
  991. bool b57=false;
  992. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  993. {
  994. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  995. {
  996. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
  997. b57 = true;
  998. ob.Documentation = Reader.ReadElementString ();
  999. }
  1000. else {
  1001. UnknownNode (ob);
  1002. }
  1003. }
  1004. else
  1005. UnknownNode(ob);
  1006. Reader.MoveToContent();
  1007. }
  1008. ReadEndElement();
  1009. return ob;
  1010. }
  1011. public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
  1012. {
  1013. System.Web.Services.Description.OperationOutput ob = null;
  1014. if (isNullable && ReadNull()) return null;
  1015. if (checkType)
  1016. {
  1017. System.Xml.XmlQualifiedName t = GetXsiType();
  1018. if (t != null)
  1019. {
  1020. if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  1021. throw CreateUnknownTypeException(t);
  1022. }
  1023. }
  1024. ob = new System.Web.Services.Description.OperationOutput ();
  1025. Reader.MoveToElement();
  1026. while (Reader.MoveToNextAttribute())
  1027. {
  1028. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  1029. ob.Name = Reader.Value;
  1030. }
  1031. else if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
  1032. ob.Message = ToXmlQualifiedName (Reader.Value);
  1033. }
  1034. else if (IsXmlnsAttribute (Reader.Name)) {
  1035. }
  1036. else {
  1037. UnknownNode (ob);
  1038. }
  1039. }
  1040. Reader.MoveToElement();
  1041. if (Reader.IsEmptyElement) {
  1042. Reader.Skip ();
  1043. return ob;
  1044. }
  1045. Reader.ReadStartElement();
  1046. Reader.MoveToContent();
  1047. bool b58=false;
  1048. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1049. {
  1050. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1051. {
  1052. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b58) {
  1053. b58 = true;
  1054. ob.Documentation = Reader.ReadElementString ();
  1055. }
  1056. else {
  1057. UnknownNode (ob);
  1058. }
  1059. }
  1060. else
  1061. UnknownNode(ob);
  1062. Reader.MoveToContent();
  1063. }
  1064. ReadEndElement();
  1065. return ob;
  1066. }
  1067. protected override void InitCallbacks ()
  1068. {
  1069. }
  1070. protected override void InitIDs ()
  1071. {
  1072. }
  1073. }
  1074. public class ServiceDescriptionWriterBase : XmlSerializationWriter
  1075. {
  1076. public void WriteTree (System.Web.Services.Description.ServiceDescription ob)
  1077. {
  1078. WriteStartDocument ();
  1079. TopLevelElement ();
  1080. WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  1081. }
  1082. void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1083. {
  1084. if (ob == null)
  1085. {
  1086. if (isNullable)
  1087. WriteNullTagLiteral(element, namesp);
  1088. return;
  1089. }
  1090. if (writeWrappingElem) {
  1091. WriteStartElement (element, namesp, ob);
  1092. }
  1093. if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
  1094. WriteAttribute ("name", "", ob.Name);
  1095. WriteAttribute ("targetNamespace", "", ob.TargetNamespace);
  1096. ServiceDescription.WriteExtensions (Writer, ob);
  1097. if (ob.Imports != null) {
  1098. for (int n59 = 0; n59 < ob.Imports.Count; n59++) {
  1099. WriteObject_Import (ob.Imports[n59], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1100. }
  1101. }
  1102. WriteObject_Types (ob.Types, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1103. if (ob.Messages != null) {
  1104. for (int n60 = 0; n60 < ob.Messages.Count; n60++) {
  1105. WriteObject_Message (ob.Messages[n60], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1106. }
  1107. }
  1108. if (ob.PortTypes != null) {
  1109. for (int n61 = 0; n61 < ob.PortTypes.Count; n61++) {
  1110. WriteObject_PortType (ob.PortTypes[n61], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1111. }
  1112. }
  1113. if (ob.Bindings != null) {
  1114. for (int n62 = 0; n62 < ob.Bindings.Count; n62++) {
  1115. WriteObject_Binding (ob.Bindings[n62], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1116. }
  1117. }
  1118. if (ob.Services != null) {
  1119. for (int n63 = 0; n63 < ob.Services.Count; n63++) {
  1120. WriteObject_Service (ob.Services[n63], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1121. }
  1122. }
  1123. if (ob.Documentation != "") {
  1124. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1125. }
  1126. if (writeWrappingElem) WriteEndElement (ob);
  1127. }
  1128. void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1129. {
  1130. if (ob == null)
  1131. {
  1132. if (isNullable)
  1133. WriteNullTagLiteral(element, namesp);
  1134. return;
  1135. }
  1136. if (writeWrappingElem) {
  1137. WriteStartElement (element, namesp, ob);
  1138. }
  1139. if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
  1140. WriteAttribute ("namespace", "", ob.Namespace);
  1141. WriteAttribute ("location", "", ob.Location);
  1142. if (ob.Documentation != "") {
  1143. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1144. }
  1145. if (writeWrappingElem) WriteEndElement (ob);
  1146. }
  1147. void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1148. {
  1149. if (ob == null)
  1150. {
  1151. if (isNullable)
  1152. WriteNullTagLiteral(element, namesp);
  1153. return;
  1154. }
  1155. if (writeWrappingElem) {
  1156. WriteStartElement (element, namesp, ob);
  1157. }
  1158. if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
  1159. ServiceDescription.WriteExtensions (Writer, ob);
  1160. if (ob.Schemas != null) {
  1161. for (int n64 = 0; n64 < ob.Schemas.Count; n64++) {
  1162. WriteObject_XmlSchema (ob.Schemas[n64], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
  1163. }
  1164. }
  1165. if (ob.Documentation != "") {
  1166. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1167. }
  1168. if (writeWrappingElem) WriteEndElement (ob);
  1169. }
  1170. void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1171. {
  1172. if (ob == null)
  1173. {
  1174. if (isNullable)
  1175. WriteNullTagLiteral(element, namesp);
  1176. return;
  1177. }
  1178. if (writeWrappingElem) {
  1179. WriteStartElement (element, namesp, ob);
  1180. }
  1181. if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
  1182. WriteAttribute ("name", "", ob.Name);
  1183. if (ob.Parts != null) {
  1184. for (int n65 = 0; n65 < ob.Parts.Count; n65++) {
  1185. WriteObject_MessagePart (ob.Parts[n65], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1186. }
  1187. }
  1188. if (ob.Documentation != "") {
  1189. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1190. }
  1191. if (writeWrappingElem) WriteEndElement (ob);
  1192. }
  1193. void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1194. {
  1195. if (ob == null)
  1196. {
  1197. if (isNullable)
  1198. WriteNullTagLiteral(element, namesp);
  1199. return;
  1200. }
  1201. if (writeWrappingElem) {
  1202. WriteStartElement (element, namesp, ob);
  1203. }
  1204. if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
  1205. WriteAttribute ("name", "", ob.Name);
  1206. if (ob.Operations != null) {
  1207. for (int n66 = 0; n66 < ob.Operations.Count; n66++) {
  1208. WriteObject_Operation (ob.Operations[n66], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1209. }
  1210. }
  1211. if (ob.Documentation != "") {
  1212. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1213. }
  1214. if (writeWrappingElem) WriteEndElement (ob);
  1215. }
  1216. void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1217. {
  1218. if (ob == null)
  1219. {
  1220. if (isNullable)
  1221. WriteNullTagLiteral(element, namesp);
  1222. return;
  1223. }
  1224. if (writeWrappingElem) {
  1225. WriteStartElement (element, namesp, ob);
  1226. }
  1227. if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
  1228. WriteAttribute ("name", "", ob.Name);
  1229. WriteAttribute ("type", "", FromXmlQualifiedName (ob.Type));
  1230. ServiceDescription.WriteExtensions (Writer, ob);
  1231. if (ob.Operations != null) {
  1232. for (int n67 = 0; n67 < ob.Operations.Count; n67++) {
  1233. WriteObject_OperationBinding (ob.Operations[n67], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1234. }
  1235. }
  1236. if (ob.Documentation != "") {
  1237. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1238. }
  1239. if (writeWrappingElem) WriteEndElement (ob);
  1240. }
  1241. void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1242. {
  1243. if (ob == null)
  1244. {
  1245. if (isNullable)
  1246. WriteNullTagLiteral(element, namesp);
  1247. return;
  1248. }
  1249. if (writeWrappingElem) {
  1250. WriteStartElement (element, namesp, ob);
  1251. }
  1252. if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
  1253. WriteAttribute ("name", "", ob.Name);
  1254. if (ob.Ports != null) {
  1255. for (int n68 = 0; n68 < ob.Ports.Count; n68++) {
  1256. WriteObject_Port (ob.Ports[n68], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1257. }
  1258. }
  1259. if (ob.Documentation != "") {
  1260. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1261. }
  1262. if (writeWrappingElem) WriteEndElement (ob);
  1263. }
  1264. void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1265. {
  1266. ob.Write (Writer);
  1267. }
  1268. void WriteObject_MessagePart (System.Web.Services.Description.MessagePart ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1269. {
  1270. if (ob == null)
  1271. {
  1272. if (isNullable)
  1273. WriteNullTagLiteral(element, namesp);
  1274. return;
  1275. }
  1276. if (writeWrappingElem) {
  1277. WriteStartElement (element, namesp, ob);
  1278. }
  1279. if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
  1280. WriteAttribute ("name", "", ob.Name);
  1281. WriteAttribute ("element", "", FromXmlQualifiedName (ob.Element));
  1282. WriteAttribute ("type", "", FromXmlQualifiedName (ob.Type));
  1283. if (ob.Documentation != "") {
  1284. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1285. }
  1286. if (writeWrappingElem) WriteEndElement (ob);
  1287. }
  1288. void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1289. {
  1290. if (ob == null)
  1291. {
  1292. if (isNullable)
  1293. WriteNullTagLiteral(element, namesp);
  1294. return;
  1295. }
  1296. if (writeWrappingElem) {
  1297. WriteStartElement (element, namesp, ob);
  1298. }
  1299. if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
  1300. WriteAttribute ("name", "", ob.Name);
  1301. if (ob.ParameterOrderString != "") {
  1302. WriteAttribute ("parameterOrder", "", ob.ParameterOrderString);
  1303. }
  1304. if (ob.Faults != null) {
  1305. for (int n69 = 0; n69 < ob.Faults.Count; n69++) {
  1306. WriteObject_OperationFault (ob.Faults[n69], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1307. }
  1308. }
  1309. if (ob.Messages != null) {
  1310. for (int n70 = 0; n70 < ob.Messages.Count; n70++) {
  1311. if (ob.Messages[n70] is System.Web.Services.Description.OperationInput) {
  1312. WriteObject_OperationInput (((System.Web.Services.Description.OperationInput) ob.Messages[n70]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1313. }
  1314. else if (ob.Messages[n70] is System.Web.Services.Description.OperationOutput) {
  1315. WriteObject_OperationOutput (((System.Web.Services.Description.OperationOutput) ob.Messages[n70]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1316. }
  1317. else if (ob.Messages[n70] != null) throw CreateUnknownTypeException (ob.Messages[n70]);
  1318. }
  1319. }
  1320. if (ob.Documentation != "") {
  1321. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1322. }
  1323. if (writeWrappingElem) WriteEndElement (ob);
  1324. }
  1325. void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1326. {
  1327. if (ob == null)
  1328. {
  1329. if (isNullable)
  1330. WriteNullTagLiteral(element, namesp);
  1331. return;
  1332. }
  1333. if (writeWrappingElem) {
  1334. WriteStartElement (element, namesp, ob);
  1335. }
  1336. if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
  1337. WriteAttribute ("name", "", ob.Name);
  1338. ServiceDescription.WriteExtensions (Writer, ob);
  1339. if (ob.Faults != null) {
  1340. for (int n71 = 0; n71 < ob.Faults.Count; n71++) {
  1341. WriteObject_FaultBinding (ob.Faults[n71], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1342. }
  1343. }
  1344. WriteObject_InputBinding (ob.Input, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1345. WriteObject_OutputBinding (ob.Output, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  1346. if (ob.Documentation != "") {
  1347. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1348. }
  1349. if (writeWrappingElem) WriteEndElement (ob);
  1350. }
  1351. void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1352. {
  1353. if (ob == null)
  1354. {
  1355. if (isNullable)
  1356. WriteNullTagLiteral(element, namesp);
  1357. return;
  1358. }
  1359. if (writeWrappingElem) {
  1360. WriteStartElement (element, namesp, ob);
  1361. }
  1362. if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
  1363. WriteAttribute ("name", "", ob.Name);
  1364. WriteAttribute ("binding", "", FromXmlQualifiedName (ob.Binding));
  1365. ServiceDescription.WriteExtensions (Writer, ob);
  1366. if (ob.Documentation != "") {
  1367. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1368. }
  1369. if (writeWrappingElem) WriteEndElement (ob);
  1370. }
  1371. void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1372. {
  1373. if (ob == null)
  1374. {
  1375. if (isNullable)
  1376. WriteNullTagLiteral(element, namesp);
  1377. return;
  1378. }
  1379. if (writeWrappingElem) {
  1380. WriteStartElement (element, namesp, ob);
  1381. }
  1382. if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
  1383. WriteAttribute ("name", "", ob.Name);
  1384. WriteAttribute ("message", "", FromXmlQualifiedName (ob.Message));
  1385. if (ob.Documentation != "") {
  1386. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1387. }
  1388. if (writeWrappingElem) WriteEndElement (ob);
  1389. }
  1390. void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1391. {
  1392. if (ob == null)
  1393. {
  1394. if (isNullable)
  1395. WriteNullTagLiteral(element, namesp);
  1396. return;
  1397. }
  1398. if (writeWrappingElem) {
  1399. WriteStartElement (element, namesp, ob);
  1400. }
  1401. if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
  1402. WriteAttribute ("name", "", ob.Name);
  1403. WriteAttribute ("message", "", FromXmlQualifiedName (ob.Message));
  1404. if (ob.Documentation != "") {
  1405. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1406. }
  1407. if (writeWrappingElem) WriteEndElement (ob);
  1408. }
  1409. void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1410. {
  1411. if (ob == null)
  1412. {
  1413. if (isNullable)
  1414. WriteNullTagLiteral(element, namesp);
  1415. return;
  1416. }
  1417. if (writeWrappingElem) {
  1418. WriteStartElement (element, namesp, ob);
  1419. }
  1420. if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
  1421. WriteAttribute ("name", "", ob.Name);
  1422. WriteAttribute ("message", "", FromXmlQualifiedName (ob.Message));
  1423. if (ob.Documentation != "") {
  1424. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1425. }
  1426. if (writeWrappingElem) WriteEndElement (ob);
  1427. }
  1428. void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1429. {
  1430. if (ob == null)
  1431. {
  1432. if (isNullable)
  1433. WriteNullTagLiteral(element, namesp);
  1434. return;
  1435. }
  1436. if (writeWrappingElem) {
  1437. WriteStartElement (element, namesp, ob);
  1438. }
  1439. if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
  1440. if (ob.Name != "") {
  1441. WriteAttribute ("name", "", ob.Name);
  1442. }
  1443. ServiceDescription.WriteExtensions (Writer, ob);
  1444. if (ob.Documentation != "") {
  1445. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1446. }
  1447. if (writeWrappingElem) WriteEndElement (ob);
  1448. }
  1449. void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1450. {
  1451. if (ob == null)
  1452. {
  1453. if (isNullable)
  1454. WriteNullTagLiteral(element, namesp);
  1455. return;
  1456. }
  1457. if (writeWrappingElem) {
  1458. WriteStartElement (element, namesp, ob);
  1459. }
  1460. if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
  1461. if (ob.Name != "") {
  1462. WriteAttribute ("name", "", ob.Name);
  1463. }
  1464. ServiceDescription.WriteExtensions (Writer, ob);
  1465. if (ob.Documentation != "") {
  1466. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1467. }
  1468. if (writeWrappingElem) WriteEndElement (ob);
  1469. }
  1470. void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  1471. {
  1472. if (ob == null)
  1473. {
  1474. if (isNullable)
  1475. WriteNullTagLiteral(element, namesp);
  1476. return;
  1477. }
  1478. if (writeWrappingElem) {
  1479. WriteStartElement (element, namesp, ob);
  1480. }
  1481. if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
  1482. if (ob.Name != "") {
  1483. WriteAttribute ("name", "", ob.Name);
  1484. }
  1485. ServiceDescription.WriteExtensions (Writer, ob);
  1486. if (ob.Documentation != "") {
  1487. WriteElementString ("documentation", "http://schemas.xmlsoap.org/wsdl/", ob.Documentation);
  1488. }
  1489. if (writeWrappingElem) WriteEndElement (ob);
  1490. }
  1491. protected override void InitCallbacks ()
  1492. {
  1493. }
  1494. }
  1495. }