rubyjedi-soap4r 1.5.8.20100619003610 → 2.0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (434) hide show
  1. checksums.yaml +7 -0
  2. data/bin/wsdl2ruby.rb +2 -1
  3. data/bin/xsd2ruby.rb +2 -1
  4. data/lib/soap/attachment.rb +1 -1
  5. data/lib/soap/attrproxy.rb +1 -1
  6. data/lib/soap/baseData.rb +1 -1
  7. data/lib/soap/element.rb +2 -2
  8. data/lib/soap/encodingstyle/aspDotNetHandler.rb +1 -1
  9. data/lib/soap/encodingstyle/handler.rb +1 -1
  10. data/lib/soap/encodingstyle/literalHandler.rb +1 -1
  11. data/lib/soap/encodingstyle/soapHandler.rb +1 -1
  12. data/lib/soap/filter.rb +1 -1
  13. data/lib/soap/filter/filterchain.rb +1 -1
  14. data/lib/soap/filter/handler.rb +1 -1
  15. data/lib/soap/filter/streamhandler.rb +1 -1
  16. data/lib/soap/generator.rb +2 -2
  17. data/lib/soap/header/handler.rb +1 -1
  18. data/lib/soap/header/handlerset.rb +1 -1
  19. data/lib/soap/header/mappinghandler.rb +1 -1
  20. data/lib/soap/header/simplehandler.rb +1 -1
  21. data/lib/soap/httpconfigloader.rb +1 -1
  22. data/lib/soap/mapping.rb +1 -1
  23. data/lib/soap/mapping/encodedregistry.rb +16 -14
  24. data/lib/soap/mapping/factory.rb +2 -2
  25. data/lib/soap/mapping/literalregistry.rb +1 -1
  26. data/lib/soap/mapping/mapping.rb +7 -7
  27. data/lib/soap/mapping/registry.rb +1 -1
  28. data/lib/soap/mapping/rubytypeFactory.rb +1 -1
  29. data/lib/soap/mapping/schemadefinition.rb +1 -1
  30. data/lib/soap/mapping/typeMap.rb +1 -1
  31. data/lib/soap/mapping/wsdlencodedregistry.rb +1 -1
  32. data/lib/soap/mapping/wsdlliteralregistry.rb +1 -1
  33. data/lib/soap/marshal.rb +1 -1
  34. data/lib/soap/mimemessage.rb +1 -1
  35. data/lib/soap/nestedexception.rb +1 -1
  36. data/lib/soap/netHttpClient.rb +1 -1
  37. data/lib/soap/ns.rb +1 -1
  38. data/lib/soap/parser.rb +1 -1
  39. data/lib/soap/processor.rb +1 -1
  40. data/lib/soap/property.rb +7 -17
  41. data/lib/soap/proxy.rb +1 -1
  42. data/lib/soap/rpc/cgistub.rb +2 -1
  43. data/lib/soap/rpc/driver.rb +1 -1
  44. data/lib/soap/rpc/element.rb +1 -1
  45. data/lib/soap/rpc/httpserver.rb +2 -1
  46. data/lib/soap/rpc/methodDef.rb +1 -1
  47. data/lib/soap/rpc/proxy.rb +1 -1
  48. data/lib/soap/rpc/router.rb +1 -1
  49. data/lib/soap/rpc/rpc.rb +1 -1
  50. data/lib/soap/rpc/soaplet.rb +1 -1
  51. data/lib/soap/rpc/standaloneServer.rb +1 -1
  52. data/lib/soap/soap.rb +12 -3
  53. data/lib/soap/streamHandler.rb +3 -3
  54. data/lib/soap/version.rb +7 -4
  55. data/lib/soap/wsdlDriver.rb +1 -1
  56. data/lib/wsdl/binding.rb +1 -1
  57. data/lib/wsdl/data.rb +1 -1
  58. data/lib/wsdl/definitions.rb +1 -1
  59. data/lib/wsdl/documentation.rb +1 -1
  60. data/lib/wsdl/import.rb +1 -1
  61. data/lib/wsdl/importer.rb +1 -1
  62. data/lib/wsdl/info.rb +1 -1
  63. data/lib/wsdl/message.rb +1 -1
  64. data/lib/wsdl/operation.rb +1 -1
  65. data/lib/wsdl/operationBinding.rb +1 -1
  66. data/lib/wsdl/param.rb +1 -1
  67. data/lib/wsdl/parser.rb +17 -2
  68. data/lib/wsdl/part.rb +1 -1
  69. data/lib/wsdl/port.rb +1 -1
  70. data/lib/wsdl/portType.rb +1 -1
  71. data/lib/wsdl/service.rb +1 -1
  72. data/lib/wsdl/soap/address.rb +1 -1
  73. data/lib/wsdl/soap/binding.rb +1 -1
  74. data/lib/wsdl/soap/body.rb +1 -1
  75. data/lib/wsdl/soap/cgiStubCreator.rb +1 -1
  76. data/lib/wsdl/soap/classDefCreator.rb +1 -1
  77. data/lib/wsdl/soap/classDefCreatorSupport.rb +1 -1
  78. data/lib/wsdl/soap/classNameCreator.rb +1 -1
  79. data/lib/wsdl/soap/clientSkeltonCreator.rb +1 -1
  80. data/lib/wsdl/soap/complexType.rb +1 -1
  81. data/lib/wsdl/soap/data.rb +1 -1
  82. data/lib/wsdl/soap/definitions.rb +1 -1
  83. data/lib/wsdl/soap/driverCreator.rb +1 -1
  84. data/lib/wsdl/soap/element.rb +1 -1
  85. data/lib/wsdl/soap/encodedMappingRegistryCreator.rb +1 -1
  86. data/lib/wsdl/soap/fault.rb +1 -1
  87. data/lib/wsdl/soap/header.rb +1 -1
  88. data/lib/wsdl/soap/headerfault.rb +1 -1
  89. data/lib/wsdl/soap/literalMappingRegistryCreator.rb +1 -1
  90. data/lib/wsdl/soap/mappingRegistryCreator.rb +1 -1
  91. data/lib/wsdl/soap/mappingRegistryCreatorSupport.rb +1 -1
  92. data/lib/wsdl/soap/methodDefCreator.rb +1 -1
  93. data/lib/wsdl/soap/operation.rb +1 -1
  94. data/lib/wsdl/soap/servantSkeltonCreator.rb +1 -1
  95. data/lib/wsdl/soap/servletStubCreator.rb +1 -1
  96. data/lib/wsdl/soap/standaloneServerStubCreator.rb +1 -1
  97. data/lib/wsdl/soap/wsdl2ruby.rb +29 -20
  98. data/lib/wsdl/types.rb +1 -1
  99. data/lib/wsdl/wsdl.rb +1 -1
  100. data/lib/wsdl/xmlSchema/all.rb +1 -1
  101. data/lib/wsdl/xmlSchema/annotation.rb +1 -1
  102. data/lib/wsdl/xmlSchema/any.rb +1 -1
  103. data/lib/wsdl/xmlSchema/anyAttribute.rb +1 -1
  104. data/lib/wsdl/xmlSchema/attribute.rb +1 -1
  105. data/lib/wsdl/xmlSchema/attributeGroup.rb +1 -1
  106. data/lib/wsdl/xmlSchema/choice.rb +1 -1
  107. data/lib/wsdl/xmlSchema/complexContent.rb +1 -1
  108. data/lib/wsdl/xmlSchema/complexExtension.rb +1 -1
  109. data/lib/wsdl/xmlSchema/complexRestriction.rb +1 -1
  110. data/lib/wsdl/xmlSchema/complexType.rb +1 -1
  111. data/lib/wsdl/xmlSchema/content.rb +1 -1
  112. data/lib/wsdl/xmlSchema/data.rb +1 -1
  113. data/lib/wsdl/xmlSchema/element.rb +1 -1
  114. data/lib/wsdl/xmlSchema/enumeration.rb +1 -1
  115. data/lib/wsdl/xmlSchema/fractiondigits.rb +1 -1
  116. data/lib/wsdl/xmlSchema/group.rb +1 -1
  117. data/lib/wsdl/xmlSchema/import.rb +1 -2
  118. data/lib/wsdl/xmlSchema/importHandler.rb +1 -2
  119. data/lib/wsdl/xmlSchema/importer.rb +1 -1
  120. data/lib/wsdl/xmlSchema/include.rb +1 -2
  121. data/lib/wsdl/xmlSchema/length.rb +1 -1
  122. data/lib/wsdl/xmlSchema/list.rb +1 -1
  123. data/lib/wsdl/xmlSchema/maxexclusive.rb +1 -1
  124. data/lib/wsdl/xmlSchema/maxinclusive.rb +1 -1
  125. data/lib/wsdl/xmlSchema/maxlength.rb +1 -1
  126. data/lib/wsdl/xmlSchema/minexclusive.rb +1 -1
  127. data/lib/wsdl/xmlSchema/mininclusive.rb +1 -1
  128. data/lib/wsdl/xmlSchema/minlength.rb +1 -1
  129. data/lib/wsdl/xmlSchema/parser.rb +1 -1
  130. data/lib/wsdl/xmlSchema/pattern.rb +1 -1
  131. data/lib/wsdl/xmlSchema/ref.rb +1 -1
  132. data/lib/wsdl/xmlSchema/schema.rb +1 -1
  133. data/lib/wsdl/xmlSchema/sequence.rb +1 -1
  134. data/lib/wsdl/xmlSchema/simpleContent.rb +1 -1
  135. data/lib/wsdl/xmlSchema/simpleExtension.rb +1 -1
  136. data/lib/wsdl/xmlSchema/simpleRestriction.rb +1 -1
  137. data/lib/wsdl/xmlSchema/simpleType.rb +1 -1
  138. data/lib/wsdl/xmlSchema/totaldigits.rb +1 -1
  139. data/lib/wsdl/xmlSchema/union.rb +1 -1
  140. data/lib/wsdl/xmlSchema/unique.rb +1 -1
  141. data/lib/wsdl/xmlSchema/whitespace.rb +1 -1
  142. data/lib/wsdl/xmlSchema/xsd2ruby.rb +3 -2
  143. data/lib/xsd/charset.rb +2 -2
  144. data/lib/xsd/codegen.rb +1 -1
  145. data/lib/xsd/codegen/classdef.rb +1 -1
  146. data/lib/xsd/codegen/commentdef.rb +1 -1
  147. data/lib/xsd/codegen/gensupport.rb +1 -1
  148. data/lib/xsd/codegen/methoddef.rb +1 -1
  149. data/lib/xsd/codegen/moduledef.rb +1 -1
  150. data/lib/xsd/datatypes.rb +2 -3
  151. data/lib/xsd/datatypes1999.rb +1 -1
  152. data/lib/xsd/iconvcharset.rb +3 -4
  153. data/lib/xsd/mapping.rb +1 -1
  154. data/lib/xsd/namedelements.rb +1 -1
  155. data/lib/xsd/ns.rb +2 -2
  156. data/lib/xsd/qname.rb +1 -1
  157. data/lib/xsd/xmlparser.rb +43 -39
  158. data/lib/xsd/xmlparser/libxmlparser.rb +38 -18
  159. data/lib/xsd/xmlparser/nokogiriparser.rb +63 -0
  160. data/lib/xsd/xmlparser/ogaparser.rb +53 -0
  161. data/lib/xsd/xmlparser/oxparser.rb +97 -0
  162. data/lib/xsd/xmlparser/parser.rb +2 -2
  163. data/lib/xsd/xmlparser/rexmlparser.rb +4 -9
  164. metadata +190 -462
  165. data/lib/xsd/xmlparser/xmlparser.rb +0 -51
  166. data/lib/xsd/xmlparser/xmlscanner.rb +0 -150
  167. data/test/16runner.rb +0 -69
  168. data/test/helper.rb +0 -7
  169. data/test/interopR2/README.txt +0 -2
  170. data/test/interopR2/SOAPBuildersInterop_R2.wsdl +0 -461
  171. data/test/interopR2/SOAPBuildersInterop_R2GrB.wsdl +0 -19
  172. data/test/interopR2/base.rb +0 -289
  173. data/test/interopR2/client.NetRemoting.rb +0 -18
  174. data/test/interopR2/client.rb +0 -1235
  175. data/test/interopR2/client4S4C.rb +0 -16
  176. data/test/interopR2/client4S4C2.rb +0 -15
  177. data/test/interopR2/clientASP.NET.rb +0 -18
  178. data/test/interopR2/clientApacheAxis.rb +0 -17
  179. data/test/interopR2/clientApacheSOAP.rb +0 -18
  180. data/test/interopR2/clientBEAWebLogic.rb +0 -18
  181. data/test/interopR2/clientBase.rb +0 -1968
  182. data/test/interopR2/clientCapeConnect.rb +0 -19
  183. data/test/interopR2/clientDelphi.rb +0 -20
  184. data/test/interopR2/clientEasySoap.rb +0 -15
  185. data/test/interopR2/clientFrontier.rb +0 -26
  186. data/test/interopR2/clientGLUE.rb +0 -33
  187. data/test/interopR2/clientHP.rb +0 -14
  188. data/test/interopR2/clientJAX-RPC.rb +0 -20
  189. data/test/interopR2/clientJSOAP.rb +0 -15
  190. data/test/interopR2/clientKafkaXSLT.rb +0 -16
  191. data/test/interopR2/clientMSSOAPToolkit2.0.rb +0 -18
  192. data/test/interopR2/clientMSSOAPToolkit3.0.rb +0 -18
  193. data/test/interopR2/clientNuSOAP.rb +0 -20
  194. data/test/interopR2/clientNuWave.rb +0 -16
  195. data/test/interopR2/clientOpenLink.rb +0 -16
  196. data/test/interopR2/clientOracle.rb +0 -16
  197. data/test/interopR2/clientPEAR.rb +0 -19
  198. data/test/interopR2/clientPhalanx.rb +0 -19
  199. data/test/interopR2/clientSIMACE.rb +0 -19
  200. data/test/interopR2/clientSOAP4R.rb +0 -19
  201. data/test/interopR2/clientSOAP__Lite.rb +0 -15
  202. data/test/interopR2/clientSQLData.rb +0 -19
  203. data/test/interopR2/clientSilverStream.rb +0 -18
  204. data/test/interopR2/clientSpray2001.rb +0 -18
  205. data/test/interopR2/clientSun.rb +0 -20
  206. data/test/interopR2/clientVWOpentalkSoap.rb +0 -20
  207. data/test/interopR2/clientWASP.rb +0 -20
  208. data/test/interopR2/clientWASPC.rb +0 -19
  209. data/test/interopR2/clientWebMethods.rb +0 -16
  210. data/test/interopR2/clientWhiteMesa.rb +0 -29
  211. data/test/interopR2/clientWingfoot.rb +0 -16
  212. data/test/interopR2/clientXMLBus.rb +0 -20
  213. data/test/interopR2/clientXMLRPC-EPI.rb +0 -18
  214. data/test/interopR2/clientXSOAP.rb +0 -15
  215. data/test/interopR2/clientZSI.rb +0 -20
  216. data/test/interopR2/clienteSOAP.rb +0 -19
  217. data/test/interopR2/clientgSOAP.rb +0 -19
  218. data/test/interopR2/clientkSOAP.rb +0 -18
  219. data/test/interopR2/iSimonReg.rb +0 -113
  220. data/test/interopR2/interopResultBase.rb +0 -115
  221. data/test/interopR2/interopService.rb +0 -248
  222. data/test/interopR2/rwikiInteropService.rb +0 -106
  223. data/test/interopR2/server.cgi +0 -271
  224. data/test/interopR2/server.rb +0 -276
  225. data/test/interopR2/simonReg.rb +0 -124
  226. data/test/interopR2/test.sh +0 -49
  227. data/test/interopR4/client.rb +0 -113
  228. data/test/runner.rb +0 -8
  229. data/test/sm11/classDef.rb +0 -157
  230. data/test/sm11/client.rb +0 -543
  231. data/test/sm11/driver.rb +0 -184
  232. data/test/sm11/servant.rb +0 -1068
  233. data/test/sm11/server.rb +0 -26
  234. data/test/soap/asp.net/hello.wsdl +0 -96
  235. data/test/soap/asp.net/test_aspdotnet.rb +0 -124
  236. data/test/soap/auth/htdigest +0 -2
  237. data/test/soap/auth/htpasswd +0 -2
  238. data/test/soap/auth/test_basic.rb +0 -118
  239. data/test/soap/auth/test_digest.rb +0 -119
  240. data/test/soap/calc/calc.rb +0 -18
  241. data/test/soap/calc/calc2.rb +0 -30
  242. data/test/soap/calc/server.cgi +0 -16
  243. data/test/soap/calc/server.rb +0 -18
  244. data/test/soap/calc/server2.rb +0 -21
  245. data/test/soap/calc/test_calc.rb +0 -53
  246. data/test/soap/calc/test_calc2.rb +0 -57
  247. data/test/soap/calc/test_calc_cgi.rb +0 -72
  248. data/test/soap/case/test_mapping.rb +0 -58
  249. data/test/soap/fault/test_customfault.rb +0 -61
  250. data/test/soap/fault/test_fault.rb +0 -47
  251. data/test/soap/fault/test_soaparray.rb +0 -36
  252. data/test/soap/filter/test_filter.rb +0 -147
  253. data/test/soap/header/server.cgi +0 -121
  254. data/test/soap/header/test_authheader.rb +0 -241
  255. data/test/soap/header/test_authheader_cgi.rb +0 -122
  256. data/test/soap/header/test_simplehandler.rb +0 -117
  257. data/test/soap/helloworld/hw_s.rb +0 -17
  258. data/test/soap/helloworld/test_helloworld.rb +0 -45
  259. data/test/soap/htpasswd +0 -2
  260. data/test/soap/literalArrayMapping/amazonEc.rb +0 -4779
  261. data/test/soap/literalArrayMapping/amazonEcDriver.rb +0 -173
  262. data/test/soap/literalArrayMapping/amazonresponse.xml +0 -100
  263. data/test/soap/literalArrayMapping/test_definedarray.rb +0 -35
  264. data/test/soap/marshal/marshaltestlib.rb +0 -498
  265. data/test/soap/marshal/test_digraph.rb +0 -57
  266. data/test/soap/marshal/test_marshal.rb +0 -28
  267. data/test/soap/marshal/test_struct.rb +0 -48
  268. data/test/soap/ssl/README +0 -1
  269. data/test/soap/ssl/ca.cert +0 -23
  270. data/test/soap/ssl/client.cert +0 -19
  271. data/test/soap/ssl/client.key +0 -15
  272. data/test/soap/ssl/server.cert +0 -19
  273. data/test/soap/ssl/server.key +0 -15
  274. data/test/soap/ssl/sslsvr.rb +0 -59
  275. data/test/soap/ssl/subca.cert +0 -21
  276. data/test/soap/ssl/test_ssl.rb +0 -236
  277. data/test/soap/struct/test_struct.rb +0 -71
  278. data/test/soap/styleuse/client.rb +0 -21
  279. data/test/soap/styleuse/server.rb +0 -87
  280. data/test/soap/swa/test_file.rb +0 -76
  281. data/test/soap/test_basetype.rb +0 -1091
  282. data/test/soap/test_cookie.rb +0 -113
  283. data/test/soap/test_custom_ns.rb +0 -106
  284. data/test/soap/test_custommap.rb +0 -111
  285. data/test/soap/test_empty.rb +0 -106
  286. data/test/soap/test_envelopenamespace.rb +0 -86
  287. data/test/soap/test_extraattr.rb +0 -55
  288. data/test/soap/test_generator.rb +0 -32
  289. data/test/soap/test_httpconfigloader.rb +0 -72
  290. data/test/soap/test_mapping.rb +0 -132
  291. data/test/soap/test_nestedexception.rb +0 -71
  292. data/test/soap/test_nil.rb +0 -71
  293. data/test/soap/test_no_indent.rb +0 -89
  294. data/test/soap/test_property.rb +0 -429
  295. data/test/soap/test_response_as_xml.rb +0 -118
  296. data/test/soap/test_soapelement.rb +0 -139
  297. data/test/soap/test_streamhandler.rb +0 -271
  298. data/test/soap/test_styleuse.rb +0 -327
  299. data/test/soap/wsdlDriver/README.txt +0 -2
  300. data/test/soap/wsdlDriver/calc.wsdl +0 -126
  301. data/test/soap/wsdlDriver/document.wsdl +0 -54
  302. data/test/soap/wsdlDriver/echo_version.rb +0 -30
  303. data/test/soap/wsdlDriver/simpletype.wsdl +0 -63
  304. data/test/soap/wsdlDriver/test_calc.rb +0 -72
  305. data/test/soap/wsdlDriver/test_document.rb +0 -72
  306. data/test/soap/wsdlDriver/test_simpletype.rb +0 -82
  307. data/test/testutil.rb +0 -55
  308. data/test/wsdl/abstract/abstract.wsdl +0 -176
  309. data/test/wsdl/abstract/test_abstract.rb +0 -160
  310. data/test/wsdl/anonymous/expectedClassDef.rb +0 -129
  311. data/test/wsdl/anonymous/expectedDriver.rb +0 -60
  312. data/test/wsdl/anonymous/expectedMappingRegistry.rb +0 -177
  313. data/test/wsdl/anonymous/lp.wsdl +0 -147
  314. data/test/wsdl/anonymous/test_anonymous.rb +0 -131
  315. data/test/wsdl/any/any.wsdl +0 -114
  316. data/test/wsdl/any/expectedDriver.rb +0 -69
  317. data/test/wsdl/any/expectedEcho.rb +0 -58
  318. data/test/wsdl/any/expectedMappingRegistry.rb +0 -64
  319. data/test/wsdl/any/expectedService.rb +0 -70
  320. data/test/wsdl/any/test_any.rb +0 -194
  321. data/test/wsdl/axisArray/axisArray.wsdl +0 -87
  322. data/test/wsdl/axisArray/test_axisarray.rb +0 -125
  323. data/test/wsdl/choice/choice.wsdl +0 -167
  324. data/test/wsdl/choice/test_choice.rb +0 -311
  325. data/test/wsdl/complexcontent/complexContent.wsdl +0 -83
  326. data/test/wsdl/complexcontent/test_echo.rb +0 -91
  327. data/test/wsdl/datetime/DatetimeService.rb +0 -45
  328. data/test/wsdl/datetime/datetime.rb +0 -0
  329. data/test/wsdl/datetime/datetime.wsdl +0 -45
  330. data/test/wsdl/datetime/datetimeServant.rb +0 -23
  331. data/test/wsdl/datetime/test_datetime.rb +0 -88
  332. data/test/wsdl/document/array/double.wsdl +0 -161
  333. data/test/wsdl/document/array/test_array.rb +0 -202
  334. data/test/wsdl/document/document.wsdl +0 -76
  335. data/test/wsdl/document/number.wsdl +0 -54
  336. data/test/wsdl/document/ping_nosoapaction.wsdl +0 -66
  337. data/test/wsdl/document/test_nosoapaction.rb +0 -103
  338. data/test/wsdl/document/test_number.rb +0 -93
  339. data/test/wsdl/document/test_rpc.rb +0 -356
  340. data/test/wsdl/emptycomplextype.wsdl +0 -31
  341. data/test/wsdl/fault/fault.wsdl +0 -79
  342. data/test/wsdl/fault/multifault.wsdl +0 -96
  343. data/test/wsdl/fault/test_fault.rb +0 -120
  344. data/test/wsdl/fault/test_multifault.rb +0 -135
  345. data/test/wsdl/group/expectedClassdef.rb +0 -59
  346. data/test/wsdl/group/expectedDriver.rb +0 -52
  347. data/test/wsdl/group/expectedMappingRegistry.rb +0 -68
  348. data/test/wsdl/group/group.wsdl +0 -88
  349. data/test/wsdl/group/test_rpc.rb +0 -146
  350. data/test/wsdl/list/list.wsdl +0 -93
  351. data/test/wsdl/list/test_list.rb +0 -125
  352. data/test/wsdl/map/map.wsdl +0 -92
  353. data/test/wsdl/map/map.xml +0 -43
  354. data/test/wsdl/map/test_map.rb +0 -100
  355. data/test/wsdl/marshal/person.wsdl +0 -21
  356. data/test/wsdl/marshal/person_org.rb +0 -24
  357. data/test/wsdl/marshal/test_wsdlmarshal.rb +0 -76
  358. data/test/wsdl/multiplefault.wsdl +0 -75
  359. data/test/wsdl/oneway/oneway.wsdl +0 -36
  360. data/test/wsdl/oneway/test_oneway.rb +0 -109
  361. data/test/wsdl/overload/expectedClient.rb +0 -38
  362. data/test/wsdl/overload/expectedDriver.rb +0 -62
  363. data/test/wsdl/overload/expectedServant.rb +0 -36
  364. data/test/wsdl/overload/overload.wsdl +0 -70
  365. data/test/wsdl/overload/test_overload.rb +0 -132
  366. data/test/wsdl/qualified/lp.wsdl +0 -47
  367. data/test/wsdl/qualified/lp.xsd +0 -26
  368. data/test/wsdl/qualified/np.wsdl +0 -51
  369. data/test/wsdl/qualified/test_qualified.rb +0 -138
  370. data/test/wsdl/qualified/test_unqualified.rb +0 -139
  371. data/test/wsdl/raa/RAAService.rb +0 -126
  372. data/test/wsdl/raa/README.txt +0 -8
  373. data/test/wsdl/raa/expectedClassDef.rb +0 -101
  374. data/test/wsdl/raa/expectedDriver.rb +0 -97
  375. data/test/wsdl/raa/expectedMappingRegistry.rb +0 -122
  376. data/test/wsdl/raa/raa.wsdl +0 -264
  377. data/test/wsdl/raa/test_raa.rb +0 -127
  378. data/test/wsdl/ref/expectedDriver.rb +0 -52
  379. data/test/wsdl/ref/expectedProduct.rb +0 -244
  380. data/test/wsdl/ref/product.wsdl +0 -147
  381. data/test/wsdl/ref/test_ref.rb +0 -269
  382. data/test/wsdl/rpc/RPC-Literal-TestDefinitions.rb +0 -91
  383. data/test/wsdl/rpc/RPC-Literal-TestDefinitionsDriver.rb +0 -148
  384. data/test/wsdl/rpc/RPC-Literal-TestDefinitionsMappingRegistry.rb +0 -169
  385. data/test/wsdl/rpc/rpc.wsdl +0 -109
  386. data/test/wsdl/rpc/test-rpc-lit.wsdl +0 -371
  387. data/test/wsdl/rpc/test_rpc.rb +0 -177
  388. data/test/wsdl/rpc/test_rpc_lit.rb +0 -471
  389. data/test/wsdl/simplecontent/simplecontent.wsdl +0 -84
  390. data/test/wsdl/simplecontent/test_simplecontent.rb +0 -103
  391. data/test/wsdl/simpletype/rpc/expectedClient.rb +0 -35
  392. data/test/wsdl/simpletype/rpc/expectedDriver.rb +0 -59
  393. data/test/wsdl/simpletype/rpc/expectedEchoVersion.rb +0 -37
  394. data/test/wsdl/simpletype/rpc/expectedMappingRegistry.rb +0 -58
  395. data/test/wsdl/simpletype/rpc/expectedServant.rb +0 -33
  396. data/test/wsdl/simpletype/rpc/expectedService.rb +0 -56
  397. data/test/wsdl/simpletype/rpc/rpc.wsdl +0 -98
  398. data/test/wsdl/simpletype/rpc/test_rpc.rb +0 -53
  399. data/test/wsdl/simpletype/simpletype.wsdl +0 -114
  400. data/test/wsdl/simpletype/test_simpletype.rb +0 -93
  401. data/test/wsdl/soap/soapbodyparts.wsdl +0 -103
  402. data/test/wsdl/soap/test_soapbodyparts.rb +0 -80
  403. data/test/wsdl/soap/wsdl2ruby/expectedClassdef.rb +0 -22
  404. data/test/wsdl/soap/wsdl2ruby/expectedClient.rb +0 -35
  405. data/test/wsdl/soap/wsdl2ruby/expectedDriver.rb +0 -59
  406. data/test/wsdl/soap/wsdl2ruby/expectedMappingRegistry.rb +0 -37
  407. data/test/wsdl/soap/wsdl2ruby/expectedServant.rb +0 -33
  408. data/test/wsdl/soap/wsdl2ruby/expectedService.cgi +0 -49
  409. data/test/wsdl/soap/wsdl2ruby/expectedService.rb +0 -56
  410. data/test/wsdl/soap/wsdl2ruby/rpc.wsdl +0 -80
  411. data/test/wsdl/soap/wsdl2ruby/section/expectedClassdef.rb +0 -38
  412. data/test/wsdl/soap/wsdl2ruby/section/section.xsd +0 -31
  413. data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +0 -54
  414. data/test/wsdl/soap/wsdl2ruby/soapenc/soapenc.wsdl +0 -64
  415. data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +0 -84
  416. data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +0 -103
  417. data/test/wsdl/soaptype/soaptype.wsdl +0 -61
  418. data/test/wsdl/soaptype/test_soaptype.rb +0 -179
  419. data/test/wsdl/test_emptycomplextype.rb +0 -22
  420. data/test/wsdl/test_fault.rb +0 -51
  421. data/test/wsdl/test_multiplefault.rb +0 -42
  422. data/test/xsd/codegen/test_classdef.rb +0 -245
  423. data/test/xsd/noencoding.xml +0 -4
  424. data/test/xsd/test_noencoding.rb +0 -33
  425. data/test/xsd/test_ns.rb +0 -42
  426. data/test/xsd/test_xmlschemaparser.rb +0 -23
  427. data/test/xsd/test_xsd.rb +0 -1639
  428. data/test/xsd/xmllang.xml +0 -43
  429. data/test/xsd/xmlschema.xml +0 -12
  430. data/test/xsd/xsd2ruby/expected_mysample.rb +0 -66
  431. data/test/xsd/xsd2ruby/expected_mysample_mapper.rb +0 -12
  432. data/test/xsd/xsd2ruby/expected_mysample_mapping_registry.rb +0 -52
  433. data/test/xsd/xsd2ruby/section.xsd +0 -49
  434. data/test/xsd/xsd2ruby/test_xsd2ruby.rb +0 -91
