soap4r 1.5.5.20061022

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