ServiceDescriptionSerializerBase.cs 50 KB

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