rtiss_soap4r 1.6.0

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