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,1235 @@
1
+ # encoding: ASCII-8BIT
2
+ $KCODE = 'EUC'
3
+
4
+ require 'test/unit'
5
+ require 'soap/rpc/driver'
6
+ require 'soap/mapping'
7
+ require 'base'
8
+ require 'interopResultBase'
9
+ require 'xsd/xmlparser/rexmlparser'
10
+ #XSD::Charset.encoding = 'EUC'
11
+
12
+ class Float
13
+ Precision = 5
14
+ def ==(rhs)
15
+ if rhs.is_a?(Float)
16
+ if self.nan? and rhs.nan?
17
+ true
18
+ elsif self.infinite? == rhs.infinite?
19
+ true
20
+ elsif (rhs - self).abs <= (10 ** (- Precision))
21
+ true
22
+ else
23
+ false
24
+ end
25
+ else
26
+ false
27
+ end
28
+ end
29
+ end
30
+
31
+ class FakeFloat < SOAP::SOAPFloat
32
+ def initialize(str)
33
+ super()
34
+ @data = str
35
+ end
36
+
37
+ def to_s
38
+ @data.to_s
39
+ end
40
+ end
41
+
42
+ class FakeDateTime < SOAP::SOAPDateTime
43
+ def initialize(str)
44
+ super()
45
+ @data = str
46
+ end
47
+
48
+ def to_s
49
+ @data.to_s
50
+ end
51
+ end
52
+
53
+ class FakeDecimal < SOAP::SOAPDecimal
54
+ def initialize(str)
55
+ super()
56
+ @data = str
57
+ end
58
+
59
+ def to_s
60
+ @data.to_s
61
+ end
62
+ end
63
+
64
+ class FakeInt < SOAP::SOAPInt
65
+ def initialize(str)
66
+ super()
67
+ @data = str
68
+ end
69
+
70
+ def to_s
71
+ @data.to_s
72
+ end
73
+ end
74
+
75
+ class SOAPBuildersTest < Test::Unit::TestCase
76
+ include SOAP
77
+ include SOAPBuildersInterop
78
+
79
+ NegativeZero = (-1.0 / (1.0 / 0.0))
80
+
81
+ class << self
82
+ include SOAP
83
+ def setup(name, location)
84
+ setup_log(name)
85
+ setup_drv(location)
86
+ end
87
+
88
+ def teardown
89
+ end
90
+
91
+ private
92
+
93
+ def setup_log(name)
94
+ filename = File.basename($0).sub(/\.rb$/, '') << '.log'
95
+ @@log = File.open(filename, 'w')
96
+ @@log << "File: #{ filename } - Wiredumps for SOAP4R client / #{ name } server.\n"
97
+ @@log << "Date: #{ Time.now }\n\n"
98
+ end
99
+
100
+ def setup_drv(location)
101
+ namespace = InterfaceNS
102
+ soap_action = InterfaceNS
103
+ @@drv = RPC::Driver.new(location, namespace, soap_action)
104
+ @@drv.mapping_registry = SOAPBuildersInterop::MappingRegistry
105
+ if $DEBUG
106
+ @@drv.wiredump_dev = STDOUT
107
+ else
108
+ @@drv.wiredump_dev = @@log
109
+ end
110
+ method_def(@@drv, soap_action)
111
+ end
112
+
113
+ def method_def(drv, soap_action = nil)
114
+ do_method_def(drv, SOAPBuildersInterop::MethodsBase, soap_action)
115
+ do_method_def(drv, SOAPBuildersInterop::MethodsGroupB, soap_action)
116
+ end
117
+
118
+ def do_method_def(drv, defs, soap_action = nil)
119
+ defs.each do |name, *params|
120
+ drv.add_rpc_operation(
121
+ XSD::QName.new(InterfaceNS, name), soap_action, name, params)
122
+ end
123
+ end
124
+ end
125
+
126
+ def setup
127
+ end
128
+
129
+ def teardown
130
+ end
131
+
132
+ def drv
133
+ @@drv
134
+ end
135
+
136
+ def log_test
137
+ /`([^']+)'/ =~ caller(1)[0]
138
+ title = $1
139
+ title = "==== " + title + " " << "=" * (title.length > 72 ? 0 : (72 - title.length))
140
+ @@log << "#{title}\n\n"
141
+ end
142
+
143
+ def assert_exception(klass_or_module)
144
+ begin
145
+ yield
146
+ assert(false, "Exception was not raised.")
147
+ rescue Exception => e
148
+ if klass_or_module.is_a?(Module)
149
+ assert_kind_of(klass_or_module, e)
150
+ elsif klass_or_module.is_a?(Class)
151
+ assert_instance_of(klass_or_module, e)
152
+ else
153
+ assert(false, "Must be a klass or a mogule.")
154
+ end
155
+ end
156
+ end
157
+
158
+ def inspect_with_id(obj)
159
+ case obj
160
+ when Array
161
+ obj.collect { |ele| inspect_with_id(ele) }
162
+ else
163
+ # String#== compares content of args.
164
+ "#{ obj.class }##{ obj.__id__ }"
165
+ end
166
+ end
167
+
168
+ def dump_result(title, result, resultStr)
169
+ @@test_result.add(
170
+ SOAPBuildersInteropResult::TestResult.new(
171
+ title,
172
+ result,
173
+ resultStr,
174
+ $wireDumpDev.dup
175
+ )
176
+ )
177
+ $wireDumpLogFile << "Result: #{ resultStr || 'OK' }\n\n"
178
+ $wireDumpLogFile << $wireDumpDev
179
+ $wireDumpLogFile << "\n"
180
+
181
+ $wireDumpDev.replace('')
182
+ end
183
+
184
+ def test_echoVoid
185
+ log_test
186
+ var = drv.echoVoid()
187
+ assert_equal(nil, var)
188
+ end
189
+
190
+ def test_echoString
191
+ log_test
192
+ arg = "SOAP4R Interoperability Test"
193
+ var = drv.echoString(arg)
194
+ assert_equal(arg, var)
195
+ end
196
+
197
+ def test_echoString_Entity_reference
198
+ log_test
199
+ arg = "<>\"& &lt;&gt;&quot;&amp; &amp&amp;><<<"
200
+ var = drv.echoString(arg)
201
+ assert_equal(arg, var)
202
+ end
203
+
204
+ def test_echoString_haracter_reference
205
+ log_test
206
+ arg = "\x20&#x20;\040&#32;\x7f&#x7f;\177&#127;"
207
+ tobe = " \177\177\177\177"
208
+ var = drv.echoString(SOAP::SOAPRawString.new(arg))
209
+ assert_equal(tobe, var)
210
+ end
211
+
212
+ def test_echoString_Leading_and_trailing_whitespace
213
+ log_test
214
+ arg = " SOAP4R\nInteroperability\nTest "
215
+ var = drv.echoString(arg)
216
+ assert_equal(arg, var)
217
+ end
218
+
219
+ def test_echoString_EUC_encoded
220
+ log_test
221
+ arg = "Hello (���ܸ�Japanese) ����ˤ���"
222
+ var = drv.echoString(arg)
223
+ assert_equal(arg, var)
224
+ end
225
+
226
+ def test_echoString_EUC_encoded_again
227
+ log_test
228
+ arg = "Hello (���ܸ�Japanese) ����ˤ���"
229
+ var = drv.echoString(arg)
230
+ assert_equal(arg, var)
231
+ end
232
+
233
+ def test_echoString_SJIS_encoded
234
+ log_test
235
+ arg = "Hello (���ܸ�Japanese) ����ˤ���"
236
+ require 'nkf'
237
+ arg = NKF.nkf("-sm0", arg)
238
+ drv.options["soap.mapping.external_ces"] = 'SJIS'
239
+ begin
240
+ var = drv.echoString(arg)
241
+ assert_equal(arg, var)
242
+ ensure
243
+ drv.options["soap.mapping.external_ces"] = nil
244
+ end
245
+ end
246
+
247
+ def test_echoString_empty
248
+ log_test
249
+ arg = ''
250
+ var = drv.echoString(arg)
251
+ assert_equal(arg, var)
252
+ end
253
+
254
+ def test_echoString_space
255
+ log_test
256
+ arg = ' '
257
+ var = drv.echoString(arg)
258
+ assert_equal(arg, var)
259
+ end
260
+
261
+ def test_echoString_whitespaces
262
+ log_test
263
+ arg = "\r \n \t \r \n \t"
264
+ var = drv.echoString(arg)
265
+ assert_equal(arg, var)
266
+ end
267
+
268
+ def test_echoStringArray
269
+ log_test
270
+ arg = StringArray["SOAP4R\n", " Interoperability ", "\tTest\t"]
271
+ var = drv.echoStringArray(arg)
272
+ assert_equal(arg, var)
273
+ end
274
+
275
+ def test_echoStringArray_multi_ref
276
+ log_test
277
+ str1 = "SOAP4R"
278
+ str2 = "SOAP4R"
279
+ arg = StringArray[str1, str2, str1]
280
+ var = drv.echoStringArray(arg)
281
+ assert_equal(arg, var)
282
+ end
283
+
284
+ def test_echoStringArray_multi_ref_idmatch
285
+ log_test
286
+ str1 = "SOAP4R"
287
+ str2 = "SOAP4R"
288
+ arg = StringArray[str1, str2, str1]
289
+ var = drv.echoStringArray(arg)
290
+ assert_equal(inspect_with_id(var[0]), inspect_with_id(var[2]))
291
+ end
292
+
293
+ def test_echoStringArray_empty_multi_ref_idmatch
294
+ log_test
295
+ str1 = ""
296
+ str2 = ""
297
+ arg = StringArray[str1, str2, str1]
298
+ var = drv.echoStringArray(arg)
299
+ assert_equal(inspect_with_id(var[0]), inspect_with_id(var[2]))
300
+ end
301
+
302
+ def test_echoInteger_123
303
+ log_test
304
+ arg = 123
305
+ var = drv.echoInteger(arg)
306
+ assert_equal(arg, var)
307
+ end
308
+
309
+ def test_echoInteger_2147483647
310
+ log_test
311
+ arg = 2147483647
312
+ var = drv.echoInteger(arg)
313
+ assert_equal(arg, var)
314
+ end
315
+
316
+ def test_echoInteger_negative_2147483648
317
+ log_test
318
+ arg = -2147483648
319
+ var = drv.echoInteger(arg)
320
+ assert_equal(arg, var)
321
+ end
322
+
323
+ def test_echoInteger_2147483648_junk
324
+ log_test
325
+ assert_exception(SOAP::RPC::ServerException) do
326
+ arg = FakeInt.new("2147483648")
327
+ var = drv.echoInteger(arg)
328
+ end
329
+ end
330
+
331
+ def test_echoInteger_negative_2147483649_junk
332
+ log_test
333
+ assert_exception(SOAP::RPC::ServerException) do
334
+ arg = FakeInt.new("-2147483649")
335
+ var = drv.echoInteger(arg)
336
+ end
337
+ end
338
+
339
+ def test_echoInteger_0_0_junk
340
+ log_test
341
+ assert_exception(SOAP::RPC::ServerException) do
342
+ arg = FakeInt.new("0.0")
343
+ var = drv.echoInteger(arg)
344
+ end
345
+ end
346
+
347
+ def test_echoInteger_negative_5_2_junk
348
+ log_test
349
+ assert_exception(SOAP::RPC::ServerException) do
350
+ arg = FakeInt.new("-5.2")
351
+ var = drv.echoInteger(arg)
352
+ end
353
+ end
354
+
355
+ def test_echoInteger_0_000000000a_junk
356
+ log_test
357
+ assert_exception(SOAP::RPC::ServerException) do
358
+ arg = FakeInt.new("0.000000000a")
359
+ var = drv.echoInteger(arg)
360
+ end
361
+ end
362
+
363
+ def test_echoInteger_plus_minus_5_junk
364
+ log_test
365
+ assert_exception(SOAP::RPC::ServerException) do
366
+ arg = FakeInt.new("+-5")
367
+ var = drv.echoInteger(arg)
368
+ end
369
+ end
370
+
371
+ def test_echoIntegerArray
372
+ log_test
373
+ arg = IntArray[1, 2, 3]
374
+ var = drv.echoIntegerArray(arg)
375
+ assert_equal(arg, var)
376
+ end
377
+
378
+ def test_echoIntegerArray_empty
379
+ log_test
380
+ arg = SOAP::SOAPArray.new(SOAP::ValueArrayName, 1, XSD::XSDInt::Type)
381
+ var = drv.echoIntegerArray(arg)
382
+ assert_equal([], var)
383
+ end
384
+
385
+ def test_echoFloat
386
+ log_test
387
+ arg = 3.14159265358979
388
+ var = drv.echoFloat(SOAPFloat.new(arg))
389
+ assert_equal(arg, var)
390
+ end
391
+
392
+ def test_echoFloat_scientific_notation
393
+ log_test
394
+ arg = 12.34e36
395
+ var = drv.echoFloat(SOAPFloat.new(arg))
396
+ assert_equal(arg, var)
397
+ end
398
+
399
+ def test_echoFloat_scientific_notation_2
400
+ log_test
401
+ arg = FakeFloat.new("12.34e36")
402
+ var = drv.echoFloat(SOAPFloat.new(arg))
403
+ assert_equal(12.34e36, var)
404
+ end
405
+
406
+ def test_echoFloat_scientific_notation_3
407
+ log_test
408
+ arg = FakeFloat.new("12.34E+36")
409
+ var = drv.echoFloat(SOAPFloat.new(arg))
410
+ assert_equal(12.34e36, var)
411
+ end
412
+
413
+ def test_echoFloat_scientific_notation_4
414
+ log_test
415
+ arg = FakeFloat.new("-1.4E")
416
+ var = drv.echoFloat(SOAPFloat.new(arg))
417
+ assert_equal(1.4, var)
418
+ end
419
+
420
+ def test_echoFloat_positive_lower_boundary
421
+ log_test
422
+ arg = 1.4e-45
423
+ var = drv.echoFloat(SOAPFloat.new(arg))
424
+ assert_equal(arg, var)
425
+ end
426
+
427
+ def test_echoFloat_negative_lower_boundary
428
+ log_test
429
+ arg = -1.4e-45
430
+ var = drv.echoFloat(SOAPFloat.new(arg))
431
+ assert_equal(arg, var)
432
+ end
433
+
434
+ def test_echoFloat_special_values_positive_0
435
+ log_test
436
+ arg = 0.0
437
+ var = drv.echoFloat(SOAPFloat.new(arg))
438
+ assert_equal(arg, var)
439
+ end
440
+
441
+ def test_echoFloat_special_values_negative_0
442
+ log_test
443
+ arg = NegativeZero
444
+ var = drv.echoFloat(SOAPFloat.new(arg))
445
+ assert_equal(arg, var)
446
+ end
447
+
448
+ def test_echoFloat_special_values_NaN
449
+ log_test
450
+ arg = 0.0/0.0
451
+ var = drv.echoFloat(SOAPFloat.new(arg))
452
+ assert_equal(arg, var)
453
+ end
454
+
455
+ def test_echoFloat_special_values_positive_INF
456
+ log_test
457
+ arg = 1.0/0.0
458
+ var = drv.echoFloat(SOAPFloat.new(arg))
459
+ assert_equal(arg, var)
460
+ end
461
+
462
+ def test_echoFloat_special_values_negative_INF
463
+ log_test
464
+ arg = -1.0/0.0
465
+ var = drv.echoFloat(SOAPFloat.new(arg))
466
+ assert_equal(arg, var)
467
+ end
468
+
469
+ def test_echoFloat_0_000a_junk
470
+ log_test
471
+ assert_exception(SOAP::RPC::ServerException) do
472
+ arg = FakeFloat.new("0.0000000000000000a")
473
+ var = drv.echoFloat(arg)
474
+ end
475
+ end
476
+
477
+ def test_echoFloat_00a_0001_junk
478
+ log_test
479
+ assert_exception(SOAP::RPC::ServerException) do
480
+ arg = FakeFloat.new("00a.000000000000001")
481
+ var = drv.echoFloat(arg)
482
+ end
483
+ end
484
+
485
+ def test_echoFloat_plus_minus_5_junk
486
+ log_test
487
+ assert_exception(SOAP::RPC::ServerException) do
488
+ arg = FakeFloat.new("+-5")
489
+ var = drv.echoFloat(arg)
490
+ end
491
+ end
492
+
493
+ def test_echoFloat_5_0_junk
494
+ log_test
495
+ assert_exception(SOAP::RPC::ServerException) do
496
+ arg = FakeFloat.new("5_0")
497
+ var = drv.echoFloat(arg)
498
+ end
499
+ end
500
+
501
+ def test_echoFloatArray
502
+ log_test
503
+ arg = FloatArray[SOAPFloat.new(0.0001), SOAPFloat.new(1000.0),
504
+ SOAPFloat.new(0.0)]
505
+ var = drv.echoFloatArray(arg)
506
+ assert_equal(arg.collect { |ele| ele.data }, var)
507
+ end
508
+
509
+ def test_echoFloatArray_special_values_NaN_positive_INF_negative_INF
510
+ log_test
511
+ nan = SOAPFloat.new(0.0/0.0)
512
+ inf = SOAPFloat.new(1.0/0.0)
513
+ inf_ = SOAPFloat.new(-1.0/0.0)
514
+ arg = FloatArray[nan, inf, inf_]
515
+ var = drv.echoFloatArray(arg)
516
+ assert_equal(arg.collect { |ele| ele.data }, var)
517
+ end
518
+
519
+ def test_echoStruct
520
+ log_test
521
+ arg = SOAPStruct.new(1, 1.1, "a")
522
+ var = drv.echoStruct(arg)
523
+ assert_equal(arg, var)
524
+ end
525
+
526
+ def test_echoStruct_nil_members
527
+ log_test
528
+ arg = SOAPStruct.new(nil, nil, nil)
529
+ var = drv.echoStruct(arg)
530
+ assert_equal(arg, var)
531
+ end
532
+
533
+ def test_echoStructArray
534
+ log_test
535
+ s1 = SOAPStruct.new(1, 1.1, "a")
536
+ s2 = SOAPStruct.new(2, 2.2, "b")
537
+ s3 = SOAPStruct.new(3, 3.3, "c")
538
+ arg = SOAPStructArray[s1, s2, s3]
539
+ var = drv.echoStructArray(arg)
540
+ assert_equal(arg, var)
541
+ end
542
+
543
+ def test_echoStructArray_anyType_Array
544
+ log_test
545
+ s1 = SOAPStruct.new(1, 1.1, "a")
546
+ s2 = SOAPStruct.new(2, 2.2, "b")
547
+ s3 = SOAPStruct.new(3, 3.3, "c")
548
+ arg = [s1, s2, s3]
549
+ var = drv.echoStructArray(arg)
550
+ assert_equal(arg, var)
551
+ end
552
+
553
+ def test_echoStructArray_multi_ref
554
+ log_test
555
+ s1 = SOAPStruct.new(1, 1.1, "a")
556
+ s2 = SOAPStruct.new(2, 2.2, "b")
557
+ arg = SOAPStructArray[s1, s1, s2]
558
+ var = drv.echoStructArray(arg)
559
+ assert_equal(arg, var)
560
+ end
561
+
562
+ def test_echoStructArray_multi_ref_idmatch
563
+ log_test
564
+ s1 = SOAPStruct.new(1, 1.1, "a")
565
+ s2 = SOAPStruct.new(2, 2.2, "b")
566
+ arg = SOAPStructArray[s1, s1, s2]
567
+ var = drv.echoStructArray(arg)
568
+ assert_equal(inspect_with_id(var[0]), inspect_with_id(var[1]))
569
+ end
570
+
571
+ def test_echoStructArray_anyType_Array_multi_ref_idmatch
572
+ log_test
573
+ s1 = SOAPStruct.new(1, 1.1, "a")
574
+ s2 = SOAPStruct.new(2, 2.2, "b")
575
+ arg = [s1, s2, s2]
576
+ var = drv.echoStructArray(arg)
577
+ assert_equal(inspect_with_id(var[1]), inspect_with_id(var[2]))
578
+ end
579
+
580
+ def test_echoStructArray_multi_ref_idmatch_varString_of_elem1_varString_of_elem2
581
+ log_test
582
+ str1 = "a"
583
+ str2 = "a"
584
+ s1 = SOAPStruct.new(1, 1.1, str1)
585
+ s2 = SOAPStruct.new(2, 2.2, str1)
586
+ s3 = SOAPStruct.new(3, 3.3, str2)
587
+ arg = SOAPStructArray[s1, s2, s3]
588
+ var = drv.echoStructArray(arg)
589
+ assert_equal(inspect_with_id(var[0].varString), inspect_with_id(var[1].varString))
590
+ end
591
+
592
+ def test_echoStructArray_anyType_Array_multi_ref_idmatch_varString_of_elem2_varString_of_elem3
593
+ log_test
594
+ str1 = "b"
595
+ str2 = "b"
596
+ s1 = SOAPStruct.new(1, 1.1, str2)
597
+ s2 = SOAPStruct.new(2, 2.2, str1)
598
+ s3 = SOAPStruct.new(3, 3.3, str1)
599
+ arg = [s1, s2, s3]
600
+ var = drv.echoStructArray(arg)
601
+ assert_equal(inspect_with_id(var[1].varString), inspect_with_id(var[2].varString))
602
+ end
603
+
604
+ def test_echoDate_now
605
+ log_test
606
+ t = Time.now.gmtime
607
+ arg = DateTime.new(t.year, t.mon, t.mday, t.hour, t.min, t.sec)
608
+ var = drv.echoDate(arg)
609
+ assert_equal(arg.to_s, var.to_s)
610
+ end
611
+
612
+ def test_echoDate_before_1970
613
+ log_test
614
+ t = Time.now.gmtime
615
+ arg = DateTime.new(1, 1, 1, 0, 0, 0)
616
+ var = drv.echoDate(arg)
617
+ assert_equal(arg.to_s, var.to_s)
618
+ end
619
+
620
+ def test_echoDate_after_2038
621
+ log_test
622
+ t = Time.now.gmtime
623
+ arg = DateTime.new(2038, 12, 31, 0, 0, 0)
624
+ var = drv.echoDate(arg)
625
+ assert_equal(arg.to_s, var.to_s)
626
+ end
627
+
628
+ def test_echoDate_negative_10_01_01T00_00_00Z
629
+ log_test
630
+ t = Time.now.gmtime
631
+ arg = DateTime.new(-10, 1, 1, 0, 0, 0)
632
+ var = drv.echoDate(arg)
633
+ assert_equal(arg.to_s, var.to_s)
634
+ end
635
+
636
+ def test_echoDate_time_precision_msec
637
+ log_test
638
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40.012')
639
+ argDate = arg.data
640
+ var = drv.echoDate(arg)
641
+ assert_equal(argDate, var)
642
+ end
643
+
644
+ def test_echoDate_time_precision_long
645
+ log_test
646
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40.0000000000123456789012345678900000000000')
647
+ argDate = arg.data
648
+ var = drv.echoDate(arg)
649
+ assert_equal(argDate, var)
650
+ end
651
+
652
+ def test_echoDate_positive_TZ
653
+ log_test
654
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40+07:00')
655
+ argNormalized = DateTime.new(2001, 6, 16, 18, 13, 40)
656
+ var = drv.echoDate(arg)
657
+ assert_equal(argNormalized, var)
658
+ end
659
+
660
+ def test_echoDate_negative_TZ
661
+ log_test
662
+ arg = SOAP::SOAPDateTime.new('2001-06-16T18:13:40-07:00')
663
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
664
+ var = drv.echoDate(arg)
665
+ assert_equal(argNormalized, var)
666
+ end
667
+
668
+ def test_echoDate_positive_00_00_TZ
669
+ log_test
670
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40+00:00')
671
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
672
+ var = drv.echoDate(arg)
673
+ assert_equal(argNormalized, var)
674
+ end
675
+
676
+ def test_echoDate_negative_00_00_TZ
677
+ log_test
678
+ arg = SOAP::SOAPDateTime.new('2001-06-17T01:13:40-00:00')
679
+ argNormalized = DateTime.new(2001, 6, 17, 1, 13, 40)
680
+ var = drv.echoDate(arg)
681
+ assert_equal(argNormalized, var)
682
+ end
683
+
684
+ def test_echoDate_min_TZ
685
+ log_test
686
+ arg = SOAP::SOAPDateTime.new('2001-06-16T00:00:01+00:01')
687
+ argNormalized = DateTime.new(2001, 6, 15, 23, 59, 1)
688
+ var = drv.echoDate(arg)
689
+ assert_equal(argNormalized, var)
690
+ end
691
+
692
+ def test_echoDate_year_9999
693
+ log_test
694
+ arg = SOAP::SOAPDateTime.new('10000-06-16T18:13:40-07:00')
695
+ argNormalized = DateTime.new(10000, 6, 17, 1, 13, 40)
696
+ var = drv.echoDate(arg)
697
+ assert_equal(argNormalized, var)
698
+ end
699
+
700
+ def test_echoDate_year_0
701
+ log_test
702
+ arg = SOAP::SOAPDateTime.new('-0001-06-16T18:13:40-07:00')
703
+ argNormalized = DateTime.new(0, 6, 17, 1, 13, 40)
704
+ var = drv.echoDate(arg)
705
+ assert_equal(argNormalized, var)
706
+ end
707
+
708
+ def test_echoDate_year_4713
709
+ log_test
710
+ arg = SOAP::SOAPDateTime.new('-4713-01-01T12:00:00')
711
+ argNormalized = DateTime.new(-4712, 1, 1, 12, 0, 0)
712
+ var = drv.echoDate(arg)
713
+ assert_equal(argNormalized, var)
714
+ end
715
+
716
+ def test_echoDate_year_0000_junk
717
+ log_test
718
+ assert_exception(SOAP::RPC::ServerException) do
719
+ arg = FakeDateTime.new("0000-05-18T16:52:20Z")
720
+ var = drv.echoDate(arg)
721
+ end
722
+ end
723
+
724
+ def test_echoDate_year_nn_junk
725
+ log_test
726
+ assert_exception(SOAP::RPC::ServerException) do
727
+ arg = FakeDateTime.new("05-05-18T16:52:20Z")
728
+ var = drv.echoDate(arg)
729
+ end
730
+ end
731
+
732
+ def test_echoDate_no_day_part_junk
733
+ log_test
734
+ assert_exception(SOAP::RPC::ServerException) do
735
+ arg = FakeDateTime.new("2002-05T16:52:20Z")
736
+ var = drv.echoDate(arg)
737
+ end
738
+ end
739
+
740
+ def test_echoDate_no_sec_part_junk
741
+ log_test
742
+ assert_exception(SOAP::RPC::ServerException) do
743
+ arg = FakeDateTime.new("2002-05-18T16:52Z")
744
+ var = drv.echoDate(arg)
745
+ end
746
+ end
747
+
748
+ def test_echoDate_empty_junk
749
+ log_test
750
+ assert_exception(SOAP::RPC::ServerException) do
751
+ arg = FakeDateTime.new("")
752
+ var = drv.echoDate(arg)
753
+ end
754
+ end
755
+
756
+ def test_echoBase64_xsd_base64Binary
757
+ log_test
758
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
759
+ arg = SOAP::SOAPBase64.new(str)
760
+ arg.as_xsd # Force xsd:base64Binary instead of soap-enc:base64
761
+ var = drv.echoBase64(arg)
762
+ assert_equal(str, var)
763
+ end
764
+
765
+ def test_echoBase64_xsd_base64Binary_empty
766
+ log_test
767
+ str = ""
768
+ arg = SOAP::SOAPBase64.new(str)
769
+ arg.as_xsd # Force xsd:base64Binary instead of soap-enc:base64
770
+ var = drv.echoBase64(arg)
771
+ assert_equal(str, var)
772
+ end
773
+
774
+ def test_echoBase64_SOAP_ENC_base64
775
+ log_test
776
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
777
+ arg = SOAP::SOAPBase64.new(str)
778
+ var = drv.echoBase64(arg)
779
+ assert_equal(str, var)
780
+ end
781
+
782
+ def test_echoBase64_0
783
+ log_test
784
+ str = "\0"
785
+ arg = SOAP::SOAPBase64.new(str)
786
+ var = drv.echoBase64(arg)
787
+ assert_equal(str, var)
788
+ end
789
+
790
+ def test_echoBase64_0a_0
791
+ log_test
792
+ str = "a\0b\0\0c\0\0\0"
793
+ arg = SOAP::SOAPBase64.new(str)
794
+ var = drv.echoBase64(arg)
795
+ assert_equal(str, var)
796
+ end
797
+
798
+ def test_echoBase64_junk
799
+ log_test
800
+ assert_exception(SOAP::RPC::ServerException) do
801
+ arg = SOAP::SOAPBase64.new("dummy")
802
+ arg.instance_eval { @data = '-' }
803
+ var = drv.echoBase64(arg)
804
+ end
805
+ end
806
+
807
+ def test_echoHexBinary
808
+ log_test
809
+ str = "Hello (���ܸ�Japanese) ����ˤ���"
810
+ arg = SOAP::SOAPHexBinary.new(str)
811
+ var = drv.echoHexBinary(arg)
812
+ assert_equal(str, var)
813
+ end
814
+
815
+ def test_echoHexBinary_empty
816
+ log_test
817
+ str = ""
818
+ arg = SOAP::SOAPHexBinary.new(str)
819
+ var = drv.echoHexBinary(arg)
820
+ assert_equal(str, var)
821
+ end
822
+
823
+ def test_echoHexBinary_0
824
+ log_test
825
+ str = "\0"
826
+ arg = SOAP::SOAPHexBinary.new(str)
827
+ var = drv.echoHexBinary(arg)
828
+ assert_equal(str, var)
829
+ end
830
+
831
+ def test_echoHexBinary_0a_0
832
+ log_test
833
+ str = "a\0b\0\0c\0\0\0"
834
+ arg = SOAP::SOAPHexBinary.new(str)
835
+ var = drv.echoHexBinary(arg)
836
+ assert_equal(str, var)
837
+ end
838
+
839
+ def test_echoHexBinary_lower_case
840
+ log_test
841
+ str = "lower case"
842
+ arg = SOAP::SOAPHexBinary.new
843
+ arg.set_encoded((str.unpack("H*")[0]).tr('A-F', 'a-f'))
844
+ var = drv.echoHexBinary(arg)
845
+ assert_equal(str, var)
846
+ end
847
+
848
+ def test_echoHexBinary_0FG7_junk
849
+ log_test
850
+ assert_exception(SOAP::RPC::ServerException) do
851
+ arg = SOAP::SOAPHexBinary.new("dummy")
852
+ arg.instance_eval { @data = '0FG7' }
853
+ var = drv.echoHexBinary(arg)
854
+ end
855
+ end
856
+
857
+ def test_echoBoolean_true
858
+ log_test
859
+ arg = true
860
+ var = drv.echoBoolean(arg)
861
+ assert_equal(arg, var)
862
+ end
863
+
864
+ def test_echoBoolean_false
865
+ log_test
866
+ arg = false
867
+ var = drv.echoBoolean(arg)
868
+ assert_equal(arg, var)
869
+ end
870
+
871
+ def test_echoBoolean_junk
872
+ log_test
873
+ assert_exception(SOAP::RPC::ServerException) do
874
+ arg = SOAP::SOAPBoolean.new(true)
875
+ arg.instance_eval { @data = 'junk' }
876
+ var = drv.echoBoolean(arg)
877
+ end
878
+ end
879
+
880
+ def test_echoDecimal_123456
881
+ log_test
882
+ arg = "123456789012345678"
883
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
884
+ normalized = arg
885
+ assert_equal(normalized, var)
886
+ end
887
+
888
+ def test_echoDecimal_0_123
889
+ log_test
890
+ arg = "+0.12345678901234567"
891
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
892
+ normalized = arg.sub(/0$/, '').sub(/^\+/, '')
893
+ assert_equal(normalized, var)
894
+ end
895
+
896
+ def test_echoDecimal_00000123
897
+ log_test
898
+ arg = ".00000123456789012"
899
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
900
+ normalized = '0' << arg.sub(/0$/, '')
901
+ assert_equal(normalized, var)
902
+ end
903
+
904
+ def test_echoDecimal_negative_00000123
905
+ log_test
906
+ arg = "-.00000123456789012"
907
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
908
+ normalized = '-0' << arg.sub(/0$/, '').sub(/-/, '')
909
+ assert_equal(normalized, var)
910
+ end
911
+
912
+ def test_echoDecimal_123_456
913
+ log_test
914
+ arg = "-123456789012345.008"
915
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
916
+ assert_equal(arg, var)
917
+ end
918
+
919
+ def test_echoDecimal_123
920
+ log_test
921
+ arg = "-12345678901234567."
922
+ normalized = arg.sub(/\.$/, '')
923
+ var = drv.echoDecimal(SOAP::SOAPDecimal.new(arg))
924
+ assert_equal(normalized, var)
925
+ end
926
+
927
+ def test_echoDecimal_0_000a_junk
928
+ log_test
929
+ assert_exception(SOAP::RPC::ServerException) do
930
+ arg = FakeDecimal.new("0.0000000000000000a")
931
+ var = drv.echoDecimal(arg)
932
+ end
933
+ end
934
+
935
+ def test_echoDecimal_00a_0001_junk
936
+ log_test
937
+ assert_exception(SOAP::RPC::ServerException) do
938
+ arg = FakeDecimal.new("00a.000000000000001")
939
+ var = drv.echoDecimal(arg)
940
+ end
941
+ end
942
+
943
+ def test_echoDecimal_plus_minus_5_junk
944
+ log_test
945
+ assert_exception(SOAP::RPC::ServerException) do
946
+ arg = FakeDecimal.new("+-5")
947
+ var = drv.echoDecimal(arg)
948
+ end
949
+ end
950
+
951
+ def test_echoDecimal_5_0_junk
952
+ log_test
953
+ assert_exception(SOAP::RPC::ServerException) do
954
+ arg = FakeDecimal.new("5_0")
955
+ var = drv.echoDecimal(arg)
956
+ end
957
+ end
958
+
959
+ def test_echoMap
960
+ log_test
961
+ arg = { "a" => 1, "b" => 2 }
962
+ var = drv.echoMap(arg)
963
+ assert_equal(arg, var)
964
+ end
965
+
966
+ def test_echoMap_boolean_base64_nil_float
967
+ log_test
968
+ arg = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
969
+ var = drv.echoMap(arg)
970
+ assert_equal(arg, var)
971
+ end
972
+
973
+ def test_echoMap_multibyte_char
974
+ log_test
975
+ arg = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
976
+ var = drv.echoMap(arg)
977
+ assert_equal(arg, var)
978
+ end
979
+
980
+ def test_echoMap_Struct
981
+ log_test
982
+ obj = SOAPStruct.new(1, 1.1, "a")
983
+ arg = { 1 => obj, 2 => obj }
984
+ var = drv.echoMap(arg)
985
+ assert_equal(arg, var)
986
+ end
987
+
988
+ def test_echoMap_multi_ref_idmatch_value_for_key_a
989
+ log_test
990
+ value = "c"
991
+ arg = { "a" => value, "b" => value }
992
+ var = drv.echoMap(arg)
993
+ assert_equal(inspect_with_id(var["a"]), inspect_with_id(var["b"]))
994
+ end
995
+
996
+ def test_echoMap_Struct_multi_ref_idmatch_varString_of_a_key
997
+ log_test
998
+ str = ""
999
+ obj = SOAPStruct.new(1, 1.1, str)
1000
+ arg = { obj => "1", "1" => obj }
1001
+ var = drv.echoMap(arg)
1002
+ assert_equal(inspect_with_id(var.index("1").varString), inspect_with_id(var.fetch("1").varString))
1003
+ end
1004
+
1005
+ def test_echoMapArray
1006
+ log_test
1007
+ map1 = { "a" => 1, "b" => 2 }
1008
+ map2 = { "a" => 1, "b" => 2 }
1009
+ map3 = { "a" => 1, "b" => 2 }
1010
+ arg = [map1, map2, map3]
1011
+ var = drv.echoMapArray(arg)
1012
+ assert_equal(arg, var)
1013
+ end
1014
+
1015
+ def test_echoMapArray_boolean_base64_nil_float
1016
+ log_test
1017
+ map1 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1018
+ map2 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1019
+ map3 = { true => "\0", "\0" => nil, nil => 0.0001, 0.0001 => false }
1020
+ arg = [map1, map2, map3]
1021
+ var = drv.echoMapArray(arg)
1022
+ assert_equal(arg, var)
1023
+ end
1024
+
1025
+ def test_echoMapArray_multibyte_char
1026
+ log_test
1027
+ map1 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1028
+ map2 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1029
+ map3 = { "Hello (���ܸ�Japanese) ����ˤ���" => 1, 1 => "Hello (���ܸ�Japanese) ����ˤ���" }
1030
+ arg = [map1, map2, map3]
1031
+ var = drv.echoMapArray(arg)
1032
+ assert_equal(arg, var)
1033
+ end
1034
+
1035
+ def test_echoMapArray_multi_ref_idmatch
1036
+ log_test
1037
+ map1 = { "a" => 1, "b" => 2 }
1038
+ map2 = { "a" => 1, "b" => 2 }
1039
+ arg = [map1, map1, map2]
1040
+ var = drv.echoMapArray(arg)
1041
+ assert_equal(inspect_with_id(var[0]), inspect_with_id(var[1]))
1042
+ end
1043
+
1044
+ def test_echoStructAsSimpleTypes
1045
+ log_test
1046
+ arg = SOAPStruct.new(1, 1.1, "a")
1047
+ ret, out1, out2 = drv.echoStructAsSimpleTypes(arg)
1048
+ var = SOAPStruct.new(out1, out2, ret)
1049
+ assert_equal(arg, var)
1050
+ end
1051
+
1052
+ def test_echoStructAsSimpleTypes_nil
1053
+ log_test
1054
+ arg = SOAPStruct.new(nil, nil, nil)
1055
+ ret, out1, out2 = drv.echoStructAsSimpleTypes(arg)
1056
+ var = SOAPStruct.new(out1, out2, ret)
1057
+ assert_equal(arg, var)
1058
+ end
1059
+
1060
+ def test_echoSimpleTypesAsStruct
1061
+ log_test
1062
+ arg = SOAPStruct.new(1, 1.1, "a")
1063
+ var = drv.echoSimpleTypesAsStruct(arg.varString, arg.varInt, arg.varFloat)
1064
+ assert_equal(arg, var)
1065
+ end
1066
+
1067
+ def test_echoSimpleTypesAsStruct_nil
1068
+ log_test
1069
+ arg = SOAPStruct.new(nil, nil, nil)
1070
+ var = drv.echoSimpleTypesAsStruct(arg.varString, arg.varInt, arg.varFloat)
1071
+ assert_equal(arg, var)
1072
+ end
1073
+
1074
+ def test_echo2DStringArray
1075
+ log_test
1076
+ # arg = SOAP::SOAPArray.new(SOAP::ValueArrayName, 2, XSD::XSDString::Type)
1077
+ # arg[0, 0] = obj2soap('r0c0')
1078
+ # arg[1, 0] = obj2soap('r1c0')
1079
+ # arg[2, 0] = obj2soap('r2c0')
1080
+ # arg[0, 1] = obj2soap('r0c1')
1081
+ # arg[1, 1] = obj2soap('r1c1')
1082
+ # arg[2, 1] = obj2soap('r2c1')
1083
+ # arg[0, 2] = obj2soap('r0c2')
1084
+ # arg[1, 2] = obj2soap('r1c2')
1085
+ # arg[2, 2] = obj2soap('r2c2')
1086
+
1087
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1088
+ arg.size = [3, 3]
1089
+ arg.size_fixed = true
1090
+ arg.add(SOAP::Mapping.obj2soap('r0c0', SOAPBuildersInterop::MappingRegistry))
1091
+ arg.add(SOAP::Mapping.obj2soap('r1c0', SOAPBuildersInterop::MappingRegistry))
1092
+ arg.add(SOAP::Mapping.obj2soap('r2c0', SOAPBuildersInterop::MappingRegistry))
1093
+ arg.add(SOAP::Mapping.obj2soap('r0c1', SOAPBuildersInterop::MappingRegistry))
1094
+ arg.add(SOAP::Mapping.obj2soap('r1c1', SOAPBuildersInterop::MappingRegistry))
1095
+ arg.add(SOAP::Mapping.obj2soap('r2c1', SOAPBuildersInterop::MappingRegistry))
1096
+ arg.add(SOAP::Mapping.obj2soap('r0c2', SOAPBuildersInterop::MappingRegistry))
1097
+ arg.add(SOAP::Mapping.obj2soap('r1c2', SOAPBuildersInterop::MappingRegistry))
1098
+ arg.add(SOAP::Mapping.obj2soap('r2c2', SOAPBuildersInterop::MappingRegistry))
1099
+ argNormalized = [
1100
+ ['r0c0', 'r1c0', 'r2c0'],
1101
+ ['r0c1', 'r1c1', 'r2c1'],
1102
+ ['r0c2', 'r1c2', 'r2c2'],
1103
+ ]
1104
+
1105
+ var = drv.echo2DStringArray(arg)
1106
+ assert_equal(argNormalized, var)
1107
+ end
1108
+
1109
+ def test_echo2DStringArray_anyType_array
1110
+ log_test
1111
+ # ary2md converts Arry ((of Array)...) into M-D anyType Array
1112
+ arg = [
1113
+ ['r0c0', 'r0c1', 'r0c2'],
1114
+ ['r1c0', 'r1c1', 'r1c2'],
1115
+ ['r2c0', 'r0c1', 'r2c2'],
1116
+ ]
1117
+
1118
+ paramArg = SOAP::Mapping.ary2md(arg, 2, XSD::Namespace, XSD::AnyTypeLiteral, SOAPBuildersInterop::MappingRegistry)
1119
+ paramArg.type = XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D')
1120
+ var = drv.echo2DStringArray(paramArg)
1121
+ assert_equal(arg, var)
1122
+ end
1123
+
1124
+ def test_echo2DStringArray_multi_ref
1125
+ log_test
1126
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1127
+ arg.size = [3, 3]
1128
+ arg.size_fixed = true
1129
+
1130
+ item = 'item'
1131
+ arg.add('r0c0')
1132
+ arg.add('r1c0')
1133
+ arg.add(item)
1134
+ arg.add('r0c1')
1135
+ arg.add('r1c1')
1136
+ arg.add('r2c1')
1137
+ arg.add(item)
1138
+ arg.add('r1c2')
1139
+ arg.add('r2c2')
1140
+ argNormalized = [
1141
+ ['r0c0', 'r1c0', 'item'],
1142
+ ['r0c1', 'r1c1', 'r2c1'],
1143
+ ['item', 'r1c2', 'r2c2'],
1144
+ ]
1145
+
1146
+ var = drv.echo2DStringArray(arg)
1147
+ assert_equal(argNormalized, var)
1148
+ end
1149
+
1150
+ def test_echo2DStringArray_multi_ref_idmatch
1151
+ log_test
1152
+ arg = SOAP::SOAPArray.new(XSD::QName.new('http://soapinterop.org/xsd', 'ArrayOfString2D'), 2, XSD::XSDString::Type)
1153
+ arg.size = [3, 3]
1154
+ arg.size_fixed = true
1155
+
1156
+ item = 'item'
1157
+ arg.add('r0c0')
1158
+ arg.add('r1c0')
1159
+ arg.add(item)
1160
+ arg.add('r0c1')
1161
+ arg.add('r1c1')
1162
+ arg.add('r2c1')
1163
+ arg.add(item)
1164
+ arg.add('r1c2')
1165
+ arg.add('r2c2')
1166
+
1167
+ var = drv.echo2DStringArray(arg)
1168
+ assert_equal(inspect_with_id(var[2][0]), inspect_with_id(var[0][2]))
1169
+ end
1170
+
1171
+ def test_echoNestedStruct
1172
+ log_test
1173
+ arg = SOAPStructStruct.new(1, 1.1, "a",
1174
+ SOAPStruct.new(2, 2.2, "b")
1175
+ )
1176
+ var = drv.echoNestedStruct(arg)
1177
+ assert_equal(arg, var)
1178
+ end
1179
+
1180
+ def test_echoNestedStruct_nil
1181
+ log_test
1182
+ arg = SOAPStructStruct.new(nil, nil, nil,
1183
+ SOAPStruct.new(nil, nil, nil)
1184
+ )
1185
+ var = drv.echoNestedStruct(arg)
1186
+ assert_equal(arg, var)
1187
+ end
1188
+
1189
+ def test_echoNestedStruct_multi_ref_idmatch
1190
+ log_test
1191
+ str1 = ""
1192
+ arg = SOAPStructStruct.new(1, 1.1, str1,
1193
+ SOAPStruct.new(2, 2.2, str1)
1194
+ )
1195
+ var = drv.echoNestedStruct(arg)
1196
+ assert_equal(inspect_with_id(var.varString), inspect_with_id(var.varStruct.varString))
1197
+ end
1198
+
1199
+ def test_echoNestedArray
1200
+ log_test
1201
+ arg = SOAPArrayStruct.new(1, 1.1, "a", StringArray["2", "2.2", "b"])
1202
+ var = drv.echoNestedArray(arg)
1203
+ assert_equal(arg, var)
1204
+ end
1205
+
1206
+ def test_echoNestedArray_anyType_array
1207
+ log_test
1208
+ arg = SOAPArrayStruct.new(1, 1.1, "a", ["2", "2.2", "b"])
1209
+ var = drv.echoNestedArray(arg)
1210
+ assert_equal(arg, var)
1211
+ end
1212
+
1213
+ def test_echoNestedArray_multi_ref
1214
+ log_test
1215
+ str = ""
1216
+ arg = SOAPArrayStruct.new(1, 1.1, str, StringArray["2", str, "b"])
1217
+ var = drv.echoNestedArray(arg)
1218
+ assert_equal(arg, var)
1219
+ end
1220
+
1221
+ def test_echoNestedArray_multi_ref_idmatch
1222
+ log_test
1223
+ str = ""
1224
+ arg = SOAPArrayStruct.new(1, 1.1, str, StringArray["2", str, "b"])
1225
+ var = drv.echoNestedArray(arg)
1226
+ assert_equal(inspect_with_id(var.varString), inspect_with_id(var.varArray[1]))
1227
+ end
1228
+ end
1229
+
1230
+ if $0 == __FILE__
1231
+ #name = ARGV.shift || 'localhost'
1232
+ #location = ARGV.shift || 'http://localhost:10080/'
1233
+ name = 'localhsot'; location = 'http://localhost:10080/'
1234
+ SOAPBuildersTest.setup(name, location)
1235
+ end