@@ -1,19 +0,0 @@
1
- <?xml version="1.0"?>
2
- <definitions name="SOAP4R_SOAPBuildersInteropTest_R2GroupB"
3
- targetNamespace="http://soapinterop.org/"
4
- xmlns:tns="http://soapinterop.org/"
5
- xmlns="http://schemas.xmlsoap.org/wsdl/"
6
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
7
-
8
- <import
9
- namespace="http://soapinterop.org/"
10
- location="http://www.whitemesa.com/interop/InteropTestB.wsdl"/>
11
-
12
- <service name="SOAP4R_SOAPBuildersInteropTest_R2GroupB">
13
- <port name="InteropTestSoapPort"
14
- binding="tns:InteropTestSoapBindingB">
15
- <soap:address location="http://dev.ctor.org/soapsrv"/>
16
- </port>
17
- </service>
18
-
19
- </definitions>
@@ -1,289 +0,0 @@
1
- # encoding: ASCII-8BIT
2
- require 'soap/soap'
3
- require 'soap/mapping'
4
-
5
-
6
- InterfaceNS = 'http://soapinterop.org/'
7
- TypeNS = 'http://soapinterop.org/xsd'
8
- ApacheNS = 'http://xml.apache.org/xml-soap'
9
-
10
-
11
- module SOAPBuildersInterop
12
- extend SOAP
13
-
14
-
15
- MethodsBase = [
16
- ['echoVoid'],
17
- ['echoString',
18
- [:in, 'inputString', nil], [:retval, 'return', nil]],
19
- ['echoStringArray',
20
- [:in, 'inputStringArray', nil], [:retval, 'return', nil]],
21
- ['echoInteger',
22
- [:in, 'inputInteger', nil], [:retval, 'return', nil]],
23
- ['echoIntegerArray',
24
- [:in, 'inputIntegerArray', nil], [:retval, 'return', nil]],
25
- ['echoFloat',
26
- [:in, 'inputFloat', nil], [:retval, 'return', nil]],
27
- ['echoFloatArray',
28
- [:in, 'inputFloatArray', nil], [:retval, 'return', nil]],
29
- ['echoStruct',
30
- [:in, 'inputStruct', nil], [:retval, 'return', nil]],
31
- ['echoStructArray',
32
- [:in, 'inputStructArray', nil], [:retval, 'return', nil]],
33
- ['echoDate',
34
- [:in, 'inputDate', nil], [:retval, 'return', nil]],
35
- ['echoBase64',
36
- [:in, 'inputBase64', nil], [:retval, 'return', nil]],
37
- ['echoHexBinary',
38
- [:in, 'inputHexBinary', nil], [:retval, 'return', nil]],
39
- ['echoBoolean',
40
- [:in, 'inputBoolean', nil], [:retval, 'return', nil]],
41
- ['echoDecimal',
42
- [:in, 'inputDecimal', nil], [:retval, 'return', nil]],
43
- ['echoMap',
44
- [:in, 'inputMap', nil], [:retval, 'return', nil]],
45
- ['echoMapArray',
46
- [:in, 'inputMapArray', nil], [:retval, 'return', nil]],
47
-
48
- ['echoDouble',
49
- [:in, 'inputDouble', nil], [:retval, 'return', nil]],
50
- ['echoXSDDateTime',
51
- [:in, 'inputXSDDateTime', nil], [:retval, 'return', nil]],
52
- ['echoXSDDate',
53
- [:in, 'inputXSDDate', nil], [:retval, 'return', nil]],
54
- ['echoXSDTime',
55
- [:in, 'inputXSDTime', nil], [:retval, 'return', nil]],
56
- ]
57
-
58
- MethodsGroupB = [
59
- ['echoStructAsSimpleTypes',
60
- [:in, 'inputStruct', nil], [:out, 'outputString', nil], [:out, 'outputInteger', nil], [:out, 'outputFloat', nil]],
61
- ['echoSimpleTypesAsStruct',
62
- [:in, 'inputString', nil], [:in, 'inputInteger', nil], [:in, 'inputFloat', nil], [:retval, 'return', nil]],
63
- ['echo2DStringArray',
64
- [:in, 'input2DStringArray', nil], [:retval, 'return', nil]],
65
- ['echoNestedStruct',
66
- [:in, 'inputStruct', nil], [:retval, 'return', nil]],
67
- ['echoNestedArray',
68
- [:in, 'inputStruct', nil], [:retval, 'return', nil]],
69
- ]
70
-
71
- MethodsPolyMorph = [
72
- ['echoPolyMorph',
73
- [:in, 'inputPolyMorph', nil], [:retval, 'return', nil]],
74
- ['echoPolyMorphStruct',
75
- [:in, 'inputPolyMorphStruct', nil], [:retval, 'return', nil]],
76
- ['echoPolyMorphArray',
77
- [:in, 'inputPolyMorphArray', nil], [:retval, 'return', nil]],
78
- ]
79
-
80
-
81
- module FloatSupport
82
- def floatEquals( lhs, rhs )
83
- lhsVar = lhs.is_a?( SOAP::SOAPFloat )? lhs.data : lhs
84
- rhsVar = rhs.is_a?( SOAP::SOAPFloat )? rhs.data : rhs
85
- lhsVar == rhsVar
86
- end
87
- end
88
-
89
- class SOAPStruct
90
- include SOAP::Marshallable
91
- include FloatSupport
92
-
93
- attr_accessor :varInt, :varFloat, :varString
94
-
95
- def initialize( varInt, varFloat, varString )
96
- @varInt = varInt
97
- @varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
98
- @varString = varString
99
- end
100
-
101
- def ==( rhs )
102
- r = if rhs.is_a?( self.class )
103
- ( self.varInt == rhs.varInt &&
104
- floatEquals( self.varFloat, rhs.varFloat ) &&
105
- self.varString == rhs.varString )
106
- else
107
- false
108
- end
109
- r
110
- end
111
-
112
- def to_s
113
- "#{ varInt }:#{ varFloat }:#{ varString }"
114
- end
115
- end
116
-
117
-
118
- class SOAPStructStruct
119
- include SOAP::Marshallable
120
- include FloatSupport
121
-
122
- attr_accessor :varInt, :varFloat, :varString, :varStruct
123
-
124
- def initialize( varInt, varFloat, varString, varStruct = nil )
125
- @varInt = varInt
126
- @varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
127
- @varString = varString
128
- @varStruct = varStruct
129
- end
130
-
131
- def ==( rhs )
132
- r = if rhs.is_a?( self.class )
133
- ( self.varInt == rhs.varInt &&
134
- floatEquals( self.varFloat, rhs.varFloat ) &&
135
- self.varString == rhs.varString &&
136
- self.varStruct == rhs.varStruct )
137
- else
138
- false
139
- end
140
- r
141
- end
142
-
143
- def to_s
144
- "#{ varInt }:#{ varFloat }:#{ varString }:#{ varStruct }"
145
- end
146
- end
147
-
148
-
149
- class PolyMorphStruct
150
- include SOAP::Marshallable
151
-
152
- attr_reader :varA, :varB, :varC
153
-
154
- def initialize( varA, varB, varC )
155
- @varA = varA
156
- @varB = varB
157
- @varC = varC
158
- end
159
-
160
- def ==( rhs )
161
- r = if rhs.is_a?( self.class )
162
- ( self.varA == rhs.varA &&
163
- self.varB == rhs.varB &&
164
- self.varC == rhs.varC )
165
- else
166
- false
167
- end
168
- r
169
- end
170
-
171
- def to_s
172
- "#{ varA }:#{ varB }:#{ varC }"
173
- end
174
- end
175
-
176
-
177
- class SOAPArrayStruct
178
- include SOAP::Marshallable
179
- include FloatSupport
180
-
181
- attr_accessor :varInt, :varFloat, :varString, :varArray
182
-
183
- def initialize( varInt, varFloat, varString, varArray = nil )
184
- @varInt = varInt
185
- @varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
186
- @varString = varString
187
- @varArray = varArray
188
- end
189
-
190
- def ==( rhs )
191
- r = if rhs.is_a?( self.class )
192
- ( self.varInt == rhs.varInt &&
193
- floatEquals( self.varFloat, rhs.varFloat ) &&
194
- self.varString == rhs.varString &&
195
- self.varArray == rhs.varArray )
196
- else
197
- false
198
- end
199
- r
200
- end
201
-
202
- def to_s
203
- "#{ varInt }:#{ varFloat }:#{ varString }:#{ varArray }"
204
- end
205
- end
206
-
207
-
208
- class StringArray < Array; end
209
- class IntArray < Array; end
210
- class FloatArray < Array; end
211
- class SOAPStructArray < Array; end
212
- class SOAPMapArray < Array; end
213
- class ArrayOfanyType < Array; end
214
-
215
-
216
- MappingRegistry = SOAP::Mapping::Registry.new
217
-
218
- MappingRegistry.set(
219
- ::SOAPBuildersInterop::SOAPStruct,
220
- ::SOAP::SOAPStruct,
221
- ::SOAP::Mapping::Registry::TypedStructFactory,
222
- { :type => XSD::QName.new( TypeNS, "SOAPStruct" ) }
223
- )
224
-
225
- MappingRegistry.set(
226
- ::SOAPBuildersInterop::SOAPStructStruct,
227
- ::SOAP::SOAPStruct,
228
- ::SOAP::Mapping::Registry::TypedStructFactory,
229
- { :type => XSD::QName.new( TypeNS, "SOAPStructStruct" ) }
230
- )
231
-
232
- MappingRegistry.set(
233
- ::SOAPBuildersInterop::PolyMorphStruct,
234
- ::SOAP::SOAPStruct,
235
- ::SOAP::Mapping::Registry::TypedStructFactory,
236
- { :type => XSD::QName.new( TypeNS, "PolyMorphStruct" ) }
237
- )
238
-
239
- MappingRegistry.set(
240
- ::SOAPBuildersInterop::SOAPArrayStruct,
241
- ::SOAP::SOAPStruct,
242
- ::SOAP::Mapping::Registry::TypedStructFactory,
243
- { :type => XSD::QName.new( TypeNS, "SOAPArrayStruct" ) }
244
- )
245
-
246
- MappingRegistry.set(
247
- ::SOAPBuildersInterop::StringArray,
248
- ::SOAP::SOAPArray,
249
- ::SOAP::Mapping::Registry::TypedArrayFactory,
250
- { :type => XSD::QName.new( XSD::Namespace, XSD::StringLiteral ) }
251
- )
252
-
253
- MappingRegistry.set(
254
- ::SOAPBuildersInterop::IntArray,
255
- ::SOAP::SOAPArray,
256
- ::SOAP::Mapping::Registry::TypedArrayFactory,
257
- { :type => XSD::QName.new( XSD::Namespace, XSD::IntLiteral ) }
258
- )
259
-
260
- MappingRegistry.set(
261
- ::SOAPBuildersInterop::FloatArray,
262
- ::SOAP::SOAPArray,
263
- ::SOAP::Mapping::Registry::TypedArrayFactory,
264
- { :type => XSD::QName.new( XSD::Namespace, XSD::FloatLiteral ) }
265
- )
266
-
267
- MappingRegistry.set(
268
- ::SOAPBuildersInterop::SOAPStructArray,
269
- ::SOAP::SOAPArray,
270
- ::SOAP::Mapping::Registry::TypedArrayFactory,
271
- { :type => XSD::QName.new( TypeNS, 'SOAPStruct' ) }
272
- )
273
-
274
- MappingRegistry.set(
275
- ::SOAPBuildersInterop::SOAPMapArray,
276
- ::SOAP::SOAPArray,
277
- ::SOAP::Mapping::Registry::TypedArrayFactory,
278
- { :type => XSD::QName.new( ApacheNS, 'Map' ) }
279
- )
280
-
281
- MappingRegistry.set(
282
- ::SOAPBuildersInterop::ArrayOfanyType,
283
- ::SOAP::SOAPArray,
284
- ::SOAP::Mapping::Registry::TypedArrayFactory,
285
- { :type => XSD::AnyTypeName }
286
- )
287
-
288
-
289
- end
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # encoding: ASCII-8BIT
3
-
4
- $serverName = 'dotNetRemotingWebServices'
5
- $serverBase = 'http://www.mssoapinterop.org/remoting/ServiceA.soap'
6
- $serverGroupB = 'http://www.mssoapinterop.org/remoting/ServiceB.soap'
7
-
8
- require 'clientBase'
9
-
10
- drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
11
- methodDefBase(drvBase)
12
-
13
- drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
14
- methodDefGroupB(drvGroupB)
15
-
16
- doTestBase(drvBase)
17
- doTestGroupB(drvGroupB)
18
- submitTestResult
@@ -1,1235 +0,0 @@
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