mumboe-soap4r 1.5.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (443) hide show
  1. data/bin/wsdl2ruby.rb +137 -0
  2. data/bin/xsd2ruby.rb +90 -0
  3. data/lib/soap/attachment.rb +108 -0
  4. data/lib/soap/attrproxy.rb +34 -0
  5. data/lib/soap/baseData.rb +1094 -0
  6. data/lib/soap/element.rb +277 -0
  7. data/lib/soap/encodingstyle/aspDotNetHandler.rb +207 -0
  8. data/lib/soap/encodingstyle/handler.rb +120 -0
  9. data/lib/soap/encodingstyle/literalHandler.rb +195 -0
  10. data/lib/soap/encodingstyle/soapHandler.rb +559 -0
  11. data/lib/soap/filter.rb +13 -0
  12. data/lib/soap/filter/filterchain.rb +51 -0
  13. data/lib/soap/filter/handler.rb +31 -0
  14. data/lib/soap/filter/streamhandler.rb +29 -0
  15. data/lib/soap/generator.rb +299 -0
  16. data/lib/soap/header/handler.rb +61 -0
  17. data/lib/soap/header/handlerset.rb +70 -0
  18. data/lib/soap/header/mappinghandler.rb +47 -0
  19. data/lib/soap/header/simplehandler.rb +44 -0
  20. data/lib/soap/httpconfigloader.rb +139 -0
  21. data/lib/soap/mapping.rb +12 -0
  22. data/lib/soap/mapping/encodedregistry.rb +537 -0
  23. data/lib/soap/mapping/factory.rb +388 -0
  24. data/lib/soap/mapping/literalregistry.rb +391 -0
  25. data/lib/soap/mapping/mapping.rb +577 -0
  26. data/lib/soap/mapping/registry.rb +295 -0
  27. data/lib/soap/mapping/rubytypeFactory.rb +446 -0
  28. data/lib/soap/mapping/schemadefinition.rb +170 -0
  29. data/lib/soap/mapping/typeMap.rb +106 -0
  30. data/lib/soap/mapping/wsdlencodedregistry.rb +211 -0
  31. data/lib/soap/mapping/wsdlliteralregistry.rb +248 -0
  32. data/lib/soap/marshal.rb +59 -0
  33. data/lib/soap/mimemessage.rb +241 -0
  34. data/lib/soap/nestedexception.rb +42 -0
  35. data/lib/soap/netHttpClient.rb +241 -0
  36. data/lib/soap/ns.rb +34 -0
  37. data/lib/soap/parser.rb +252 -0
  38. data/lib/soap/processor.rb +66 -0
  39. data/lib/soap/property.rb +333 -0
  40. data/lib/soap/proxy.rb +14 -0
  41. data/lib/soap/rpc/cgistub.rb +247 -0
  42. data/lib/soap/rpc/driver.rb +221 -0
  43. data/lib/soap/rpc/element.rb +374 -0
  44. data/lib/soap/rpc/element.rb.orig +374 -0
  45. data/lib/soap/rpc/httpserver.rb +142 -0
  46. data/lib/soap/rpc/methodDef.rb +68 -0
  47. data/lib/soap/rpc/proxy.rb +572 -0
  48. data/lib/soap/rpc/router.rb +662 -0
  49. data/lib/soap/rpc/rpc.rb +25 -0
  50. data/lib/soap/rpc/soaplet.rb +200 -0
  51. data/lib/soap/rpc/standaloneServer.rb +43 -0
  52. data/lib/soap/soap.rb +151 -0
  53. data/lib/soap/streamHandler.rb +301 -0
  54. data/lib/soap/wsdlDriver.rb +164 -0
  55. data/lib/wsdl/binding.rb +65 -0
  56. data/lib/wsdl/data.rb +64 -0
  57. data/lib/wsdl/definitions.rb +236 -0
  58. data/lib/wsdl/documentation.rb +32 -0
  59. data/lib/wsdl/import.rb +80 -0
  60. data/lib/wsdl/importer.rb +38 -0
  61. data/lib/wsdl/info.rb +50 -0
  62. data/lib/wsdl/message.rb +54 -0
  63. data/lib/wsdl/operation.rb +151 -0
  64. data/lib/wsdl/operationBinding.rb +240 -0
  65. data/lib/wsdl/param.rb +93 -0
  66. data/lib/wsdl/parser.rb +164 -0
  67. data/lib/wsdl/part.rb +52 -0
  68. data/lib/wsdl/port.rb +66 -0
  69. data/lib/wsdl/portType.rb +75 -0
  70. data/lib/wsdl/service.rb +61 -0
  71. data/lib/wsdl/soap/address.rb +40 -0
  72. data/lib/wsdl/soap/binding.rb +49 -0
  73. data/lib/wsdl/soap/body.rb +58 -0
  74. data/lib/wsdl/soap/cgiStubCreator.rb +92 -0
  75. data/lib/wsdl/soap/classDefCreator.rb +433 -0
  76. data/lib/wsdl/soap/classDefCreatorSupport.rb +240 -0
  77. data/lib/wsdl/soap/classNameCreator.rb +54 -0
  78. data/lib/wsdl/soap/clientSkeltonCreator.rb +104 -0
  79. data/lib/wsdl/soap/complexType.rb +173 -0
  80. data/lib/wsdl/soap/data.rb +42 -0
  81. data/lib/wsdl/soap/definitions.rb +200 -0
  82. data/lib/wsdl/soap/driverCreator.rb +118 -0
  83. data/lib/wsdl/soap/element.rb +33 -0
  84. data/lib/wsdl/soap/encodedMappingRegistryCreator.rb +73 -0
  85. data/lib/wsdl/soap/fault.rb +56 -0
  86. data/lib/wsdl/soap/header.rb +86 -0
  87. data/lib/wsdl/soap/headerfault.rb +56 -0
  88. data/lib/wsdl/soap/literalMappingRegistryCreator.rb +115 -0
  89. data/lib/wsdl/soap/mappingRegistryCreator.rb +58 -0
  90. data/lib/wsdl/soap/mappingRegistryCreatorSupport.rb +376 -0
  91. data/lib/wsdl/soap/methodDefCreator.rb +199 -0
  92. data/lib/wsdl/soap/operation.rb +112 -0
  93. data/lib/wsdl/soap/servantSkeltonCreator.rb +89 -0
  94. data/lib/wsdl/soap/servletStubCreator.rb +104 -0
  95. data/lib/wsdl/soap/standaloneServerStubCreator.rb +100 -0
  96. data/lib/wsdl/soap/wsdl2ruby.rb +217 -0
  97. data/lib/wsdl/types.rb +44 -0
  98. data/lib/wsdl/wsdl.rb +24 -0
  99. data/lib/wsdl/xmlSchema/all.rb +24 -0
  100. data/lib/wsdl/xmlSchema/annotation.rb +34 -0
  101. data/lib/wsdl/xmlSchema/any.rb +61 -0
  102. data/lib/wsdl/xmlSchema/anyAttribute.rb +48 -0
  103. data/lib/wsdl/xmlSchema/attribute.rb +104 -0
  104. data/lib/wsdl/xmlSchema/attributeGroup.rb +68 -0
  105. data/lib/wsdl/xmlSchema/choice.rb +58 -0
  106. data/lib/wsdl/xmlSchema/complexContent.rb +97 -0
  107. data/lib/wsdl/xmlSchema/complexExtension.rb +119 -0
  108. data/lib/wsdl/xmlSchema/complexRestriction.rb +104 -0
  109. data/lib/wsdl/xmlSchema/complexType.rb +193 -0
  110. data/lib/wsdl/xmlSchema/content.rb +95 -0
  111. data/lib/wsdl/xmlSchema/data.rb +116 -0
  112. data/lib/wsdl/xmlSchema/element.rb +153 -0
  113. data/lib/wsdl/xmlSchema/enumeration.rb +36 -0
  114. data/lib/wsdl/xmlSchema/fractiondigits.rb +37 -0
  115. data/lib/wsdl/xmlSchema/group.rb +100 -0
  116. data/lib/wsdl/xmlSchema/import.rb +53 -0
  117. data/lib/wsdl/xmlSchema/importHandler.rb +45 -0
  118. data/lib/wsdl/xmlSchema/importer.rb +102 -0
  119. data/lib/wsdl/xmlSchema/include.rb +48 -0
  120. data/lib/wsdl/xmlSchema/length.rb +37 -0
  121. data/lib/wsdl/xmlSchema/list.rb +48 -0
  122. data/lib/wsdl/xmlSchema/maxexclusive.rb +37 -0
  123. data/lib/wsdl/xmlSchema/maxinclusive.rb +37 -0
  124. data/lib/wsdl/xmlSchema/maxlength.rb +37 -0
  125. data/lib/wsdl/xmlSchema/minexclusive.rb +37 -0
  126. data/lib/wsdl/xmlSchema/mininclusive.rb +37 -0
  127. data/lib/wsdl/xmlSchema/minlength.rb +37 -0
  128. data/lib/wsdl/xmlSchema/parser.rb +167 -0
  129. data/lib/wsdl/xmlSchema/pattern.rb +36 -0
  130. data/lib/wsdl/xmlSchema/ref.rb +33 -0
  131. data/lib/wsdl/xmlSchema/schema.rb +178 -0
  132. data/lib/wsdl/xmlSchema/sequence.rb +54 -0
  133. data/lib/wsdl/xmlSchema/simpleContent.rb +69 -0
  134. data/lib/wsdl/xmlSchema/simpleExtension.rb +62 -0
  135. data/lib/wsdl/xmlSchema/simpleRestriction.rb +132 -0
  136. data/lib/wsdl/xmlSchema/simpleType.rb +87 -0
  137. data/lib/wsdl/xmlSchema/totaldigits.rb +37 -0
  138. data/lib/wsdl/xmlSchema/union.rb +35 -0
  139. data/lib/wsdl/xmlSchema/unique.rb +34 -0
  140. data/lib/wsdl/xmlSchema/whitespace.rb +37 -0
  141. data/lib/wsdl/xmlSchema/xsd2ruby.rb +174 -0
  142. data/lib/xsd/charset.rb +188 -0
  143. data/lib/xsd/codegen.rb +12 -0
  144. data/lib/xsd/codegen/classdef.rb +208 -0
  145. data/lib/xsd/codegen/commentdef.rb +34 -0
  146. data/lib/xsd/codegen/gensupport.rb +273 -0
  147. data/lib/xsd/codegen/methoddef.rb +70 -0
  148. data/lib/xsd/codegen/moduledef.rb +208 -0
  149. data/lib/xsd/datatypes.rb +1466 -0
  150. data/lib/xsd/datatypes1999.rb +20 -0
  151. data/lib/xsd/iconvcharset.rb +33 -0
  152. data/lib/xsd/mapping.rb +68 -0
  153. data/lib/xsd/namedelements.rb +132 -0
  154. data/lib/xsd/ns.rb +182 -0
  155. data/lib/xsd/qname.rb +79 -0
  156. data/lib/xsd/xmlparser.rb +76 -0
  157. data/lib/xsd/xmlparser.rb.orig +76 -0
  158. data/lib/xsd/xmlparser/libxmlparser.rb +119 -0
  159. data/lib/xsd/xmlparser/parser.rb +100 -0
  160. data/lib/xsd/xmlparser/rexmlparser.rb +58 -0
  161. data/lib/xsd/xmlparser/xmlparser.rb +50 -0
  162. data/lib/xsd/xmlparser/xmlscanner.rb +149 -0
  163. data/test/16runner.rb +68 -0
  164. data/test/interopR2/README.txt +2 -0
  165. data/test/interopR2/SOAPBuildersInterop_R2.wsdl +461 -0
  166. data/test/interopR2/SOAPBuildersInterop_R2GrB.wsdl +19 -0
  167. data/test/interopR2/base.rb +288 -0
  168. data/test/interopR2/client.NetRemoting.rb +17 -0
  169. data/test/interopR2/client.rb +1234 -0
  170. data/test/interopR2/client4S4C.rb +15 -0
  171. data/test/interopR2/client4S4C2.rb +14 -0
  172. data/test/interopR2/clientASP.NET.rb +17 -0
  173. data/test/interopR2/clientApacheAxis.rb +16 -0
  174. data/test/interopR2/clientApacheSOAP.rb +17 -0
  175. data/test/interopR2/clientBEAWebLogic.rb +17 -0
  176. data/test/interopR2/clientBase.rb +1967 -0
  177. data/test/interopR2/clientCapeConnect.rb +18 -0
  178. data/test/interopR2/clientDelphi.rb +19 -0
  179. data/test/interopR2/clientEasySoap.rb +14 -0
  180. data/test/interopR2/clientFrontier.rb +25 -0
  181. data/test/interopR2/clientGLUE.rb +32 -0
  182. data/test/interopR2/clientHP.rb +13 -0
  183. data/test/interopR2/clientJAX-RPC.rb +19 -0
  184. data/test/interopR2/clientJSOAP.rb +14 -0
  185. data/test/interopR2/clientKafkaXSLT.rb +15 -0
  186. data/test/interopR2/clientMSSOAPToolkit2.0.rb +17 -0
  187. data/test/interopR2/clientMSSOAPToolkit3.0.rb +17 -0
  188. data/test/interopR2/clientNuSOAP.rb +19 -0
  189. data/test/interopR2/clientNuWave.rb +15 -0
  190. data/test/interopR2/clientOpenLink.rb +15 -0
  191. data/test/interopR2/clientOracle.rb +15 -0
  192. data/test/interopR2/clientPEAR.rb +18 -0
  193. data/test/interopR2/clientPhalanx.rb +18 -0
  194. data/test/interopR2/clientSIMACE.rb +18 -0
  195. data/test/interopR2/clientSOAP4R.rb +18 -0
  196. data/test/interopR2/clientSOAP__Lite.rb +14 -0
  197. data/test/interopR2/clientSQLData.rb +18 -0
  198. data/test/interopR2/clientSilverStream.rb +17 -0
  199. data/test/interopR2/clientSpray2001.rb +17 -0
  200. data/test/interopR2/clientSun.rb +19 -0
  201. data/test/interopR2/clientVWOpentalkSoap.rb +19 -0
  202. data/test/interopR2/clientWASP.rb +19 -0
  203. data/test/interopR2/clientWASPC.rb +18 -0
  204. data/test/interopR2/clientWebMethods.rb +15 -0
  205. data/test/interopR2/clientWhiteMesa.rb +28 -0
  206. data/test/interopR2/clientWingfoot.rb +15 -0
  207. data/test/interopR2/clientXMLBus.rb +19 -0
  208. data/test/interopR2/clientXMLRPC-EPI.rb +17 -0
  209. data/test/interopR2/clientXSOAP.rb +14 -0
  210. data/test/interopR2/clientZSI.rb +19 -0
  211. data/test/interopR2/clienteSOAP.rb +18 -0
  212. data/test/interopR2/clientgSOAP.rb +18 -0
  213. data/test/interopR2/clientkSOAP.rb +17 -0
  214. data/test/interopR2/iSimonReg.rb +112 -0
  215. data/test/interopR2/interopResultBase.rb +114 -0
  216. data/test/interopR2/interopService.rb +247 -0
  217. data/test/interopR2/rwikiInteropService.rb +105 -0
  218. data/test/interopR2/server.cgi +270 -0
  219. data/test/interopR2/server.rb +275 -0
  220. data/test/interopR2/simonReg.rb +123 -0
  221. data/test/interopR2/test.sh +49 -0
  222. data/test/interopR4/client.rb +112 -0
  223. data/test/results +4810 -0
  224. data/test/runner.rb +7 -0
  225. data/test/sm11/classDef.rb +156 -0
  226. data/test/sm11/client.rb +542 -0
  227. data/test/sm11/driver.rb +183 -0
  228. data/test/sm11/servant.rb +1067 -0
  229. data/test/sm11/server.rb +25 -0
  230. data/test/soap/asp.net/hello.wsdl +96 -0
  231. data/test/soap/asp.net/test_aspdotnet.rb +123 -0
  232. data/test/soap/auth/htdigest +2 -0
  233. data/test/soap/auth/htpasswd +2 -0
  234. data/test/soap/auth/test_basic.rb +117 -0
  235. data/test/soap/auth/test_digest.rb +118 -0
  236. data/test/soap/calc/calc.rb +17 -0
  237. data/test/soap/calc/calc2.rb +29 -0
  238. data/test/soap/calc/server.cgi +13 -0
  239. data/test/soap/calc/server.rb +17 -0
  240. data/test/soap/calc/server2.rb +20 -0
  241. data/test/soap/calc/test_calc.rb +51 -0
  242. data/test/soap/calc/test_calc2.rb +55 -0
  243. data/test/soap/calc/test_calc_cgi.rb +71 -0
  244. data/test/soap/case/test_mapping.rb +57 -0
  245. data/test/soap/fault/test_customfault.rb +60 -0
  246. data/test/soap/fault/test_fault.rb +46 -0
  247. data/test/soap/fault/test_soaparray.rb +35 -0
  248. data/test/soap/filter/test_filter.rb +146 -0
  249. data/test/soap/header/server.cgi +119 -0
  250. data/test/soap/header/session.pstoredb +0 -0
  251. data/test/soap/header/test_authheader.rb +240 -0
  252. data/test/soap/header/test_authheader_cgi.rb +121 -0
  253. data/test/soap/header/test_simplehandler.rb +116 -0
  254. data/test/soap/helloworld/hw_s.rb +16 -0
  255. data/test/soap/helloworld/test_helloworld.rb +43 -0
  256. data/test/soap/htpasswd +2 -0
  257. data/test/soap/literalArrayMapping/amazonEc.rb +4778 -0
  258. data/test/soap/literalArrayMapping/amazonEcDriver.rb +172 -0
  259. data/test/soap/literalArrayMapping/amazonresponse.xml +100 -0
  260. data/test/soap/literalArrayMapping/test_definedarray.rb +34 -0
  261. data/test/soap/marshal/marshaltestlib.rb +494 -0
  262. data/test/soap/marshal/test_digraph.rb +56 -0
  263. data/test/soap/marshal/test_marshal.rb +26 -0
  264. data/test/soap/marshal/test_struct.rb +47 -0
  265. data/test/soap/ssl/README +1 -0
  266. data/test/soap/ssl/ca.cert +23 -0
  267. data/test/soap/ssl/client.cert +19 -0
  268. data/test/soap/ssl/client.key +15 -0
  269. data/test/soap/ssl/server.cert +19 -0
  270. data/test/soap/ssl/server.key +15 -0
  271. data/test/soap/ssl/sslsvr.rb +57 -0
  272. data/test/soap/ssl/subca.cert +21 -0
  273. data/test/soap/ssl/test_ssl.rb +235 -0
  274. data/test/soap/struct/test_struct.rb +70 -0
  275. data/test/soap/styleuse/client.rb +20 -0
  276. data/test/soap/styleuse/server.rb +86 -0
  277. data/test/soap/swa/test_file.rb +75 -0
  278. data/test/soap/test_basetype.rb +1090 -0
  279. data/test/soap/test_cookie.rb +112 -0
  280. data/test/soap/test_custom_ns.rb +105 -0
  281. data/test/soap/test_custommap.rb +110 -0
  282. data/test/soap/test_empty.rb +105 -0
  283. data/test/soap/test_envelopenamespace.rb +85 -0
  284. data/test/soap/test_extraattr.rb +54 -0
  285. data/test/soap/test_generator.rb +27 -0
  286. data/test/soap/test_httpconfigloader.rb +71 -0
  287. data/test/soap/test_mapping.rb +131 -0
  288. data/test/soap/test_nestedexception.rb +56 -0
  289. data/test/soap/test_nil.rb +57 -0
  290. data/test/soap/test_no_indent.rb +88 -0
  291. data/test/soap/test_property.rb +428 -0
  292. data/test/soap/test_response_as_xml.rb +117 -0
  293. data/test/soap/test_soapelement.rb +138 -0
  294. data/test/soap/test_streamhandler.rb +270 -0
  295. data/test/soap/test_styleuse.rb +326 -0
  296. data/test/soap/wsdlDriver/README.txt +2 -0
  297. data/test/soap/wsdlDriver/calc.wsdl +126 -0
  298. data/test/soap/wsdlDriver/document.wsdl +54 -0
  299. data/test/soap/wsdlDriver/echo_version.rb +29 -0
  300. data/test/soap/wsdlDriver/simpletype.wsdl +63 -0
  301. data/test/soap/wsdlDriver/test_calc.rb +71 -0
  302. data/test/soap/wsdlDriver/test_document.rb +71 -0
  303. data/test/soap/wsdlDriver/test_simpletype.rb +80 -0
  304. data/test/testutil.rb +54 -0
  305. data/test/wsdl/abstract/abstract.wsdl +176 -0
  306. data/test/wsdl/abstract/test_abstract.rb +159 -0
  307. data/test/wsdl/anonymous/expectedClassDef.rb +128 -0
  308. data/test/wsdl/anonymous/expectedDriver.rb +59 -0
  309. data/test/wsdl/anonymous/expectedMappingRegistry.rb +176 -0
  310. data/test/wsdl/anonymous/lp.wsdl +147 -0
  311. data/test/wsdl/anonymous/test_anonymous.rb +130 -0
  312. data/test/wsdl/any/any.wsdl +114 -0
  313. data/test/wsdl/any/expectedDriver.rb +68 -0
  314. data/test/wsdl/any/expectedEcho.rb +57 -0
  315. data/test/wsdl/any/expectedMappingRegistry.rb +63 -0
  316. data/test/wsdl/any/expectedService.rb +69 -0
  317. data/test/wsdl/any/test_any.rb +193 -0
  318. data/test/wsdl/axisArray/axisArray.wsdl +87 -0
  319. data/test/wsdl/axisArray/test_axisarray.rb +124 -0
  320. data/test/wsdl/choice/choice.wsdl +167 -0
  321. data/test/wsdl/choice/test_choice.rb +310 -0
  322. data/test/wsdl/complexcontent/complexContent.wsdl +83 -0
  323. data/test/wsdl/complexcontent/test_echo.rb +90 -0
  324. data/test/wsdl/datetime/DatetimeService.rb +44 -0
  325. data/test/wsdl/datetime/datetime.rb +0 -0
  326. data/test/wsdl/datetime/datetime.wsdl +45 -0
  327. data/test/wsdl/datetime/datetimeServant.rb +22 -0
  328. data/test/wsdl/datetime/test_datetime.rb +86 -0
  329. data/test/wsdl/document/array/double.wsdl +161 -0
  330. data/test/wsdl/document/array/test_array.rb +201 -0
  331. data/test/wsdl/document/document.wsdl +76 -0
  332. data/test/wsdl/document/number.wsdl +54 -0
  333. data/test/wsdl/document/ping_nosoapaction.wsdl +66 -0
  334. data/test/wsdl/document/test_nosoapaction.rb +102 -0
  335. data/test/wsdl/document/test_number.rb +92 -0
  336. data/test/wsdl/document/test_rpc.rb +355 -0
  337. data/test/wsdl/emptycomplextype.wsdl +31 -0
  338. data/test/wsdl/fault/fault.wsdl +79 -0
  339. data/test/wsdl/fault/multifault.wsdl +96 -0
  340. data/test/wsdl/fault/test_fault.rb +119 -0
  341. data/test/wsdl/fault/test_multifault.rb +134 -0
  342. data/test/wsdl/group/expectedClassdef.rb +58 -0
  343. data/test/wsdl/group/expectedDriver.rb +51 -0
  344. data/test/wsdl/group/expectedMappingRegistry.rb +67 -0
  345. data/test/wsdl/group/group.wsdl +88 -0
  346. data/test/wsdl/group/test_rpc.rb +145 -0
  347. data/test/wsdl/list/list.wsdl +93 -0
  348. data/test/wsdl/list/test_list.rb +124 -0
  349. data/test/wsdl/map/map.wsdl +92 -0
  350. data/test/wsdl/map/map.xml +43 -0
  351. data/test/wsdl/map/test_map.rb +99 -0
  352. data/test/wsdl/marshal/Person.rb +1 -0
  353. data/test/wsdl/marshal/person.wsdl +21 -0
  354. data/test/wsdl/marshal/person_org.rb +23 -0
  355. data/test/wsdl/marshal/test_wsdlmarshal.rb +76 -0
  356. data/test/wsdl/multiplefault.wsdl +75 -0
  357. data/test/wsdl/oneway/oneway.wsdl +36 -0
  358. data/test/wsdl/oneway/test_oneway.rb +108 -0
  359. data/test/wsdl/overload/expectedClient.rb +37 -0
  360. data/test/wsdl/overload/expectedDriver.rb +61 -0
  361. data/test/wsdl/overload/expectedServant.rb +35 -0
  362. data/test/wsdl/overload/overload.wsdl +70 -0
  363. data/test/wsdl/overload/test_overload.rb +131 -0
  364. data/test/wsdl/qualified/lp.wsdl +47 -0
  365. data/test/wsdl/qualified/lp.xsd +26 -0
  366. data/test/wsdl/qualified/np.wsdl +51 -0
  367. data/test/wsdl/qualified/test_qualified.rb +137 -0
  368. data/test/wsdl/qualified/test_unqualified.rb +138 -0
  369. data/test/wsdl/raa/RAAService.rb +125 -0
  370. data/test/wsdl/raa/README.txt +8 -0
  371. data/test/wsdl/raa/expectedClassDef.rb +100 -0
  372. data/test/wsdl/raa/expectedDriver.rb +96 -0
  373. data/test/wsdl/raa/expectedMappingRegistry.rb +121 -0
  374. data/test/wsdl/raa/raa.wsdl +264 -0
  375. data/test/wsdl/raa/test_raa.rb +126 -0
  376. data/test/wsdl/ref/expectedDriver.rb +51 -0
  377. data/test/wsdl/ref/expectedProduct.rb +243 -0
  378. data/test/wsdl/ref/product.wsdl +147 -0
  379. data/test/wsdl/ref/test_ref.rb +268 -0
  380. data/test/wsdl/rpc/rpc.wsdl +109 -0
  381. data/test/wsdl/rpc/test-rpc-lit.wsdl +371 -0
  382. data/test/wsdl/rpc/test_rpc.rb +176 -0
  383. data/test/wsdl/rpc/test_rpc_lit.rb +470 -0
  384. data/test/wsdl/simplecontent/simplecontent.wsdl +84 -0
  385. data/test/wsdl/simplecontent/test_simplecontent.rb +102 -0
  386. data/test/wsdl/simpletype/rpc/echo_version.rb +1 -0
  387. data/test/wsdl/simpletype/rpc/echo_versionDriver.rb +10 -0
  388. data/test/wsdl/simpletype/rpc/echo_versionMappingRegistry.rb +4 -0
  389. data/test/wsdl/simpletype/rpc/echo_versionServant.rb +3 -0
  390. data/test/wsdl/simpletype/rpc/echo_version_service.rb +3 -0
  391. data/test/wsdl/simpletype/rpc/echo_version_serviceClient.rb +34 -0
  392. data/test/wsdl/simpletype/rpc/expectedClient.rb +34 -0
  393. data/test/wsdl/simpletype/rpc/expectedDriver.rb +58 -0
  394. data/test/wsdl/simpletype/rpc/expectedEchoVersion.rb +36 -0
  395. data/test/wsdl/simpletype/rpc/expectedMappingRegistry.rb +57 -0
  396. data/test/wsdl/simpletype/rpc/expectedServant.rb +32 -0
  397. data/test/wsdl/simpletype/rpc/expectedService.rb +55 -0
  398. data/test/wsdl/simpletype/rpc/rpc.wsdl +98 -0
  399. data/test/wsdl/simpletype/rpc/test_rpc.rb +52 -0
  400. data/test/wsdl/simpletype/simpletype.wsdl +114 -0
  401. data/test/wsdl/simpletype/test_simpletype.rb +92 -0
  402. data/test/wsdl/soap/soapbodyparts.wsdl +103 -0
  403. data/test/wsdl/soap/test_soapbodyparts.rb +79 -0
  404. data/test/wsdl/soap/wsdl2ruby/echo_version.rb +1 -0
  405. data/test/wsdl/soap/wsdl2ruby/echo_versionDriver.rb +10 -0
  406. data/test/wsdl/soap/wsdl2ruby/echo_versionMappingRegistry.rb +4 -0
  407. data/test/wsdl/soap/wsdl2ruby/echo_versionServant.rb +3 -0
  408. data/test/wsdl/soap/wsdl2ruby/echo_version_service.cgi +3 -0
  409. data/test/wsdl/soap/wsdl2ruby/echo_version_service.rb +7 -0
  410. data/test/wsdl/soap/wsdl2ruby/echo_version_serviceClient.rb +34 -0
  411. data/test/wsdl/soap/wsdl2ruby/expectedClassdef.rb +21 -0
  412. data/test/wsdl/soap/wsdl2ruby/expectedClient.rb +34 -0
  413. data/test/wsdl/soap/wsdl2ruby/expectedDriver.rb +58 -0
  414. data/test/wsdl/soap/wsdl2ruby/expectedMappingRegistry.rb +36 -0
  415. data/test/wsdl/soap/wsdl2ruby/expectedServant.rb +32 -0
  416. data/test/wsdl/soap/wsdl2ruby/expectedService.cgi +48 -0
  417. data/test/wsdl/soap/wsdl2ruby/expectedService.rb +55 -0
  418. data/test/wsdl/soap/wsdl2ruby/rpc.wsdl +80 -0
  419. data/test/wsdl/soap/wsdl2ruby/section/expectedClassdef.rb +37 -0
  420. data/test/wsdl/soap/wsdl2ruby/section/section.xsd +31 -0
  421. data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +53 -0
  422. data/test/wsdl/soap/wsdl2ruby/soapenc/soapenc.wsdl +64 -0
  423. data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +83 -0
  424. data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +102 -0
  425. data/test/wsdl/soaptype/soaptype.wsdl +61 -0
  426. data/test/wsdl/soaptype/test_soaptype.rb +178 -0
  427. data/test/wsdl/test_emptycomplextype.rb +21 -0
  428. data/test/wsdl/test_fault.rb +50 -0
  429. data/test/wsdl/test_multiplefault.rb +41 -0
  430. data/test/xsd/codegen/test_classdef.rb +244 -0
  431. data/test/xsd/noencoding.xml +4 -0
  432. data/test/xsd/test_noencoding.rb +32 -0
  433. data/test/xsd/test_ns.rb +41 -0
  434. data/test/xsd/test_xmlschemaparser.rb +22 -0
  435. data/test/xsd/test_xsd.rb +1638 -0
  436. data/test/xsd/xmllang.xml +43 -0
  437. data/test/xsd/xmlschema.xml +12 -0
  438. data/test/xsd/xsd2ruby/expected_mysample.rb +65 -0
  439. data/test/xsd/xsd2ruby/expected_mysample_mapper.rb +11 -0
  440. data/test/xsd/xsd2ruby/expected_mysample_mapping_registry.rb +51 -0
  441. data/test/xsd/xsd2ruby/section.xsd +49 -0
  442. data/test/xsd/xsd2ruby/test_xsd2ruby.rb +90 -0
  443. metadata +506 -0
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = '4S4C'
4
+ $server = 'http://soap.4s4c.com/ilab/soap.asp'
5
+ $noEchoMap = true
6
+
7
+ require 'clientBase'
8
+
9
+ drv = SOAP::RPC::Driver.new($server, InterfaceNS)
10
+
11
+ methodDef(drv)
12
+
13
+ doTestBase(drv)
14
+ doTestGroupB(drv)
15
+ submitTestResult
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = '4S4C2'
4
+ $server = 'http://soap.4s4c.com/ilab2/soap.asp'
5
+
6
+ require 'clientBase'
7
+
8
+ drv = SOAP::RPC::Driver.new($server, InterfaceNS)
9
+
10
+ methodDef(drv)
11
+
12
+ doTestBase(drv)
13
+ doTestGroupB(drv)
14
+ submitTestResult
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = 'MSASPdotNETWebServices'
4
+ $serverBase = 'http://www.mssoapinterop.org/asmx/simple.asmx'
5
+ $serverGroupB = 'http://www.mssoapinterop.org/asmx/simpleB.asmx'
6
+
7
+ require 'clientBase'
8
+
9
+ drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
10
+ methodDefBase(drvBase)
11
+
12
+ drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
13
+ methodDefGroupB(drvGroupB)
14
+
15
+ doTestBase(drvBase)
16
+ doTestGroupB(drvGroupB)
17
+ submitTestResult
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = 'ApacheAxis'
4
+ $server = 'http://nagoya.apache.org:5049/axis/services/echo'
5
+
6
+ require 'clientBase'
7
+
8
+ drvBase = SOAP::RPC::Driver.new($server, InterfaceNS)
9
+ methodDefBase(drvBase)
10
+
11
+ drvGroupB = SOAP::RPC::Driver.new($server, InterfaceNS)
12
+ methodDefGroupB(drvGroupB)
13
+
14
+ doTestBase(drvBase)
15
+ doTestGroupB(drvGroupB)
16
+ submitTestResult
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = 'ApacheSOAP2.2'
4
+ $serverBase = 'http://nagoya.apache.org:5049/soap/servlet/rpcrouter'
5
+ $serverGroupB = 'None'
6
+
7
+ require 'clientBase'
8
+
9
+ drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
10
+ methodDefBase( drvBase )
11
+
12
+ #drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
13
+ #methodDefGroupB( drvGroupB )
14
+
15
+ doTestBase( drvBase )
16
+ #doTestGroupB( drvGroupB )
17
+ submitTestResult
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $serverName = 'BEAWebLogic8.1'
4
+ $serverBase = 'http://webservice.bea.com:7001/base/SoapInteropBaseService'
5
+ $serverGroupB = 'http://webservice.bea.com:7001/groupb/SoapInteropGroupBService'
6
+
7
+ require 'clientBase'
8
+
9
+ drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
10
+ methodDefBase(drvBase)
11
+
12
+ drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
13
+ methodDefGroupB(drvGroupB)
14
+
15
+ doTestBase(drvBase)
16
+ doTestGroupB(drvGroupB)
17
+ submitTestResult
@@ -0,0 +1,1967 @@
1
+ $KCODE = 'EUC'
2
+
3
+ require 'logger'
4
+ require 'soap/rpc/driver'
5
+ require 'soap/mapping'
6
+ require 'base'
7
+ require 'interopResultBase'
8
+
9
+ include SOAP
10
+ include SOAPBuildersInterop
11
+
12
+ $soapAction = 'http://soapinterop.org/'
13
+ $testResultServer = 'http://dev.ctor.org/soapsrv'
14
+ $testResultDrv = SOAP::RPC::Driver.new($testResultServer,
15
+ SOAPBuildersInteropResult::InterfaceNS)
16
+
17
+ SOAPBuildersInteropResult::Methods.each do |name, *params|
18
+ $testResultDrv.add_rpc_operation(
19
+ XSD::QName.new(SOAPBuildersInteropResult::InterfaceNS, name),
20
+ nil, name, params)
21
+ end
22
+
23
+ client = SOAPBuildersInteropResult::Endpoint.new
24
+ client.processorName = 'SOAP4R'
25
+ client.processorVersion = '1.5'
26
+ client.uri = '*:*'
27
+ client.wsdl = "#{$wsdlBase} #{$wsdlGroupB}"
28
+
29
+ server = SOAPBuildersInteropResult::Endpoint.new
30
+ server.endpointName = $serverName
31
+ server.uri = $server || "#{ $serverBase }, #{ $serverGroupB }"
32
+ server.wsdl = "#{$wsdlBase} #{$wsdlGroupB}"
33
+
34
+ $testResults = SOAPBuildersInteropResult::InteropResults.new(client, server)
35
+
36
+ $wireDumpDev = ''
37
+ def $wireDumpDev.close; end
38
+
39
+ $wireDumpLogFile = STDERR
40
+
41
+
42
+ ###
43
+ ## Method definition.
44
+ #
45
+ def methodDef(drv)
46
+ drv.soapaction = $soapAction
47
+ methodDefBase(drv)
48
+ methodDefGroupB(drv)
49
+ end
50
+
51
+ def methodDefBase(drv)
52
+ SOAPBuildersInterop::MethodsBase.each do |name, *params|
53
+ drv.add_rpc_operation(
54
+ XSD::QName.new(InterfaceNS, name), $soapAction, name, params)
55
+ end
56
+ end
57
+
58
+ def methodDefGroupB(drv)
59
+ SOAPBuildersInterop::MethodsGroupB.each do |name, *params|
60
+ drv.add_rpc_operation(
61
+ XSD::QName.new(InterfaceNS, name), $soapAction, name, params)
62
+ end
63
+ end
64
+
65
+
66
+ ###
67
+ ## Helper function
68
+ #
69
+ class Float
70
+ Precision = 5
71
+
72
+ def ==(rhs)
73
+ if rhs.is_a?(Float)
74
+ if self.nan? and rhs.nan?
75
+ true
76
+ elsif self.infinite? == rhs.infinite?
77
+ true
78
+ elsif (rhs - self).abs <= (10 ** (- Precision))
79
+ true
80
+ else
81
+ false
82
+ end
83
+ else
84
+ false
85
+ end
86
+ end
87
+ end
88
+
89
+ def assert(expected, actual)
90
+ if expected == actual
91
+ 'OK'
92
+ else
93
+ "Expected = " << expected.inspect << " // Actual = " << actual.inspect
94
+ end
95
+ end
96
+
97
+ def setWireDumpLogFile(postfix = "")
98
+ logFilename = File.basename($0).sub(/\.rb$/, '') << postfix << '.log'
99
+ f = File.open(logFilename, 'w')
100
+ f << "File: #{ logFilename } - Wiredumps for SOAP4R client / #{ $serverName } server.\n"
101
+ f << "Date: #{ Time.now }\n\n"
102
+ $wireDumpLogFile = f
103
+ end
104
+
105
+ def getWireDumpLogFileBase(postfix = "")
106
+ File.basename($0).sub(/\.rb$/, '') + postfix
107
+ end
108
+
109
+ def getIdObj(obj)
110
+ case obj
111
+ when Array
112
+ obj.collect { |ele|
113
+ getIdObj(ele)
114
+ }
115
+ else
116
+ # String#== compares content of args.
117
+ "#{ obj.class }##{ obj.__id__ }"
118
+ end
119
+ end
120
+
121
+ def dumpTitle(title)
122
+ p title
123
+ $wireDumpLogFile << "##########\n# " << title << "\n\n"
124
+ end
125
+
126
+ def dumpNormal(title, expected, actual)
127
+ result = assert(expected, actual)
128
+ if result == 'OK'
129
+ dumpResult(title, true, nil)
130
+ else
131
+ dumpResult(title, false, result)
132
+ end
133
+ end
134
+
135
+ def dumpException(title)
136
+ result = "Exception: #{ $! } (#{ $!.class})\n" << $@.join("\n")
137
+ dumpResult(title, false, result)
138
+ end
139
+
140
+ def dumpResult(title, result, resultStr)
141
+ $testResults.add(
142
+ SOAPBuildersInteropResult::TestResult.new(
143
+ title,
144
+ result,
145
+ resultStr,
146
+ $wireDumpDev.dup
147
+ )
148
+ )
149
+ $wireDumpLogFile << "Result: #{ resultStr || 'OK' }\n\n"
150
+ $wireDumpLogFile << $wireDumpDev
151
+ $wireDumpLogFile << "\n"
152
+
153
+ $wireDumpDev.replace('')
154
+ end
155
+
156
+ def submitTestResult
157
+ $testResultDrv.addResults($testResults)
158
+ end
159
+
160
+ class FakeFloat < SOAP::SOAPFloat
161
+ def initialize(str)
162
+ super()
163
+ @data = str
164
+ end
165
+
166
+ def to_s
167
+ @data.to_s
168
+ end
169
+ end
170
+
171
+ class FakeDateTime < SOAP::SOAPDateTime
172
+ def initialize(str)
173
+ super()
174
+ @data = str
175
+ end
176
+
177
+ def to_s
178
+ @data.to_s
179
+ end
180
+ end
181
+
182
+ class FakeDecimal < SOAP::SOAPDecimal
183
+ def initialize(str)
184
+ super()
185
+ @data = str
186
+ end
187
+
188
+ def to_s
189
+ @data.to_s
190
+ end
191
+ end
192
+
193
+ class FakeInt < SOAP::SOAPInt
194
+ def initialize(str)
195
+ super()
196
+ @data = str
197
+ end
198
+
199
+ def to_s
200
+ @data.to_s
201
+ end
202
+ end
203
+
204
+
205
+ ###
206
+ ## Invoke methods.
207
+ #
208
+ def doTest(drv)
209
+ doTestBase(drv)
210
+ doTestGroupB(drv)
211
+ end
212
+
213
+ def doTestBase(drv)
214
+ setWireDumpLogFile('_Base')
215
+ drv.wiredump_dev = $wireDumpDev
216
+ # drv.wiredump_filebase = getWireDumpLogFileBase('_Base')
217
+
218
+ drv.mapping_registry = SOAPBuildersInterop::MappingRegistry
219
+
220
+ title = 'echoVoid'
221
+ dumpTitle(title)
222
+ begin
223
+ var = drv.echoVoid()
224
+ dumpNormal(title, nil, var)
225
+ rescue Exception
226
+ dumpException(title)
227
+ end
228
+
229
+ title = 'echoString'
230
+ dumpTitle(title)
231
+ begin
232
+ arg = "SOAP4R Interoperability Test"
233
+ var = drv.echoString(arg)
234
+ dumpNormal(title, arg, var)
235
+ rescue Exception
236
+ dumpException(title)
237
+ end
238
+
239
+ title = 'echoString (Entity reference)'
240
+ dumpTitle(title)
241
+ begin
242
+ arg = "<>\"& &lt;&gt;&quot;&amp; &amp&amp;><<<"
243
+ var = drv.echoString(arg)
244
+ dumpNormal(title, arg, var)
245
+ rescue Exception
246
+ dumpException(title)
247
+ end
248
+
249
+ title = 'echoString (Character reference)'
250
+ dumpTitle(title)
251
+ begin
252
+ arg = "\x20&#x20;\040&#32;\x7f&#x7f;\177&#127;"
253
+ tobe = " \177\177\177\177"
254
+ var = drv.echoString(SOAP::SOAPRawString.new(arg))
255
+ dumpNormal(title, tobe, var)
256
+ rescue Exception
257
+ dumpException(title)
258
+ end
259
+
260
+ title = 'echoString (Leading and trailing whitespace)'
261
+ dumpTitle(title)
262
+ begin
263
+ arg = " SOAP4R\nInteroperability\nTest "
264
+ var = drv.echoString(arg)
265
+ dumpNormal(title, arg, var)
266
+ rescue Exception
267
+ dumpException(title)
268
+ end
269
+
270
+ title = 'echoString (EUC encoded)'
271
+ dumpTitle(title)
272
+ begin
273
+ arg = "Hello (���ܸ�Japanese) ����ˤ���"
274
+ var = drv.echoString(arg)
275
+ dumpNormal(title, arg, var)
276
+ rescue Exception
277
+ dumpException(title)
278
+ end
279
+
280
+ title = 'echoString (EUC encoded) again'
281
+ dumpTitle(title)
282
+ begin
283
+ arg = "Hello (���ܸ�Japanese) ����ˤ���"
284
+ var = drv.echoString(arg)
285
+ dumpNormal(title, arg, var)
286
+ rescue Exception
287
+ dumpException(title)
288
+ end
289
+
290
+ title = 'echoString (empty)'
291
+ dumpTitle(title)
292
+ begin
293
+ arg = ''
294
+ var = drv.echoString(arg)
295
+ dumpNormal(title, arg, var)
296
+ rescue Exception
297
+ dumpException(title)
298
+ end
299
+
300
+ title = 'echoString (space)'
301
+ dumpTitle(title)
302
+ begin
303
+ arg = ' '
304
+ var = drv.echoString(arg)
305
+ dumpNormal(title, arg, var)
306
+ rescue Exception
307
+ dumpException(title)
308
+ end
309
+
310
+ title = 'echoString (whitespaces:\r \n \t \r \n \t)'
311
+ dumpTitle(title)
312
+ begin
313
+ arg = "\r \n \t \r \n \t"
314
+ var = drv.echoString(arg)
315
+ dumpNormal(title, arg, var)
316
+ rescue Exception
317
+ dumpException(title)
318
+ end
319
+
320
+ title = 'echoStringArray'
321
+ dumpTitle(title)
322
+ begin
323
+ arg = StringArray["SOAP4R\n", " Interoperability ", "\tTest\t"]
324
+ var = drv.echoStringArray(arg)
325
+ dumpNormal(title, arg, var)
326
+ rescue Exception
327
+ dumpException(title)
328
+ end
329
+
330
+ # title = 'echoStringArray (sparse)'
331
+ # dumpTitle(title)
332
+ # begin
333
+ # arg = [nil, "SOAP4R\n", nil, " Interoperability ", nil, "\tTest\t", nil]
334
+ # soapAry = SOAP::Mapping.ary2soap(arg, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
335
+ # soapAry.sparse = true
336
+ # var = drv.echoStringArray(soapAry)
337
+ # dumpNormal(title, arg, var)
338
+ # rescue Exception
339
+ # dumpException(title)
340
+ # end
341
+
342
+ title = 'echoStringArray (multi-ref)'
343
+ dumpTitle(title)
344
+ begin
345
+ str1 = "SOAP4R"
346
+ str2 = "SOAP4R"
347
+ arg = StringArray[str1, str2, str1]
348
+ var = drv.echoStringArray(arg)
349
+ dumpNormal(title, arg, var)
350
+ rescue Exception
351
+ dumpException(title)
352
+ end
353
+
354
+ title = 'echoStringArray (multi-ref: elem1 == elem3)'
355
+ dumpTitle(title)
356
+ begin
357
+ str1 = "SOAP4R"
358
+ str2 = "SOAP4R"
359
+ arg = StringArray[str1, str2, str1]
360
+ var = drv.echoStringArray(arg)
361
+ dumpNormal(title, getIdObj(var[0]), getIdObj(var[2]))
362
+ rescue Exception
363
+ dumpException(title)
364
+ end
365
+
366
+ title = 'echoStringArray (empty, multi-ref: elem1 == elem3)'
367
+ dumpTitle(title)
368
+ begin
369
+ str1 = ""
370
+ str2 = ""
371
+ arg = StringArray[str1, str2, str1]
372
+ var = drv.echoStringArray(arg)
373
+ dumpNormal(title, getIdObj(var[0]), getIdObj(var[2]))
374
+ rescue Exception
375
+ dumpException(title)
376
+ end
377
+
378
+ # title = 'echoStringArray (sparse, multi-ref)'
379
+ # dumpTitle(title)
380
+ # begin
381
+ # str = "SOAP4R"
382
+ # arg = StringArray[nil, nil, nil, nil, nil, str, nil, str]
383
+ # soapAry = SOAP::Mapping.ary2soap(arg, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
384
+ # soapAry.sparse = true
385
+ # var = drv.echoStringArray(soapAry)
386
+ # dumpNormal(title, arg, var)
387
+ # rescue Exception
388
+ # dumpException(title)
389
+ # end
390
+
391
+ title = 'echoInteger (Int: 123)'
392
+ dumpTitle(title)
393
+ begin
394
+ arg = 123
395
+ var = drv.echoInteger(arg)
396
+ dumpNormal(title, arg, var)
397
+ rescue Exception
398
+ dumpException(title)
399
+ end
400
+
401
+ title = 'echoInteger (Int: 2147483647)'
402
+ dumpTitle(title)
403
+ begin
404
+ arg = 2147483647
405
+ var = drv.echoInteger(arg)
406
+ dumpNormal(title, arg, var)
407
+ rescue Exception
408
+ dumpException(title)
409
+ end
410
+
411
+ title = 'echoInteger (Int: -2147483648)'
412
+ dumpTitle(title)
413
+ begin
414
+ arg = -2147483648
415
+ var = drv.echoInteger(arg)
416
+ dumpNormal(title, arg, var)
417
+ rescue Exception
418
+ dumpException(title)
419
+ end
420
+
421
+ title = 'echoInteger (2147483648: junk)'
422
+ dumpTitle(title)
423
+ begin
424
+ begin
425
+ arg = FakeInt.new("2147483648")
426
+ var = drv.echoInteger(arg)
427
+ dumpNormal(title, 'Fault', 'No error occurred.')
428
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
429
+ dumpNormal(title, true, true)
430
+ end
431
+ rescue Exception
432
+ dumpException(title)
433
+ end
434
+
435
+ title = 'echoInteger (-2147483649: junk)'
436
+ dumpTitle(title)
437
+ begin
438
+ begin
439
+ arg = FakeInt.new("-2147483649")
440
+ var = drv.echoInteger(arg)
441
+ dumpNormal(title, 'Fault', 'No error occurred.')
442
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
443
+ dumpNormal(title, true, true)
444
+ end
445
+ rescue Exception
446
+ dumpException(title)
447
+ end
448
+
449
+ title = 'echoInteger (0.0: junk)'
450
+ dumpTitle(title)
451
+ begin
452
+ begin
453
+ arg = FakeInt.new("0.0")
454
+ var = drv.echoInteger(arg)
455
+ dumpNormal(title, 'Fault', 'No error occurred.')
456
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
457
+ dumpNormal(title, true, true)
458
+ end
459
+ rescue Exception
460
+ dumpException(title)
461
+ end
462
+
463
+ title = 'echoInteger (-5.2: junk)'
464
+ dumpTitle(title)
465
+ begin
466
+ begin
467
+ arg = FakeInt.new("-5.2")
468
+ var = drv.echoInteger(arg)
469
+ dumpNormal(title, 'Fault', 'No error occurred.')
470
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
471
+ dumpNormal(title, true, true)
472
+ end
473
+ rescue Exception
474
+ dumpException(title)
475
+ end
476
+
477
+ title = 'echoInteger (0.000000000a: junk)'
478
+ dumpTitle(title)
479
+ begin
480
+ begin
481
+ arg = FakeInt.new("0.000000000a")
482
+ var = drv.echoInteger(arg)
483
+ dumpNormal(title, 'Fault', 'No error occurred.')
484
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
485
+ dumpNormal(title, true, true)
486
+ end
487
+ rescue Exception
488
+ dumpException(title)
489
+ end
490
+
491
+ title = 'echoInteger (+-5: junk)'
492
+ dumpTitle(title)
493
+ begin
494
+ begin
495
+ arg = FakeInt.new("+-5")
496
+ var = drv.echoInteger(arg)
497
+ dumpNormal(title, 'Fault', 'No error occurred.')
498
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
499
+ dumpNormal(title, true, true)
500
+ end
501
+ rescue Exception
502
+ dumpException(title)
503
+ end
504
+
505
+ title = 'echoIntegerArray'
506
+ dumpTitle(title)
507
+ begin
508
+ arg = IntArray[1, 2, 3]
509
+ var = drv.echoIntegerArray(arg)
510
+ dumpNormal(title, arg, var)
511
+ rescue Exception
512
+ dumpException(title)
513
+ end
514
+
515
+ # title = 'echoIntegerArray (nil)'
516
+ # dumpTitle(title)
517
+ # begin
518
+ # arg = IntArray[nil, nil, nil]
519
+ # var = drv.echoIntegerArray(arg)
520
+ # dumpNormal(title, arg, var)
521
+ # rescue Exception
522
+ # dumpException(title)
523
+ # end
524
+
525
+ title = 'echoIntegerArray (empty)'
526
+ dumpTitle(title)
527
+ begin
528
+ arg = SOAP::SOAPArray.new(SOAP::ValueArrayName, 1, XSD::XSDInt::Type)
529
+ var = drv.echoIntegerArray(arg)
530
+ dumpNormal(title, [], var)
531
+ rescue Exception
532
+ dumpException(title)
533
+ end
534
+
535
+ # title = 'echoIntegerArray (sparse)'
536
+ # dumpTitle(title)
537
+ # begin
538
+ # arg = [nil, 1, nil, 2, nil, 3, nil]
539
+ # soapAry = SOAP::Mapping.ary2soap(arg, XSD::Namespace, XSD::XSDInt::Type, SOAPBuildersInterop::MappingRegistry)
540
+ # soapAry.sparse = true
541
+ # var = drv.echoIntegerArray(soapAry)
542
+ # dumpNormal(title, arg, var)
543
+ # rescue Exception
544
+ # dumpException(title)
545
+ # end
546
+
547
+ title = 'echoFloat'
548
+ dumpTitle(title)
549
+ begin
550
+ arg = 3.14159265358979
551
+ var = drv.echoFloat(SOAPFloat.new(arg))
552
+ dumpNormal(title, arg, var)
553
+ rescue Exception
554
+ dumpException(title)
555
+ end
556
+
557
+ title = 'echoFloat (scientific notation)'
558
+ dumpTitle(title)
559
+ begin
560
+ arg = 12.34e36
561
+ var = drv.echoFloat(SOAPFloat.new(arg))
562
+ dumpNormal(title, arg, var)
563
+ rescue Exception
564
+ dumpException(title)
565
+ end
566
+
567
+ title = 'echoFloat (scientific notation 2)'
568
+ dumpTitle(title)
569
+ begin
570
+ arg = FakeFloat.new("12.34e36")
571
+ var = drv.echoFloat(SOAPFloat.new(arg))
572
+ dumpNormal(title, 12.34e36, var)
573
+ rescue Exception
574
+ dumpException(title)
575
+ end
576
+
577
+ title = 'echoFloat (scientific notation 3)'
578
+ dumpTitle(title)
579
+ begin
580
+ arg = FakeFloat.new("12.34E+36")
581
+ var = drv.echoFloat(SOAPFloat.new(arg))
582
+ dumpNormal(title, 12.34e36, var)
583
+ rescue Exception
584
+ dumpException(title)
585
+ end
586
+
587
+ title = 'echoFloat (scientific notation 4)'
588
+ dumpTitle(title)
589
+ begin
590
+ arg = FakeFloat.new("-1.4E")
591
+ var = drv.echoFloat(SOAPFloat.new(arg))
592
+ dumpNormal(title, 1.4, var)
593
+ rescue Exception
594
+ dumpException(title)
595
+ end
596
+
597
+ title = 'echoFloat (positive lower boundary)'
598
+ dumpTitle(title)
599
+ begin
600
+ arg = 1.4e-45
601
+ var = drv.echoFloat(SOAPFloat.new(arg))
602
+ dumpNormal(title, arg, var)
603
+ rescue Exception
604
+ dumpException(title)
605
+ end
606
+
607
+ title = 'echoFloat (negative lower boundary)'
608
+ dumpTitle(title)
609
+ begin
610
+ arg = -1.4e-45
611
+ var = drv.echoFloat(SOAPFloat.new(arg))
612
+ dumpNormal(title, arg, var)
613
+ rescue Exception
614
+ dumpException(title)
615
+ end
616
+
617
+ title = 'echoFloat (special values: +0)'
618
+ dumpTitle(title)
619
+ begin
620
+ arg = 0.0
621
+ var = drv.echoFloat(SOAPFloat.new(arg))
622
+ dumpNormal(title, arg, var)
623
+ rescue Exception
624
+ dumpException(title)
625
+ end
626
+
627
+ title = 'echoFloat (special values: -0)'
628
+ dumpTitle(title)
629
+ begin
630
+ arg = (-1.0 / (1.0 / 0.0))
631
+ var = drv.echoFloat(SOAPFloat.new(arg))
632
+ dumpNormal(title, arg, var)
633
+ rescue Exception
634
+ dumpException(title)
635
+ end
636
+
637
+ title = 'echoFloat (special values: NaN)'
638
+ dumpTitle(title)
639
+ begin
640
+ arg = 0.0/0.0
641
+ var = drv.echoFloat(SOAPFloat.new(arg))
642
+ dumpNormal(title, arg, var)
643
+ rescue Exception
644
+ dumpException(title)
645
+ end
646
+
647
+ title = 'echoFloat (special values: INF)'
648
+ dumpTitle(title)
649
+ begin
650
+ arg = 1.0/0.0
651
+ var = drv.echoFloat(SOAPFloat.new(arg))
652
+ dumpNormal(title, arg, var)
653
+ rescue Exception
654
+ dumpException(title)
655
+ end
656
+
657
+ title = 'echoFloat (special values: -INF)'
658
+ dumpTitle(title)
659
+ begin
660
+ arg = -1.0/0.0
661
+ var = drv.echoFloat(SOAPFloat.new(arg))
662
+ dumpNormal(title, arg, var)
663
+ rescue Exception
664
+ dumpException(title)
665
+ end
666
+
667
+ title = 'echoFloat (0.000a: junk)'
668
+ dumpTitle(title)
669
+ begin
670
+ begin
671
+ arg = FakeFloat.new("0.0000000000000000a")
672
+ var = drv.echoFloat(arg)
673
+ dumpNormal(title, 'Fault', 'No error occurred.')
674
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
675
+ dumpNormal(title, true, true)
676
+ end
677
+ rescue Exception
678
+ dumpException(title)
679
+ end
680
+
681
+ title = 'echoFloat (00a.0001: junk)'
682
+ dumpTitle(title)
683
+ begin
684
+ begin
685
+ arg = FakeFloat.new("00a.000000000000001")
686
+ var = drv.echoFloat(arg)
687
+ dumpNormal(title, 'Fault', 'No error occurred.')
688
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
689
+ dumpNormal(title, true, true)
690
+ end
691
+ rescue Exception
692
+ dumpException(title)
693
+ end
694
+
695
+ title = 'echoFloat (+-5: junk)'
696
+ dumpTitle(title)
697
+ begin
698
+ begin
699
+ arg = FakeFloat.new("+-5")
700
+ var = drv.echoFloat(arg)
701
+ dumpNormal(title, 'Fault', 'No error occurred.')
702
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
703
+ dumpNormal(title, true, true)
704
+ end
705
+ rescue Exception
706
+ dumpException(title)
707
+ end
708
+
709
+ title = 'echoFloat (5_0: junk)'
710
+ dumpTitle(title)
711
+ begin
712
+ begin
713
+ arg = FakeFloat.new("5_0")
714
+ var = drv.echoFloat(arg)
715
+ dumpNormal(title, 'Fault', 'No error occurred.')
716
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
717
+ dumpNormal(title, true, true)
718
+ end
719
+ rescue Exception
720
+ dumpException(title)
721
+ end
722
+
723
+ title = 'echoFloatArray'
724
+ dumpTitle(title)
725
+ begin
726
+ arg = FloatArray[SOAPFloat.new(0.0001), SOAPFloat.new(1000.0), SOAPFloat.new(0.0)]
727
+ var = drv.echoFloatArray(arg)
728
+ dumpNormal(title, arg.collect { |ele| ele.data }, var)
729
+ rescue Exception
730
+ dumpException(title)
731
+ end
732
+
733
+ title = 'echoFloatArray (special values: NaN, INF, -INF)'
734
+ dumpTitle(title)
735
+ begin
736
+ nan = SOAPFloat.new(0.0/0.0)
737
+ inf = SOAPFloat.new(1.0/0.0)
738
+ inf_ = SOAPFloat.new(-1.0/0.0)
739
+ arg = FloatArray[nan, inf, inf_]
740
+ var = drv.echoFloatArray(arg)
741
+ dumpNormal(title, arg.collect { |ele| ele.data }, var)
742
+ rescue Exception
743
+ dumpException(title)
744
+ end
745
+
746
+ # title = 'echoFloatArray (sparse)'
747
+ # dumpTitle(title)
748
+ # begin
749
+ # arg = [nil, nil, 0.0001, 1000.0, 0.0, nil, nil]
750
+ # soapAry = SOAP::Mapping.ary2soap(arg, XSD::Namespace, XSD::FloatLiteral, SOAPBuildersInterop::MappingRegistry)
751
+ # soapAry.sparse = true
752
+ # var = drv.echoFloatArray(soapAry)
753
+ # dumpNormal(title, arg, var)
754
+ # rescue Exception
755
+ # dumpException(title)
756
+ # end
757
+
758
+ title = 'echoStruct'
759
+ dumpTitle(title)
760
+ begin
761
+ arg = SOAPStruct.new(1, 1.1, "a")
762
+ var = drv.echoStruct(arg)
763
+ dumpNormal(title, arg, var)
764
+ rescue Exception
765
+ dumpException(title)
766
+ end
767
+
768
+ title = 'echoStruct (nil members)'
769
+ dumpTitle(title)
770
+ begin
771
+ arg = SOAPStruct.new(nil, nil, nil)
772
+ var = drv.echoStruct(arg)
773
+ dumpNormal(title, arg, var)
774
+ rescue Exception
775
+ dumpException(title)
776
+ end
777
+
778
+ title = 'echoStructArray'
779
+ dumpTitle(title)
780
+ begin
781
+ s1 = SOAPStruct.new(1, 1.1, "a")
782
+ s2 = SOAPStruct.new(2, 2.2, "b")
783
+ s3 = SOAPStruct.new(3, 3.3, "c")
784
+ arg = SOAPStructArray[s1, s2, s3]
785
+ var = drv.echoStructArray(arg)
786
+ dumpNormal(title, arg, var)
787
+ rescue Exception
788
+ dumpException(title)
789
+ end
790
+
791
+ title = 'echoStructArray (anyType Array)'
792
+ dumpTitle(title)
793
+ begin
794
+ s1 = SOAPStruct.new(1, 1.1, "a")
795
+ s2 = SOAPStruct.new(2, 2.2, "b")
796
+ s3 = SOAPStruct.new(3, 3.3, "c")
797
+ arg = [s1, s2, s3]
798
+ var = drv.echoStructArray(arg)
799
+ dumpNormal(title, arg, var)
800
+ rescue Exception
801
+ dumpException(title)
802
+ end
803
+
804
+ # title = 'echoStructArray (sparse)'
805
+ # dumpTitle(title)
806
+ # begin
807
+ # s1 = SOAPStruct.new(1, 1.1, "a")
808
+ # s2 = SOAPStruct.new(2, 2.2, "b")
809
+ # s3 = SOAPStruct.new(3, 3.3, "c")
810
+ # arg = [nil, s1, s2, s3]
811
+ # soapAry = SOAP::Mapping.ary2soap(arg, TypeNS, "SOAPStruct", SOAPBuildersInterop::MappingRegistry)
812
+ # soapAry.sparse = true
813
+ # var = drv.echoStructArray(soapAry)
814
+ # dumpNormal(title, arg, var)
815
+ # rescue Exception
816
+ # dumpException(title)
817
+ # end
818
+
819
+ title = 'echoStructArray (multi-ref)'
820
+ dumpTitle(title)
821
+ begin
822
+ s1 = SOAPStruct.new(1, 1.1, "a")
823
+ s2 = SOAPStruct.new(2, 2.2, "b")
824
+ arg = SOAPStructArray[s1, s1, s2]
825
+ var = drv.echoStructArray(arg)
826
+ dumpNormal(title, arg, var)
827
+ rescue Exception
828
+ dumpException(title)
829
+ end
830
+
831
+ title = 'echoStructArray (multi-ref: elem1 == elem2)'
832
+ dumpTitle(title)
833
+ begin
834
+ s1 = SOAPStruct.new(1, 1.1, "a")
835
+ s2 = SOAPStruct.new(2, 2.2, "b")
836
+ arg = SOAPStructArray[s1, s1, s2]
837
+ var = drv.echoStructArray(arg)
838
+ dumpNormal(title, getIdObj(var[0]), getIdObj(var[1]))
839
+ rescue Exception
840
+ dumpException(title)
841
+ end
842
+
843
+ title = 'echoStructArray (anyType Array, multi-ref: elem2 == elem3)'
844
+ dumpTitle(title)
845
+ begin
846
+ s1 = SOAPStruct.new(1, 1.1, "a")
847
+ s2 = SOAPStruct.new(2, 2.2, "b")
848
+ arg = [s1, s2, s2]
849
+ var = drv.echoStructArray(arg)
850
+ dumpNormal(title, getIdObj(var[1]), getIdObj(var[2]))
851
+ rescue Exception
852
+ dumpException(title)
853
+ end
854
+
855
+ # title = 'echoStructArray (sparse, multi-ref)'
856
+ # dumpTitle(title)
857
+ # begin
858
+ # s1 = SOAPStruct.new(1, 1.1, "a")
859
+ # s2 = SOAPStruct.new(2, 2.2, "b")
860
+ # arg = [nil, s1, nil, nil, s2, nil, s2]
861
+ # soapAry = SOAP::Mapping.ary2soap(arg, TypeNS, "SOAPStruct", SOAPBuildersInterop::MappingRegistry)
862
+ # soapAry.sparse = true
863
+ # var = drv.echoStructArray(soapAry)
864
+ # dumpNormal(title, arg, var)
865
+ # rescue Exception
866
+ # dumpException(title)
867
+ # end
868
+
869
+ # title = 'echoStructArray (sparse, multi-ref: elem5 == elem7)'
870
+ # dumpTitle(title)
871
+ # begin
872
+ # s1 = SOAPStruct.new(1, 1.1, "a")
873
+ # s2 = SOAPStruct.new(2, 2.2, "b")
874
+ # arg = [nil, s1, nil, nil, s2, nil, s2]
875
+ # soapAry = SOAP::Mapping.ary2soap(arg, TypeNS, "SOAPStruct", SOAPBuildersInterop::MappingRegistry)
876
+ # soapAry.sparse = true
877
+ # var = drv.echoStructArray(soapAry)
878
+ # dumpNormal(title, getIdObj(var[4]), getIdObj(var[6]))
879
+ # rescue Exception
880
+ # dumpException(title)
881
+ # end
882
+
883
+ title = 'echoStructArray (multi-ref: varString of elem1 == varString of elem2)'
884
+ dumpTitle(title)
885
+ begin
886
+ str1 = "a"
887
+ str2 = "a"
888
+ s1 = SOAPStruct.new(1, 1.1, str1)
889
+ s2 = SOAPStruct.new(2, 2.2, str1)
890
+ s3 = SOAPStruct.new(3, 3.3, str2)
891
+ arg = SOAPStructArray[s1, s2, s3]
892
+ var = drv.echoStructArray(arg)
893
+ dumpNormal(title, getIdObj(var[0].varString), getIdObj(var[1].varString))
894
+ rescue Exception
895
+ dumpException(title)
896
+ end
897
+
898
+ title = 'echoStructArray (anyType Array, multi-ref: varString of elem2 == varString of elem3)'
899
+ dumpTitle(title)
900
+ begin
901
+ str1 = "b"
902
+ str2 = "b"
903
+ s1 = SOAPStruct.new(1, 1.1, str2)
904
+ s2 = SOAPStruct.new(2, 2.2, str1)
905
+ s3 = SOAPStruct.new(3, 3.3, str1)
906
+ arg = [s1, s2, s3]
907
+ var = drv.echoStructArray(arg)
908
+ dumpNormal(title, getIdObj(var[1].varString), getIdObj(var[2].varString))
909
+ rescue Exception
910
+ dumpException(title)
911
+ end
912
+
913
+ # title = 'echoStructArray (sparse, multi-ref: varString of elem5 == varString of elem7)'
914
+ # dumpTitle(title)
915
+ # begin
916
+ # str1 = "c"
917
+ # str2 = "c"
918
+ # s1 = SOAPStruct.new(1, 1.1, str2)
919
+ # s2 = SOAPStruct.new(2, 2.2, str1)
920
+ # s3 = SOAPStruct.new(3, 3.3, str1)
921
+ # arg = [nil, s1, nil, nil, s2, nil, s3]
922
+ # soapAry = SOAP::Mapping.ary2soap(arg, TypeNS, "SOAPStruct", SOAPBuildersInterop::MappingRegistry)
923
+ # soapAry.sparse = true
924
+ # var = drv.echoStructArray(soapAry)
925
+ # dumpNormal(title, getIdObj(var[4].varString), getIdObj(var[6].varString))
926
+ # rescue Exception
927
+ # dumpException(title)
928
+ # end
929
+
930
+ # title = 'echoStructArray (2D Array)'
931
+ # dumpTitle(title)
932
+ # begin
933
+ # s1 = SOAPStruct.new(1, 1.1, "a")
934
+ # s2 = SOAPStruct.new(2, 2.2, "b")
935
+ # s3 = SOAPStruct.new(3, 3.3, "c")
936
+ # arg = [
937
+ # [s1, nil, s2],
938
+ # [nil, s2, s3],
939
+ # ]
940
+ # md = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::AnyTypeLiteral, SOAPBuildersInterop::MappingRegistry)
941
+ #
942
+ # var = drv.echoStructArray(md)
943
+ # dumpNormal(title, arg, var)
944
+ # rescue Exception
945
+ # dumpException(title)
946
+ # end
947
+ #
948
+ # title = 'echoStructArray (2D Array, sparse)'
949
+ # dumpTitle(title)
950
+ # begin
951
+ # s1 = SOAPStruct.new(1, 1.1, "a")
952
+ # s2 = SOAPStruct.new(2, 2.2, "b")
953
+ # s3 = SOAPStruct.new(3, 3.3, "c")
954
+ # arg = [
955
+ # [s1, nil, s2],
956
+ # [nil, s2, s3],
957
+ # ]
958
+ # md = SOAP::Mapping.ary2md(arg, 2, TypeNS, "SOAPStruct", SOAPBuildersInterop::MappingRegistry)
959
+ ## md.sparse = true
960
+ #
961
+ # var = drv.echoStructArray(md)
962
+ # dumpNormal(title, arg, var)
963
+ # rescue Exception
964
+ # dumpException(title)
965
+ # end
966
+ #
967
+ # title = 'echoStructArray (anyType, 2D Array, sparse)'
968
+ # dumpTitle(title)
969
+ # begin
970
+ # s1 = SOAPStruct.new(1, 1.1, "a")
971
+ # s2 = SOAPStruct.new(2, 2.2, "b")
972
+ # s3 = SOAPStruct.new(3, 3.3, "c")
973
+ # arg = [
974
+ # [s1, nil, s2],
975
+ # [nil, s2, s3],
976
+ # ]
977
+ # md = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::AnyTypeLiteral, SOAPBuildersInterop::MappingRegistry)
978
+ # md.sparse = true
979
+ #
980
+ # var = drv.echoStructArray(md)
981
+ # dumpNormal(title, arg, var)
982
+ # rescue Exception
983
+ # dumpException(title)
984
+ # end
985
+
986
+ title = 'echoDate (now)'
987
+ dumpTitle(title)
988
+ begin
989
+ t = Time.now.gmtime
990
+ arg = DateTime.new(t.year, t.mon, t.mday, t.hour, t.min, t.sec)
991
+ var = drv.echoDate(arg)
992
+ dumpNormal(title, arg.to_s, var.to_s)
993
+ rescue Exception
994
+ dumpException(title)
995
+ end
996
+
997
+ title = 'echoDate (before 1970: 1-01-01T00:00:00Z)'
998
+ dumpTitle(title)
999
+ begin
1000
+ t = Time.now.gmtime
1001
+ arg = DateTime.new(1, 1, 1, 0, 0, 0)
1002
+ var = drv.echoDate(arg)
1003
+ dumpNormal(title, arg.to_s, var.to_s)
1004
+ rescue Exception
1005
+ dumpException(title)
1006
+ end
1007
+
1008
+ title = 'echoDate (after 2038: 2038-12-31T00:00:00Z)'
1009
+ dumpTitle(title)
1010
+ begin
1011
+ t = Time.now.gmtime
1012
+ arg = DateTime.new(2038, 12, 31, 0, 0, 0)
1013
+ var = drv.echoDate(arg)
1014
+ dumpNormal(title, arg.to_s, var.to_s)
1015
+ rescue Exception
1016
+ dumpException(title)
1017
+ end
1018
+
1019
+ title = 'echoDate (negative: -10-01-01T00:00:00Z)'
1020
+ dumpTitle(title)
1021
+ begin
1022
+ t = Time.now.gmtime
1023
+ arg = DateTime.new(-10, 1, 1, 0, 0, 0)
1024
+ var = drv.echoDate(arg)
1025
+ dumpNormal(title, arg.to_s, var.to_s)
1026
+ rescue Exception
1027
+ dumpException(title)
1028
+ end
1029
+
1030
+ title = 'echoDate (time precision: msec)'
1031
+ dumpTitle(title)
1032
+ begin
1033
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40.012')
1034
+ argDate = arg.data
1035
+ var = drv.echoDate(arg)
1036
+ dumpNormal(title, argDate, var)
1037
+ rescue Exception
1038
+ dumpException(title)
1039
+ end
1040
+
1041
+ title = 'echoDate (time precision: long)'
1042
+ dumpTitle(title)
1043
+ begin
1044
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40.0000000000123456789012345678900000000000')
1045
+ argDate = arg.data
1046
+ var = drv.echoDate(arg)
1047
+ dumpNormal(title, argDate, var)
1048
+ rescue Exception
1049
+ dumpException(title)
1050
+ end
1051
+
1052
+ title = 'echoDate (positive TZ)'
1053
+ dumpTitle(title)
1054
+ begin
1055
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40+07:00')
1056
+ argNormalized = DateTime.new(2001, 6, 16, 18, 13, 40)
1057
+ var = drv.echoDate(arg)
1058
+ dumpNormal(title, argNormalized, var)
1059
+ rescue Exception
1060
+ dumpException(title)
1061
+ end
1062
+
1063
+ title = 'echoDate (negative TZ)'
1064
+ dumpTitle(title)
1065
+ begin
1066
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40-07:00')
1067
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
1068
+ var = drv.echoDate(arg)
1069
+ dumpNormal(title, argNormalized, var)
1070
+ rescue Exception
1071
+ dumpException(title)
1072
+ end
1073
+
1074
+ title = 'echoDate (+00:00 TZ)'
1075
+ dumpTitle(title)
1076
+ begin
1077
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40+00:00')
1078
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
1079
+ var = drv.echoDate(arg)
1080
+ dumpNormal(title, argNormalized, var)
1081
+ rescue Exception
1082
+ dumpException(title)
1083
+ end
1084
+
1085
+ title = 'echoDate (-00:00 TZ)'
1086
+ dumpTitle(title)
1087
+ begin
1088
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40-00:00')
1089
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
1090
+ var = drv.echoDate(arg)
1091
+ dumpNormal(title, argNormalized, var)
1092
+ rescue Exception
1093
+ dumpException(title)
1094
+ end
1095
+
1096
+ title = 'echoDate (min TZ)'
1097
+ dumpTitle(title)
1098
+ begin
1099
+ arg = SOAP::SOAPDateTime.new('2001-06-16T00:00:01+00:01')
1100
+ argNormalized = DateTime.new(2001, 6, 15, 23, 59, 1)
1101
+ var = drv.echoDate(arg)
1102
+ dumpNormal(title, argNormalized, var)
1103
+ rescue Exception
1104
+ dumpException(title)
1105
+ end
1106
+
1107
+ title = 'echoDate (year > 9999)'
1108
+ dumpTitle(title)
1109
+ begin
1110
+ arg = SOAP::SOAPDateTime.new('10000-06-16T18:13:40-07:00')
1111
+ argNormalized = DateTime.new(10000, 6, 17, 1, 13, 40)
1112
+ var = drv.echoDate(arg)
1113
+ dumpNormal(title, argNormalized, var)
1114
+ rescue Exception
1115
+ dumpException(title)
1116
+ end
1117
+
1118
+ title = 'echoDate (year < 0)'
1119
+ dumpTitle(title)
1120
+ begin
1121
+ arg = SOAP::SOAPDateTime.new('-0001-06-16T18:13:40-07:00')
1122
+ argNormalized = DateTime.new(0, 6, 17, 1, 13, 40)
1123
+ var = drv.echoDate(arg)
1124
+ dumpNormal(title, argNormalized, var)
1125
+ rescue Exception
1126
+ dumpException(title)
1127
+ end
1128
+
1129
+ title = 'echoDate (year == -4713)'
1130
+ dumpTitle(title)
1131
+ begin
1132
+ arg = SOAP::SOAPDateTime.new('-4713-01-01T12:00:00')
1133
+ argNormalized = DateTime.new(-4712, 1, 1, 12, 0, 0)
1134
+ var = drv.echoDate(arg)
1135
+ dumpNormal(title, argNormalized, var)
1136
+ rescue Exception
1137
+ dumpException(title)
1138
+ end
1139
+
1140
+ title = 'echoDate (year 0000: junk)'
1141
+ dumpTitle(title)
1142
+ begin
1143
+ begin
1144
+ arg = FakeDateTime.new("0000-05-18T16:52:20Z")
1145
+ var = drv.echoDate(arg)
1146
+ dumpNormal(title, 'Fault', 'No error occurred.')
1147
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1148
+ dumpNormal(title, true, true)
1149
+ end
1150
+ rescue Exception
1151
+ dumpException(title)
1152
+ end
1153
+
1154
+ title = 'echoDate (year nn: junk)'
1155
+ dumpTitle(title)
1156
+ begin
1157
+ begin
1158
+ arg = FakeDateTime.new("05-05-18T16:52:20Z")
1159
+ var = drv.echoDate(arg)
1160
+ dumpNormal(title, 'Fault', 'No error occurred.')
1161
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1162
+ dumpNormal(title, true, true)
1163
+ end
1164
+ rescue Exception
1165
+ dumpException(title)
1166
+ end
1167
+
1168
+ title = 'echoDate (no day part: junk)'
1169
+ dumpTitle(title)
1170
+ begin
1171
+ begin
1172
+ arg = FakeDateTime.new("2002-05T16:52:20Z")
1173
+ var = drv.echoDate(arg)
1174
+ dumpNormal(title, 'Fault', 'No error occurred.')
1175
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1176
+ dumpNormal(title, true, true)
1177
+ end
1178
+ rescue Exception
1179
+ dumpException(title)
1180
+ end
1181
+
1182
+ title = 'echoDate (no sec part: junk)'
1183
+ dumpTitle(title)
1184
+ begin
1185
+ begin
1186
+ arg = FakeDateTime.new("2002-05-18T16:52Z")
1187
+ var = drv.echoDate(arg)
1188
+ dumpNormal(title, 'Fault', 'No error occurred.')
1189
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1190
+ dumpNormal(title, true, true)
1191
+ end
1192
+ rescue Exception
1193
+ dumpException(title)
1194
+ end
1195
+
1196
+ title = 'echoDate (empty: junk)'
1197
+ dumpTitle(title)
1198
+ begin
1199
+ begin
1200
+ arg = FakeDateTime.new("")
1201
+ var = drv.echoDate(arg)
1202
+ dumpNormal(title, 'Fault', 'No error occurred.')
1203
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1204
+ dumpNormal(title, true, true)
1205
+ end
1206
+ rescue Exception
1207
+ dumpException(title)
1208
+ end
1209
+
1210
+ title = 'echoBase64 (xsd:base64Binary)'
1211
+ dumpTitle(title)
1212
+ begin
1213
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
1214
+ arg = SOAP::SOAPBase64.new(str)
1215
+ arg.as_xsd # Force xsd:base64Binary instead of soap-enc:base64
1216
+ var = drv.echoBase64(arg)
1217
+ dumpNormal(title, str, var)
1218
+ rescue Exception
1219
+ dumpException(title)
1220
+ end
1221
+
1222
+ title = 'echoBase64 (xsd:base64Binary, empty)'
1223
+ dumpTitle(title)
1224
+ begin
1225
+ str = ""
1226
+ arg = SOAP::SOAPBase64.new(str)
1227
+ arg.as_xsd # Force xsd:base64Binary instead of soap-enc:base64
1228
+ var = drv.echoBase64(arg)
1229
+ dumpNormal(title, str, var)
1230
+ rescue Exception
1231
+ dumpException(title)
1232
+ end
1233
+
1234
+ title = 'echoBase64 (SOAP-ENC:base64)'
1235
+ dumpTitle(title)
1236
+ begin
1237
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
1238
+ arg = SOAP::SOAPBase64.new(str)
1239
+ var = drv.echoBase64(arg)
1240
+ dumpNormal(title, str, var)
1241
+ rescue Exception
1242
+ dumpException(title)
1243
+ end
1244
+
1245
+ title = 'echoBase64 (\0)'
1246
+ dumpTitle(title)
1247
+ begin
1248
+ str = "\0"
1249
+ arg = SOAP::SOAPBase64.new(str)
1250
+ var = drv.echoBase64(arg)
1251
+ dumpNormal(title, str, var)
1252
+ rescue Exception
1253
+ dumpException(title)
1254
+ end
1255
+
1256
+ title = 'echoBase64 (\0a\0)'
1257
+ dumpTitle(title)
1258
+ begin
1259
+ str = "a\0b\0\0c\0\0\0"
1260
+ arg = SOAP::SOAPBase64.new(str)
1261
+ var = drv.echoBase64(arg)
1262
+ dumpNormal(title, str, var)
1263
+ rescue Exception
1264
+ dumpException(title)
1265
+ end
1266
+
1267
+ title = 'echoBase64 (-: junk)'
1268
+ dumpTitle(title)
1269
+ begin
1270
+ begin
1271
+ arg = SOAP::SOAPBase64.new("dummy")
1272
+ arg.instance_eval { @data = '-' }
1273
+ var = drv.echoBase64(arg)
1274
+ dumpNormal(title, 'Fault', 'No error occurred.')
1275
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1276
+ dumpNormal(title, true, true)
1277
+ end
1278
+ rescue Exception
1279
+ dumpException(title)
1280
+ end
1281
+
1282
+ title = 'echoHexBinary'
1283
+ dumpTitle(title)
1284
+ begin
1285
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
1286
+ arg = SOAP::SOAPHexBinary.new(str)
1287
+ var = drv.echoHexBinary(arg)
1288
+ dumpNormal(title, str, var)
1289
+ rescue Exception
1290
+ dumpException(title)
1291
+ end
1292
+
1293
+ title = 'echoHexBinary(empty)'
1294
+ dumpTitle(title)
1295
+ begin
1296
+ str = ""
1297
+ arg = SOAP::SOAPHexBinary.new(str)
1298
+ var = drv.echoHexBinary(arg)
1299
+ dumpNormal(title, str, var)
1300
+ rescue Exception
1301
+ dumpException(title)
1302
+ end
1303
+
1304
+ title = 'echoHexBinary(\0)'
1305
+ dumpTitle(title)
1306
+ begin
1307
+ str = "\0"
1308
+ arg = SOAP::SOAPHexBinary.new(str)
1309
+ var = drv.echoHexBinary(arg)
1310
+ dumpNormal(title, str, var)
1311
+ rescue Exception
1312
+ dumpException(title)
1313
+ end
1314
+
1315
+ title = 'echoHexBinary(\0a\0)'
1316
+ dumpTitle(title)
1317
+ begin
1318
+ str = "a\0b\0\0c\0\0\0"
1319
+ arg = SOAP::SOAPHexBinary.new(str)
1320
+ var = drv.echoHexBinary(arg)
1321
+ dumpNormal(title, str, var)
1322
+ rescue Exception
1323
+ dumpException(title)
1324
+ end
1325
+
1326
+ title = 'echoHexBinary(lower case)'
1327
+ dumpTitle(title)
1328
+ begin
1329
+ str = "lower case"
1330
+ arg = SOAP::SOAPHexBinary.new
1331
+ arg.set_encoded((str.unpack("H*")[0]).tr('A-F', 'a-f'))
1332
+ var = drv.echoHexBinary(arg)
1333
+ dumpNormal(title, str, var)
1334
+ rescue Exception
1335
+ dumpException(title)
1336
+ end
1337
+
1338
+ title = 'echoHexBinary (0FG7: junk)'
1339
+ dumpTitle(title)
1340
+ begin
1341
+ begin
1342
+ arg = SOAP::SOAPHexBinary.new("dummy")
1343
+ arg.instance_eval { @data = '0FG7' }
1344
+ var = drv.echoHexBinary(arg)
1345
+ dumpNormal(title, 'Fault', 'No error occurred.')
1346
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1347
+ dumpNormal(title, true, true)
1348
+ end
1349
+ rescue Exception
1350
+ dumpException(title)
1351
+ end
1352
+
1353
+ title = 'echoBoolean (true)'
1354
+ dumpTitle(title)
1355
+ begin
1356
+ arg = true
1357
+ var = drv.echoBoolean(arg)
1358
+ dumpNormal(title, arg, var)
1359
+ rescue Exception
1360
+ dumpException(title)
1361
+ end
1362
+
1363
+ title = 'echoBoolean (false)'
1364
+ dumpTitle(title)
1365
+ begin
1366
+ arg = false
1367
+ var = drv.echoBoolean(arg)
1368
+ dumpNormal(title, arg, var)
1369
+ rescue Exception
1370
+ dumpException(title)
1371
+ end
1372
+
1373
+ title = 'echoBoolean (junk)'
1374
+ dumpTitle(title)
1375
+ begin
1376
+ begin
1377
+ arg = SOAP::SOAPBoolean.new(true)
1378
+ arg.instance_eval { @data = 'junk' }
1379
+ var = drv.echoBoolean(arg)
1380
+ dumpNormal(title, 'Fault', 'No error occurred.')
1381
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1382
+ dumpNormal(title, true, true)
1383
+ end
1384
+ rescue Exception
1385
+ dumpException(title)
1386
+ end
1387
+
1388
+ title = 'echoDecimal (123456)'
1389
+ dumpTitle(title)
1390
+ begin
1391
+ arg = "123456789012345678"
1392
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1393
+ normalized = arg
1394
+ dumpNormal(title, normalized, var)
1395
+ rescue Exception
1396
+ dumpException(title)
1397
+ end
1398
+
1399
+ title = 'echoDecimal (+0.123)'
1400
+ dumpTitle(title)
1401
+ begin
1402
+ arg = "+0.12345678901234567"
1403
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1404
+ normalized = arg.sub(/0$/, '').sub(/^\+/, '')
1405
+ dumpNormal(title, normalized, var)
1406
+ rescue Exception
1407
+ dumpException(title)
1408
+ end
1409
+
1410
+ title = 'echoDecimal (.00000123)'
1411
+ dumpTitle(title)
1412
+ begin
1413
+ arg = ".00000123456789012"
1414
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1415
+ normalized = '0' << arg.sub(/0$/, '')
1416
+ dumpNormal(title, normalized, var)
1417
+ rescue Exception
1418
+ dumpException(title)
1419
+ end
1420
+
1421
+ title = 'echoDecimal (-.00000123)'
1422
+ dumpTitle(title)
1423
+ begin
1424
+ arg = "-.00000123456789012"
1425
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1426
+ normalized = '-0' << arg.sub(/0$/, '').sub(/-/, '')
1427
+ dumpNormal(title, normalized, var)
1428
+ rescue Exception
1429
+ dumpException(title)
1430
+ end
1431
+
1432
+ title = 'echoDecimal (-123.456)'
1433
+ dumpTitle(title)
1434
+ begin
1435
+ arg = "-123456789012345.008"
1436
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1437
+ dumpNormal(title, arg, var)
1438
+ rescue Exception
1439
+ dumpException(title)
1440
+ end
1441
+
1442
+ title = 'echoDecimal (-123.)'
1443
+ dumpTitle(title)
1444
+ begin
1445
+ arg = "-12345678901234567."
1446
+ normalized = arg.sub(/\.$/, '')
1447
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
1448
+ dumpNormal(title, normalized, var)
1449
+ rescue Exception
1450
+ dumpException(title)
1451
+ end
1452
+
1453
+ title = 'echoDecimal (0.000a: junk)'
1454
+ dumpTitle(title)
1455
+ begin
1456
+ begin
1457
+ arg = FakeDecimal.new("0.0000000000000000a")
1458
+ var = drv.echoDecimal(arg)
1459
+ dumpNormal(title, 'Fault', 'No error occurred.')
1460
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1461
+ dumpNormal(title, true, true)
1462
+ end
1463
+ rescue Exception
1464
+ dumpException(title)
1465
+ end
1466
+
1467
+ title = 'echoDecimal (00a.0001: junk)'
1468
+ dumpTitle(title)
1469
+ begin
1470
+ begin
1471
+ arg = FakeDecimal.new("00a.000000000000001")
1472
+ var = drv.echoDecimal(arg)
1473
+ dumpNormal(title, 'Fault', 'No error occurred.')
1474
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1475
+ dumpNormal(title, true, true)
1476
+ end
1477
+ rescue Exception
1478
+ dumpException(title)
1479
+ end
1480
+
1481
+ title = 'echoDecimal (+-5: junk)'
1482
+ dumpTitle(title)
1483
+ begin
1484
+ begin
1485
+ arg = FakeDecimal.new("+-5")
1486
+ var = drv.echoDecimal(arg)
1487
+ dumpNormal(title, 'Fault', 'No error occurred.')
1488
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1489
+ dumpNormal(title, true, true)
1490
+ end
1491
+ rescue Exception
1492
+ dumpException(title)
1493
+ end
1494
+
1495
+ title = 'echoDecimal (5_0: junk)'
1496
+ dumpTitle(title)
1497
+ begin
1498
+ begin
1499
+ arg = FakeDecimal.new("5_0")
1500
+ var = drv.echoDecimal(arg)
1501
+ dumpNormal(title, 'Fault', 'No error occurred.')
1502
+ rescue SOAP::RPC::ServerException, SOAP::FaultError
1503
+ dumpNormal(title, true, true)
1504
+ end
1505
+ rescue Exception
1506
+ dumpException(title)
1507
+ end
1508
+
1509
+ if false # unless $noEchoMap
1510
+
1511
+ title = 'echoMap'
1512
+ dumpTitle(title)
1513
+ begin
1514
+ arg = { "a" => 1, "b" => 2 }
1515
+ var = drv.echoMap(arg)
1516
+ dumpNormal(title, arg, var)
1517
+ rescue Exception
1518
+ dumpException(title)
1519
+ end
1520
+
1521
+ title = 'echoMap (boolean, base64, nil, float)'
1522
+ dumpTitle(title)
1523
+ begin
1524
+ arg = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1525
+ var = drv.echoMap(arg)
1526
+ dumpNormal(title, arg, var)
1527
+ rescue Exception
1528
+ dumpException(title)
1529
+ end
1530
+
1531
+ title = 'echoMap (multibyte char)'
1532
+ dumpTitle(title)
1533
+ begin
1534
+ arg = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1535
+ var = drv.echoMap(arg)
1536
+ dumpNormal(title, arg, var)
1537
+ rescue Exception
1538
+ dumpException(title)
1539
+ end
1540
+
1541
+ title = 'echoMap (Struct)'
1542
+ dumpTitle(title)
1543
+ begin
1544
+ obj = SOAPStruct.new(1, 1.1, "a")
1545
+ arg = { 1 => obj, 2 => obj }
1546
+ var = drv.echoMap(arg)
1547
+ dumpNormal(title, arg, var)
1548
+ rescue Exception
1549
+ dumpException(title)
1550
+ end
1551
+
1552
+ title = 'echoMap (multi-ref: value for key "a" == value for key "b")'
1553
+ dumpTitle(title)
1554
+ begin
1555
+ value = "c"
1556
+ arg = { "a" => value, "b" => value }
1557
+ var = drv.echoMap(arg)
1558
+ dumpNormal(title, getIdObj(var["a"]), getIdObj(var["b"]))
1559
+ rescue Exception
1560
+ dumpException(title)
1561
+ end
1562
+
1563
+ title = 'echoMap (Struct, multi-ref: varString of a key == varString of a value)'
1564
+ dumpTitle(title)
1565
+ begin
1566
+ str = ""
1567
+ obj = SOAPStruct.new(1, 1.1, str)
1568
+ arg = { obj => "1", "1" => obj }
1569
+ var = drv.echoMap(arg)
1570
+ dumpNormal(title, getIdObj(var.index("1").varString), getIdObj(var.fetch("1").varString))
1571
+ rescue Exception
1572
+ dumpException(title)
1573
+ end
1574
+
1575
+ title = 'echoMapArray'
1576
+ dumpTitle(title)
1577
+ begin
1578
+ map1 = { "a" => 1, "b" => 2 }
1579
+ map2 = { "a" => 1, "b" => 2 }
1580
+ map3 = { "a" => 1, "b" => 2 }
1581
+ arg = [map1, map2, map3]
1582
+ var = drv.echoMapArray(arg)
1583
+ dumpNormal(title, arg, var)
1584
+ rescue Exception
1585
+ dumpException(title)
1586
+ end
1587
+
1588
+ title = 'echoMapArray (boolean, base64, nil, float)'
1589
+ dumpTitle(title)
1590
+ begin
1591
+ map1 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1592
+ map2 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1593
+ map3 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1594
+ arg = [map1, map2, map3]
1595
+ var = drv.echoMapArray(arg)
1596
+ dumpNormal(title, arg, var)
1597
+ rescue Exception
1598
+ dumpException(title)
1599
+ end
1600
+
1601
+ # title = 'echoMapArray (sparse)'
1602
+ # dumpTitle(title)
1603
+ # begin
1604
+ # map1 = { "a" => 1, "b" => 2 }
1605
+ # map2 = { "a" => 1, "b" => 2 }
1606
+ # map3 = { "a" => 1, "b" => 2 }
1607
+ # arg = [nil, nil, map1, nil, map2, nil, map3, nil, nil]
1608
+ # soapAry = SOAP::Mapping.ary2soap(arg, ApacheNS, "Map", SOAPBuildersInterop::MappingRegistry)
1609
+ # soapAry.sparse = true
1610
+ # var = drv.echoMapArray(soapAry)
1611
+ # dumpNormal(title, arg, var)
1612
+ # rescue Exception
1613
+ # dumpException(title)
1614
+ # end
1615
+
1616
+ title = 'echoMapArray (multibyte char)'
1617
+ dumpTitle(title)
1618
+ begin
1619
+ map1 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1620
+ map2 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1621
+ map3 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1622
+ arg = [map1, map2, map3]
1623
+ var = drv.echoMapArray(arg)
1624
+ dumpNormal(title, arg, var)
1625
+ rescue Exception
1626
+ dumpException(title)
1627
+ end
1628
+
1629
+ # title = 'echoMapArray (sparse, multi-ref)'
1630
+ # dumpTitle(title)
1631
+ # begin
1632
+ # map1 = { "a" => 1, "b" => 2 }
1633
+ # map2 = { "a" => 1, "b" => 2 }
1634
+ # arg = [nil, nil, map1, nil, map2, nil, map1, nil, nil]
1635
+ # soapAry = SOAP::Mapping.ary2soap(arg, ApacheNS, "Map", SOAPBuildersInterop::MappingRegistry)
1636
+ # soapAry.sparse = true
1637
+ # var = drv.echoMapArray(soapAry)
1638
+ # dumpNormal(title, arg, var)
1639
+ # rescue Exception
1640
+ # dumpException(title)
1641
+ # end
1642
+
1643
+ title = 'echoMapArray (multi-ref: elem1 == elem2)'
1644
+ dumpTitle(title)
1645
+ begin
1646
+ map1 = { "a" => 1, "b" => 2 }
1647
+ map2 = { "a" => 1, "b" => 2 }
1648
+ arg = [map1, map1, map2]
1649
+ var = drv.echoMapArray(arg)
1650
+ dumpNormal(title, getIdObj(var[0]), getIdObj(var[1]))
1651
+ rescue Exception
1652
+ dumpException(title)
1653
+ end
1654
+ end
1655
+
1656
+ end
1657
+
1658
+
1659
+ ###
1660
+ ## Invoke methods.
1661
+ #
1662
+ def doTestGroupB(drv)
1663
+ setWireDumpLogFile('_GroupB')
1664
+ drv.wiredump_dev = $wireDumpDev
1665
+ # drv.wiredump_filebase = getWireDumpLogFileBase('_GroupB')
1666
+
1667
+ drv.mapping_registry = SOAPBuildersInterop::MappingRegistry
1668
+
1669
+ title = 'echoStructAsSimpleTypes'
1670
+ dumpTitle(title)
1671
+ begin
1672
+ arg = SOAPStruct.new(1, 1.1, "a")
1673
+ ret, out1, out2 = drv.echoStructAsSimpleTypes(arg)
1674
+ var = SOAPStruct.new(out1, out2, ret)
1675
+ dumpNormal(title, arg, var)
1676
+ rescue Exception
1677
+ dumpException(title)
1678
+ end
1679
+
1680
+ title = 'echoStructAsSimpleTypes (nil)'
1681
+ dumpTitle(title)
1682
+ begin
1683
+ arg = SOAPStruct.new(nil, nil, nil)
1684
+ ret, out1, out2 = drv.echoStructAsSimpleTypes(arg)
1685
+ var = SOAPStruct.new(out1, out2, ret)
1686
+ dumpNormal(title, arg, var)
1687
+ rescue Exception
1688
+ dumpException(title)
1689
+ end
1690
+
1691
+ title = 'echoSimpleTypesAsStruct'
1692
+ dumpTitle(title)
1693
+ begin
1694
+ arg = SOAPStruct.new(1, 1.1, "a")
1695
+ var = drv.echoSimpleTypesAsStruct(arg.varString, arg.varInt, arg.varFloat)
1696
+ dumpNormal(title, arg, var)
1697
+ rescue Exception
1698
+ dumpException(title)
1699
+ end
1700
+
1701
+ title = 'echoSimpleTypesAsStruct (nil)'
1702
+ dumpTitle(title)
1703
+ begin
1704
+ arg = SOAPStruct.new(nil, nil, nil)
1705
+ var = drv.echoSimpleTypesAsStruct(arg.varString, arg.varInt, arg.varFloat)
1706
+ dumpNormal(title, arg, var)
1707
+ rescue Exception
1708
+ dumpException(title)
1709
+ end
1710
+
1711
+ title = 'echo2DStringArray'
1712
+ dumpTitle(title)
1713
+ begin
1714
+
1715
+ # arg = SOAP::SOAPArray.new(SOAP::ValueArrayName, 2, XSD::XSDString::Type)
1716
+ # arg[0, 0] = obj2soap('r0c0')
1717
+ # arg[1, 0] = obj2soap('r1c0')
1718
+ # arg[2, 0] = obj2soap('r2c0')
1719
+ # arg[0, 1] = obj2soap('r0c1')
1720
+ # arg[1, 1] = obj2soap('r1c1')
1721
+ # arg[2, 1] = obj2soap('r2c1')
1722
+ # arg[0, 2] = obj2soap('r0c2')
1723
+ # arg[1, 2] = obj2soap('r1c2')
1724
+ # arg[2, 2] = obj2soap('r2c2')
1725
+
1726
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1727
+ arg.size = [3, 3]
1728
+ arg.size_fixed = true
1729
+ arg.add(SOAP::Mapping.obj2soap('r0c0', SOAPBuildersInterop::MappingRegistry))
1730
+ arg.add(SOAP::Mapping.obj2soap('r1c0', SOAPBuildersInterop::MappingRegistry))
1731
+ arg.add(SOAP::Mapping.obj2soap('r2c0', SOAPBuildersInterop::MappingRegistry))
1732
+ arg.add(SOAP::Mapping.obj2soap('r0c1', SOAPBuildersInterop::MappingRegistry))
1733
+ arg.add(SOAP::Mapping.obj2soap('r1c1', SOAPBuildersInterop::MappingRegistry))
1734
+ arg.add(SOAP::Mapping.obj2soap('r2c1', SOAPBuildersInterop::MappingRegistry))
1735
+ arg.add(SOAP::Mapping.obj2soap('r0c2', SOAPBuildersInterop::MappingRegistry))
1736
+ arg.add(SOAP::Mapping.obj2soap('r1c2', SOAPBuildersInterop::MappingRegistry))
1737
+ arg.add(SOAP::Mapping.obj2soap('r2c2', SOAPBuildersInterop::MappingRegistry))
1738
+ argNormalized = [
1739
+ ['r0c0', 'r1c0', 'r2c0'],
1740
+ ['r0c1', 'r1c1', 'r2c1'],
1741
+ ['r0c2', 'r1c2', 'r2c2'],
1742
+ ]
1743
+
1744
+ var = drv.echo2DStringArray(arg)
1745
+ dumpNormal(title, argNormalized, var)
1746
+ rescue Exception
1747
+ dumpException(title)
1748
+ end
1749
+
1750
+ title = 'echo2DStringArray (anyType array)'
1751
+ dumpTitle(title)
1752
+ begin
1753
+ # ary2md converts Arry ((of Array)...) into M-D anyType Array
1754
+ arg = [
1755
+ ['r0c0', 'r0c1', 'r0c2'],
1756
+ ['r1c0', 'r1c1', 'r1c2'],
1757
+ ['r2c0', 'r0c1', 'r2c2'],
1758
+ ]
1759
+
1760
+ paramArg = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::AnyTypeLiteral, SOAPBuildersInterop::MappingRegistry)
1761
+ paramArg.type = XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D')
1762
+ var = drv.echo2DStringArray(paramArg)
1763
+ dumpNormal(title, arg, var)
1764
+ rescue Exception
1765
+ dumpException(title)
1766
+ end
1767
+
1768
+ # title = 'echo2DStringArray (sparse)'
1769
+ # dumpTitle(title)
1770
+ # begin
1771
+ # # ary2md converts Arry ((of Array)...) into M-D anyType Array
1772
+ # arg = [
1773
+ # ['r0c0', nil, 'r0c2'],
1774
+ # [nil, 'r1c1', 'r1c2'],
1775
+ # ]
1776
+ # md = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
1777
+ # md.sparse = true
1778
+ #
1779
+ # var = drv.echo2DStringArray(md)
1780
+ # dumpNormal(title, arg, var)
1781
+ # rescue Exception
1782
+ # dumpException(title)
1783
+ # end
1784
+
1785
+ # title = 'echo2DStringArray (anyType, sparse)'
1786
+ # dumpTitle(title)
1787
+ # begin
1788
+ # # ary2md converts Arry ((of Array)...) into M-D anyType Array
1789
+ # arg = [
1790
+ # ['r0c0', nil, 'r0c2'],
1791
+ # [nil, 'r1c1', 'r1c2'],
1792
+ # ]
1793
+ # md = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
1794
+ # md.sparse = true
1795
+ #
1796
+ # var = drv.echo2DStringArray(md)
1797
+ # dumpNormal(title, arg, var)
1798
+ # rescue Exception
1799
+ # dumpException(title)
1800
+ # end
1801
+
1802
+ title = 'echo2DStringArray (multi-ref)'
1803
+ dumpTitle(title)
1804
+ begin
1805
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1806
+ arg.size = [3, 3]
1807
+ arg.size_fixed = true
1808
+
1809
+ item = 'item'
1810
+ arg.add('r0c0')
1811
+ arg.add('r1c0')
1812
+ arg.add(item)
1813
+ arg.add('r0c1')
1814
+ arg.add('r1c1')
1815
+ arg.add('r2c1')
1816
+ arg.add(item)
1817
+ arg.add('r1c2')
1818
+ arg.add('r2c2')
1819
+ argNormalized = [
1820
+ ['r0c0', 'r1c0', 'item'],
1821
+ ['r0c1', 'r1c1', 'r2c1'],
1822
+ ['item', 'r1c2', 'r2c2'],
1823
+ ]
1824
+
1825
+ var = drv.echo2DStringArray(arg)
1826
+ dumpNormal(title, argNormalized, var)
1827
+ rescue Exception
1828
+ dumpException(title)
1829
+ end
1830
+
1831
+ title = 'echo2DStringArray (multi-ref: ele[2, 0] == ele[0, 2])'
1832
+ dumpTitle(title)
1833
+ begin
1834
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1835
+ arg.size = [3, 3]
1836
+ arg.size_fixed = true
1837
+
1838
+ item = 'item'
1839
+ arg.add('r0c0')
1840
+ arg.add('r1c0')
1841
+ arg.add(item)
1842
+ arg.add('r0c1')
1843
+ arg.add('r1c1')
1844
+ arg.add('r2c1')
1845
+ arg.add(item)
1846
+ arg.add('r1c2')
1847
+ arg.add('r2c2')
1848
+
1849
+ var = drv.echo2DStringArray(arg)
1850
+ dumpNormal(title, getIdObj(var[2][0]), getIdObj(var[0][2]))
1851
+ rescue Exception
1852
+ dumpException(title)
1853
+ end
1854
+
1855
+ # title = 'echo2DStringArray (sparse, multi-ref)'
1856
+ # dumpTitle(title)
1857
+ # begin
1858
+ # # ary2md converts Arry ((of Array)...) into M-D anyType Array
1859
+ # str = "BANG!"
1860
+ # arg = [
1861
+ # ['r0c0', nil, str ],
1862
+ # [nil, str, 'r1c2'],
1863
+ # ]
1864
+ # md = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
1865
+ # md.sparse = true
1866
+ #
1867
+ # var = drv.echo2DStringArray(md)
1868
+ # dumpNormal(title, arg, var)
1869
+ # rescue Exception
1870
+ # dumpException(title)
1871
+ # end
1872
+
1873
+ title = 'echoNestedStruct'
1874
+ dumpTitle(title)
1875
+ begin
1876
+ arg = SOAPStructStruct.new(1, 1.1, "a",
1877
+ SOAPStruct.new(2, 2.2, "b")
1878
+ )
1879
+ var = drv.echoNestedStruct(arg)
1880
+ dumpNormal(title, arg, var)
1881
+ rescue Exception
1882
+ dumpException(title)
1883
+ end
1884
+
1885
+ title = 'echoNestedStruct (nil)'
1886
+ dumpTitle(title)
1887
+ begin
1888
+ arg = SOAPStructStruct.new(nil, nil, nil,
1889
+ SOAPStruct.new(nil, nil, nil)
1890
+ )
1891
+ var = drv.echoNestedStruct(arg)
1892
+ dumpNormal(title, arg, var)
1893
+ rescue Exception
1894
+ dumpException(title)
1895
+ end
1896
+
1897
+ title = 'echoNestedStruct (multi-ref: varString of StructStruct == varString of Struct)'
1898
+ dumpTitle(title)
1899
+ begin
1900
+ str1 = ""
1901
+ arg = SOAPStructStruct.new(1, 1.1, str1,
1902
+ SOAPStruct.new(2, 2.2, str1)
1903
+ )
1904
+ var = drv.echoNestedStruct(arg)
1905
+ dumpNormal(title, getIdObj(var.varString), getIdObj(var.varStruct.varString))
1906
+ rescue Exception
1907
+ dumpException(title)
1908
+ end
1909
+
1910
+ title = 'echoNestedArray'
1911
+ dumpTitle(title)
1912
+ begin
1913
+ arg = SOAPArrayStruct.new(1, 1.1, "a", StringArray["2", "2.2", "b"])
1914
+ var = drv.echoNestedArray(arg)
1915
+ dumpNormal(title, arg, var)
1916
+ rescue Exception
1917
+ dumpException(title)
1918
+ end
1919
+
1920
+ title = 'echoNestedArray (anyType array)'
1921
+ dumpTitle(title)
1922
+ begin
1923
+ arg = SOAPArrayStruct.new(1, 1.1, "a", ["2", "2.2", "b"])
1924
+ var = drv.echoNestedArray(arg)
1925
+ dumpNormal(title, arg, var)
1926
+ rescue Exception
1927
+ dumpException(title)
1928
+ end
1929
+
1930
+ title = 'echoNestedArray (multi-ref)'
1931
+ dumpTitle(title)
1932
+ begin
1933
+ str = ""
1934
+ arg = SOAPArrayStruct.new(1, 1.1, str, StringArray["2", str, "b"])
1935
+ var = drv.echoNestedArray(arg)
1936
+ dumpNormal(title, arg, var)
1937
+ rescue Exception
1938
+ dumpException(title)
1939
+ end
1940
+
1941
+ title = 'echoNestedArray (multi-ref: varString == varArray[1])'
1942
+ dumpTitle(title)
1943
+ begin
1944
+ str = ""
1945
+ arg = SOAPArrayStruct.new(1, 1.1, str, StringArray["2", str, "b"])
1946
+ var = drv.echoNestedArray(arg)
1947
+ dumpNormal(title, getIdObj(var.varString), getIdObj(var.varArray[1]))
1948
+ rescue Exception
1949
+ dumpException(title)
1950
+ end
1951
+
1952
+ # title = 'echoNestedArray (sparse, multi-ref)'
1953
+ # dumpTitle(title)
1954
+ # begin
1955
+ # str = "!"
1956
+ # subAry = [nil, nil, str, nil, str, nil]
1957
+ # ary = SOAP::Mapping.ary2soap(subAry, XSD::Namespace, XSD::StringLiteral, SOAPBuildersInterop::MappingRegistry)
1958
+ # ary.sparse = true
1959
+ # arg = SOAPArrayStruct.new(1, 1.1, str, ary)
1960
+ # argNormalized = SOAPArrayStruct.new(1, 1.1, str, subAry)
1961
+ # var = drv.echoNestedArray(arg)
1962
+ # dumpNormal(title, argNormalized, var)
1963
+ # rescue Exception
1964
+ # dumpException(title)
1965
+ # end
1966
+
1967
+ end