soap4r 1.5.5.20061022 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. data/bin/wsdl2ruby.rb +8 -8
  2. data/lib/soap/XMLSchemaDatatypes.rb +1 -1
  3. data/lib/soap/XMLSchemaDatatypes1999.rb +1 -1
  4. data/lib/soap/attachment.rb +1 -1
  5. data/lib/soap/baseData.rb +102 -54
  6. data/lib/soap/cgistub.rb +1 -1
  7. data/lib/soap/charset.rb +1 -1
  8. data/lib/soap/driver.rb +1 -1
  9. data/lib/soap/element.rb +20 -12
  10. data/lib/soap/encodingstyle/aspDotNetHandler.rb +2 -2
  11. data/lib/soap/encodingstyle/handler.rb +1 -1
  12. data/lib/soap/encodingstyle/literalHandler.rb +29 -73
  13. data/lib/soap/encodingstyle/soapHandler.rb +8 -7
  14. data/lib/soap/filter.rb +10 -0
  15. data/lib/soap/filter/filterchain.rb +51 -0
  16. data/lib/soap/filter/handler.rb +31 -0
  17. data/lib/soap/generator.rb +11 -3
  18. data/lib/soap/header/handler.rb +6 -5
  19. data/lib/soap/header/handlerset.rb +7 -7
  20. data/lib/soap/header/simplehandler.rb +1 -1
  21. data/lib/soap/httpconfigloader.rb +7 -2
  22. data/lib/soap/mapping.rb +1 -1
  23. data/lib/soap/mapping/encodedregistry.rb +36 -26
  24. data/lib/soap/mapping/encodedregistry.rb~ +531 -0
  25. data/lib/soap/mapping/factory.rb +2 -2
  26. data/lib/soap/mapping/literalregistry.rb +107 -67
  27. data/lib/soap/mapping/mapping.rb +92 -112
  28. data/lib/soap/mapping/registry.rb +25 -8
  29. data/lib/soap/mapping/rubytypeFactory.rb +1 -1
  30. data/lib/soap/mapping/schemadefinition.rb +163 -0
  31. data/lib/soap/mapping/typeMap.rb +7 -1
  32. data/lib/soap/mapping/wsdlencodedregistry.rb +2 -2
  33. data/lib/soap/mapping/wsdlliteralregistry.rb +14 -23
  34. data/lib/soap/mappingRegistry.rb +1 -1
  35. data/lib/soap/marshal.rb +1 -1
  36. data/lib/soap/namespace.rb +1 -1
  37. data/lib/soap/netHttpClient.rb +43 -13
  38. data/lib/soap/parser.rb +40 -42
  39. data/lib/soap/processor.rb +1 -1
  40. data/lib/soap/property.rb +7 -7
  41. data/lib/soap/proxy.rb +1 -1
  42. data/lib/soap/qname.rb +1 -1
  43. data/lib/soap/rpc/cgistub.rb +34 -1
  44. data/lib/soap/rpc/driver.rb +2 -1
  45. data/lib/soap/rpc/element.rb +42 -15
  46. data/lib/soap/rpc/httpserver.rb +13 -1
  47. data/lib/soap/rpc/proxy.rb +51 -41
  48. data/lib/soap/rpc/router.rb +88 -33
  49. data/lib/soap/rpc/rpc.rb +1 -1
  50. data/lib/soap/rpc/soaplet.rb +51 -3
  51. data/lib/soap/rpc/standaloneServer.rb +1 -1
  52. data/lib/soap/rpcRouter.rb +1 -1
  53. data/lib/soap/rpcUtils.rb +1 -1
  54. data/lib/soap/server.rb +1 -1
  55. data/lib/soap/soap.rb +2 -2
  56. data/lib/soap/standaloneServer.rb +1 -1
  57. data/lib/soap/streamHandler.rb +13 -4
  58. data/lib/soap/wsdlDriver.rb +11 -15
  59. data/lib/tags +5144 -0
  60. data/lib/wsdl/binding.rb +1 -1
  61. data/lib/wsdl/data.rb +1 -1
  62. data/lib/wsdl/definitions.rb +1 -1
  63. data/lib/wsdl/documentation.rb +1 -1
  64. data/lib/wsdl/import.rb +1 -1
  65. data/lib/wsdl/importer.rb +1 -1
  66. data/lib/wsdl/info.rb +1 -1
  67. data/lib/wsdl/message.rb +1 -1
  68. data/lib/wsdl/operation.rb +10 -7
  69. data/lib/wsdl/operationBinding.rb +19 -5
  70. data/lib/wsdl/param.rb +11 -3
  71. data/lib/wsdl/parser.rb +4 -3
  72. data/lib/wsdl/part.rb +1 -1
  73. data/lib/wsdl/port.rb +1 -1
  74. data/lib/wsdl/portType.rb +1 -1
  75. data/lib/wsdl/service.rb +1 -1
  76. data/lib/wsdl/soap/address.rb +1 -1
  77. data/lib/wsdl/soap/binding.rb +1 -1
  78. data/lib/wsdl/soap/body.rb +3 -1
  79. data/lib/wsdl/soap/cgiStubCreator.rb +1 -1
  80. data/lib/wsdl/soap/classDefCreator.rb +78 -14
  81. data/lib/wsdl/soap/classDefCreatorSupport.rb +28 -11
  82. data/lib/wsdl/soap/clientSkeltonCreator.rb +3 -2
  83. data/lib/wsdl/soap/complexType.rb +8 -11
  84. data/lib/wsdl/soap/data.rb +1 -1
  85. data/lib/wsdl/soap/definitions.rb +49 -4
  86. data/lib/wsdl/soap/driverCreator.rb +1 -1
  87. data/lib/wsdl/soap/element.rb +3 -2
  88. data/lib/wsdl/soap/encodedMappingRegistryCreator.rb +1 -1
  89. data/lib/wsdl/soap/fault.rb +1 -1
  90. data/lib/wsdl/soap/header.rb +1 -1
  91. data/lib/wsdl/soap/headerfault.rb +1 -1
  92. data/lib/wsdl/soap/literalMappingRegistryCreator.rb +41 -21
  93. data/lib/wsdl/soap/mappingRegistryCreator.rb +2 -1
  94. data/lib/wsdl/soap/mappingRegistryCreatorSupport.rb +45 -19
  95. data/lib/wsdl/soap/methodDefCreator.rb +28 -17
  96. data/lib/wsdl/soap/operation.rb +11 -11
  97. data/lib/wsdl/soap/servantSkeltonCreator.rb +3 -2
  98. data/lib/wsdl/soap/standaloneServerStubCreator.rb +1 -1
  99. data/lib/wsdl/soap/wsdl2ruby.rb +8 -2
  100. data/lib/wsdl/types.rb +1 -1
  101. data/lib/wsdl/wsdl.rb +1 -1
  102. data/lib/wsdl/xmlSchema/all.rb +1 -1
  103. data/lib/wsdl/xmlSchema/annotation.rb +1 -1
  104. data/lib/wsdl/xmlSchema/any.rb +10 -5
  105. data/lib/wsdl/xmlSchema/attribute.rb +1 -1
  106. data/lib/wsdl/xmlSchema/choice.rb +1 -1
  107. data/lib/wsdl/xmlSchema/complexContent.rb +11 -2
  108. data/lib/wsdl/xmlSchema/complexExtension.rb +8 -1
  109. data/lib/wsdl/xmlSchema/complexRestriction.rb +6 -2
  110. data/lib/wsdl/xmlSchema/complexType.rb +9 -1
  111. data/lib/wsdl/xmlSchema/content.rb +26 -5
  112. data/lib/wsdl/xmlSchema/data.rb +4 -1
  113. data/lib/wsdl/xmlSchema/element.rb +12 -9
  114. data/lib/wsdl/xmlSchema/enumeration.rb +1 -1
  115. data/lib/wsdl/xmlSchema/import.rb +1 -1
  116. data/lib/wsdl/xmlSchema/importer.rb +9 -6
  117. data/lib/wsdl/xmlSchema/include.rb +1 -1
  118. data/lib/wsdl/xmlSchema/length.rb +1 -1
  119. data/lib/wsdl/xmlSchema/list.rb +1 -1
  120. data/lib/wsdl/xmlSchema/maxlength.rb +1 -1
  121. data/lib/wsdl/xmlSchema/minlength.rb +1 -1
  122. data/lib/wsdl/xmlSchema/parser.rb +4 -3
  123. data/lib/wsdl/xmlSchema/pattern.rb +1 -1
  124. data/lib/wsdl/xmlSchema/schema.rb +1 -1
  125. data/lib/wsdl/xmlSchema/sequence.rb +1 -1
  126. data/lib/wsdl/xmlSchema/simpleContent.rb +1 -1
  127. data/lib/wsdl/xmlSchema/simpleExtension.rb +1 -1
  128. data/lib/wsdl/xmlSchema/simpleRestriction.rb +1 -1
  129. data/lib/wsdl/xmlSchema/simpleType.rb +8 -1
  130. data/lib/wsdl/xmlSchema/union.rb +35 -0
  131. data/lib/wsdl/xmlSchema/unique.rb +1 -1
  132. data/lib/wsdl/xmlSchema/xsd2ruby.rb +6 -1
  133. data/lib/xsd/charset.rb +1 -1
  134. data/lib/xsd/classloader.rb +26 -0
  135. data/lib/xsd/codegen.rb +1 -1
  136. data/lib/xsd/codegen/classdef.rb +1 -1
  137. data/lib/xsd/codegen/commentdef.rb +1 -1
  138. data/lib/xsd/codegen/gensupport.rb +119 -14
  139. data/lib/xsd/codegen/methoddef.rb +1 -1
  140. data/lib/xsd/codegen/moduledef.rb +1 -1
  141. data/lib/xsd/datatypes.rb +52 -13
  142. data/lib/xsd/datatypes1999.rb +1 -1
  143. data/lib/xsd/iconvcharset.rb +1 -1
  144. data/lib/xsd/mapping.rb +1 -1
  145. data/lib/xsd/namedelements.rb +1 -1
  146. data/lib/xsd/ns.rb +2 -2
  147. data/lib/xsd/qname.rb +1 -1
  148. data/lib/xsd/xmlparser.rb +16 -3
  149. data/lib/xsd/xmlparser/parser.rb +6 -2
  150. data/lib/xsd/xmlparser/rexmlparser.rb +5 -1
  151. data/lib/xsd/xmlparser/xmlparser.rb +1 -1
  152. data/lib/xsd/xmlparser/xmlscanner.rb +4 -2
  153. data/test/interopR2/InteropTest.rb +83 -0
  154. data/test/interopR2/InteropTest.wsdl +315 -0
  155. data/test/interopR2/InteropTestC.wsdl +208 -0
  156. data/test/interopR2/InteropTestDriver.rb +328 -0
  157. data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2.wsdl +461 -0
  158. data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2GroupB.wsdl +20 -0
  159. data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2GroupCClient.rb +178 -0
  160. data/test/interopR2/SOAPBuildersInterop_R2GrC.wsdl +17 -0
  161. data/test/interopR2/clientBase.rb +0 -3
  162. data/test/interopR2/groupc.wsdl +17 -0
  163. data/test/interopR2/result_client.NetRemoting.txt +0 -4593
  164. data/test/interopR2/test.sh +9 -9
  165. data/test/runner.rb +1 -3
  166. data/test/soap/asp.net/test_aspdotnet.rb +20 -9
  167. data/test/soap/case/test_mapping.rb +57 -0
  168. data/test/soap/filter/test_filter.rb +146 -0
  169. data/test/soap/literalArrayMapping/test_definedarray.rb +7 -9
  170. data/test/soap/marshal/marshaltestlib.rb +1 -1
  171. data/test/soap/ssl/test_ssl.rb +0 -10
  172. data/test/soap/struct/test_struct.rb +2 -9
  173. data/test/soap/test_basetype.rb +114 -0
  174. data/test/soap/test_empty.rb +26 -2
  175. data/test/soap/test_envelopenamespace.rb +2 -9
  176. data/test/soap/test_extraattr.rb +55 -0
  177. data/test/soap/test_httpconfigloader.rb +17 -0
  178. data/test/soap/test_property.rb +4 -1
  179. data/test/soap/test_response_as_xml.rb +31 -9
  180. data/test/soap/test_soapelement.rb +21 -3
  181. data/test/soap/test_streamhandler.rb +3 -10
  182. data/test/soap/test_styleuse.rb +2 -9
  183. data/test/soap/wsdlDriver/test_calc.rb +3 -20
  184. data/test/soap/wsdlDriver/test_document.rb +2 -9
  185. data/test/soap/wsdlDriver/test_simpletype.rb +2 -9
  186. data/test/testutil.rb +54 -0
  187. data/test/wsdl/abstract/abstract.wsdl +82 -3
  188. data/test/wsdl/abstract/test_abstract.rb +48 -19
  189. data/test/wsdl/any/any.wsdl +63 -0
  190. data/test/wsdl/any/expectedDriver.rb +22 -1
  191. data/test/wsdl/any/expectedEcho.rb +19 -0
  192. data/test/wsdl/any/expectedService.rb +29 -4
  193. data/test/wsdl/any/test_any.rb +36 -31
  194. data/test/wsdl/choice/choice.wsdl +37 -0
  195. data/test/wsdl/choice/test_choice.rb +66 -17
  196. data/test/wsdl/complexcontent/test_echo.rb +7 -18
  197. data/test/wsdl/document/array/test_array.rb +8 -18
  198. data/test/wsdl/document/ping_nosoapaction.wsdl +1 -1
  199. data/test/wsdl/document/test_nosoapaction.rb +2 -9
  200. data/test/wsdl/document/test_number.rb +3 -10
  201. data/test/wsdl/document/test_rpc.rb +96 -21
  202. data/test/wsdl/fault/fault.wsdl +79 -0
  203. data/test/wsdl/fault/multifault.wsdl +96 -0
  204. data/test/wsdl/fault/test_fault.rb +119 -0
  205. data/test/wsdl/fault/test_multifault.rb +134 -0
  206. data/test/wsdl/list/test_list.rb +6 -16
  207. data/test/wsdl/marshal/test_wsdlmarshal.rb +10 -13
  208. data/test/wsdl/oneway/oneway.wsdl +36 -0
  209. data/test/wsdl/oneway/test_oneway.rb +108 -0
  210. data/test/wsdl/overload/test_overload.rb +3 -10
  211. data/test/wsdl/qualified/test_qualified.rb +9 -17
  212. data/test/wsdl/qualified/test_unqualified.rb +14 -21
  213. data/test/wsdl/ref/expectedDriver.rb +51 -0
  214. data/test/wsdl/ref/expectedProduct.rb +71 -71
  215. data/test/wsdl/ref/test_ref.rb +13 -35
  216. data/test/wsdl/rpc/rpc.wsdl +27 -1
  217. data/test/wsdl/rpc/test-rpc-lit-qualified.wsdl +74 -0
  218. data/test/wsdl/rpc/test-rpc-lit.wsdl +11 -4
  219. data/test/wsdl/rpc/test-rpc-lit12.wsdl +455 -0
  220. data/test/wsdl/rpc/test_rpc.rb +20 -19
  221. data/test/wsdl/rpc/test_rpc_lit.rb +82 -29
  222. data/test/wsdl/simplecontent/simplecontent.wsdl +1 -0
  223. data/test/wsdl/simplecontent/test_simplecontent.rb +5 -19
  224. data/test/wsdl/simpletype/rpc/expectedDriver.rb +6 -4
  225. data/test/wsdl/simpletype/rpc/expectedEchoVersion.rb +15 -0
  226. data/test/wsdl/simpletype/rpc/expectedMappingRegistry.rb +64 -0
  227. data/test/wsdl/simpletype/rpc/expectedService.rb +6 -4
  228. data/test/wsdl/simpletype/rpc/rpc.wsdl +18 -0
  229. data/test/wsdl/simpletype/rpc/test_rpc.rb +6 -16
  230. data/test/wsdl/simpletype/simpletype.wsdl +19 -0
  231. data/test/wsdl/simpletype/test_simpletype.rb +2 -9
  232. data/test/wsdl/soap/wsdl2ruby/expectedDriver.rb +6 -4
  233. data/test/wsdl/soap/wsdl2ruby/expectedMappingRegistry.rb +40 -0
  234. data/test/wsdl/soap/wsdl2ruby/expectedService.cgi +6 -4
  235. data/test/wsdl/soap/wsdl2ruby/expectedService.rb +6 -4
  236. data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +5 -6
  237. data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +3 -16
  238. data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +9 -17
  239. data/test/wsdl/soaptype/test_soaptype.rb +29 -11
  240. data/test/xsd/test_xsd.rb +115 -1
  241. metadata +421 -454
  242. data/test/interopR2/client.NetRemoting.rb.result +0 -3410
  243. data/test/interopR2/client.NetRemoting_Base.log +0 -6279
  244. data/test/interopR2/client.NetRemoting_GroupB.log +0 -1188
  245. data/test/interopR2/client4S4C2_Base.log +0 -4955
  246. data/test/interopR2/client4S4C2_GroupB.log +0 -1000
  247. data/test/interopR2/client4S4C_Base.log +0 -4635
  248. data/test/interopR2/client4S4C_GroupB.log +0 -900
  249. data/test/interopR2/clientASP.NET_Base.log +0 -5468
  250. data/test/interopR2/clientASP.NET_GroupB.log +0 -977
  251. data/test/interopR2/clientApacheAxis_Base.log +0 -3171
  252. data/test/interopR2/clientApacheAxis_GroupB.log +0 -498
  253. data/test/interopR2/clientApacheSOAP_Base.log +0 -3171
  254. data/test/interopR2/clientBEAWebLogic_Base.log +0 -3171
  255. data/test/interopR2/clientBEAWebLogic_GroupB.log +0 -498
  256. data/test/interopR2/clientCapeConnect_Base.log +0 -2126
  257. data/test/interopR2/clientDelphi_Base.log +0 -0
  258. data/test/interopR2/clientEasySoap_Base.log +0 -6187
  259. data/test/interopR2/clientEasySoap_GroupB.log +0 -1076
  260. data/test/interopR2/clientFrontier_Base.log +0 -5188
  261. data/test/interopR2/clientHP_Base.log +0 -3171
  262. data/test/interopR2/clientHP_GroupB.log +0 -498
  263. data/test/interopR2/clientJSOAP_Base.log +0 -4465
  264. data/test/interopR2/clientJSOAP_GroupB.log +0 -824
  265. data/test/interopR2/clientKafkaXSLT_Base.log +0 -10299
  266. data/test/interopR2/clientKafkaXSLT_GroupB.log +0 -1739
  267. data/test/interopR2/clientMSSOAPToolkit2.0_Base.log +0 -4805
  268. data/test/interopR2/clientMSSOAPToolkit2.0_GroupB.log +0 -871
  269. data/test/interopR2/clientMSSOAPToolkit3.0_Base.log +0 -5076
  270. data/test/interopR2/clientMSSOAPToolkit3.0_GroupB.log +0 -908
  271. data/test/interopR2/clientNuSOAP_Base.log +0 -5076
  272. data/test/interopR2/clientNuSOAP_GroupB.log +0 -958
  273. data/test/interopR2/clientNuWave_Base.log +0 -2019
  274. data/test/interopR2/clientOpenLink_Base.log +0 -6171
  275. data/test/interopR2/clientOpenLink_GroupB.log +0 -1094
  276. data/test/interopR2/clientOracle_Base.log +0 -5594
  277. data/test/interopR2/clientPEAR_Base.log +0 -6261
  278. data/test/interopR2/clientPEAR_GroupB.log +0 -1106
  279. data/test/interopR2/clientPhalanx_Base.log +0 -41036
  280. data/test/interopR2/clientPhalanx_GroupB.log +0 -6519
  281. data/test/interopR2/clientSIMACE_Base.log +0 -6171
  282. data/test/interopR2/clientSIMACE_GroupB.log +0 -1093
  283. data/test/interopR2/clientSOAP4R.rb.result +0 -3409
  284. data/test/interopR2/clientSOAP4R_Base.log +0 -6366
  285. data/test/interopR2/clientSOAP4R_GroupB.log +0 -1112
  286. data/test/interopR2/clientSQLData_Base.log +0 -4857
  287. data/test/interopR2/clientSQLData_GroupB.log +0 -770
  288. data/test/interopR2/clientSilverStream_Base.log +0 -3171
  289. data/test/interopR2/clientSpray2001_Base.log +0 -8187
  290. data/test/interopR2/clientSpray2001_GroupB.log +0 -1408
  291. data/test/interopR2/clientSun_Base.log +0 -4641
  292. data/test/interopR2/clientSun_GroupB.log +0 -856
  293. data/test/interopR2/clientVWOpentalkSoap_Base.log +0 -5402
  294. data/test/interopR2/clientVWOpentalkSoap_GroupB.log +0 -972
  295. data/test/interopR2/clientWASPC_Base.log +0 -4187
  296. data/test/interopR2/clientWASPC_GroupB.log +0 -763
  297. data/test/interopR2/clientWASP_Base.log +0 -5414
  298. data/test/interopR2/clientWASP_GroupB.log +0 -970
  299. data/test/interopR2/clientWebMethods_Base.log +0 -3075
  300. data/test/interopR2/clientWebMethods_GroupB.log +0 -483
  301. data/test/interopR2/clientWhiteMesa_Base.log +0 -4359
  302. data/test/interopR2/clientWhiteMesa_GroupB.log +0 -808
  303. data/test/interopR2/clientWingfoot_Base.log +0 -4445
  304. data/test/interopR2/clientWingfoot_GroupB.log +0 -848
  305. data/test/interopR2/clientXMLBus_Base.log +0 -3075
  306. data/test/interopR2/clientXMLBus_GroupB.log +0 -483
  307. data/test/interopR2/clientXSOAP_Base.log +0 -4445
  308. data/test/interopR2/clienteSOAP_Base.log +0 -8728
  309. data/test/interopR2/clientgSOAP_Base.log +0 -4689
  310. data/test/interopR2/clientgSOAP_GroupB.log +0 -1014
  311. data/test/interopR2/clientkSOAP_Base.log +0 -5625
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL binding definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL data definitions.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL definitions.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL SOAP documentation element.
2
- # Copyright (C) 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL import definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL importer library.
2
- # Copyright (C) 2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL information base.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL message definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL operation definition.
2
- # Copyright (C) 2002, 2003, 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -45,13 +45,17 @@ class Operation < Info
45
45
  parent.targetnamespace
46
46
  end
47
47
 
48
+ def operationname
49
+ as_operationname(@name)
50
+ end
51
+
48
52
  def input_info
49
53
  if message = input_message
50
54
  typename = message.name
51
55
  else
52
56
  typename = nil
53
57
  end
54
- NameInfo.new(operationname(@name), typename, inputparts)
58
+ NameInfo.new(operationname, typename, inputparts)
55
59
  end
56
60
 
57
61
  def output_info
@@ -60,11 +64,10 @@ class Operation < Info
60
64
  else
61
65
  typename = nil
62
66
  end
63
- NameInfo.new(operationname(@name), typename, outputparts)
67
+ NameInfo.new(operationname, typename, outputparts)
64
68
  end
65
69
 
66
70
  EMPTY = [].freeze
67
-
68
71
  def inputparts
69
72
  if message = input_message
70
73
  sort_parts(message.parts)
@@ -75,7 +78,7 @@ class Operation < Info
75
78
 
76
79
  def inputname
77
80
  if input
78
- operationname(input.name ? input.name.name : @name)
81
+ as_operationname(input.name ? input.name.name : @name)
79
82
  else
80
83
  nil
81
84
  end
@@ -91,7 +94,7 @@ class Operation < Info
91
94
 
92
95
  def outputname
93
96
  if output
94
- operationname(output.name ? output.name.name : @name + 'Response')
97
+ as_operationname(output.name ? output.name.name : @name + 'Response')
95
98
  else
96
99
  nil
97
100
  end
@@ -166,7 +169,7 @@ private
166
169
  result
167
170
  end
168
171
 
169
- def operationname(name)
172
+ def as_operationname(name)
170
173
  XSD::QName.new(targetnamespace, name)
171
174
  end
172
175
  end
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL bound operation definition.
2
- # Copyright (C) 2002, 2003, 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -49,11 +49,11 @@ class OperationBinding < Info
49
49
  end
50
50
 
51
51
  def soapoperation_name
52
- if @soapoperation
53
- @soapoperation.input_info.op_name
54
- else
55
- find_operation.name
52
+ op_name = find_operation.operationname
53
+ if @input and @input.soapbody and @input.soapbody.namespace
54
+ op_name = XSD::QName.new(@input.soapbody.namespace, op_name.name)
56
55
  end
56
+ op_name
57
57
  end
58
58
 
59
59
  def soapoperation_style
@@ -68,6 +68,14 @@ class OperationBinding < Info
68
68
  style || :document
69
69
  end
70
70
 
71
+ def soapbody_use_input
72
+ soapbody_use(@input)
73
+ end
74
+
75
+ def soapbody_use_output
76
+ soapbody_use(@output)
77
+ end
78
+
71
79
  def soapaction
72
80
  if @soapoperation
73
81
  @soapoperation.soapaction
@@ -110,6 +118,12 @@ class OperationBinding < Info
110
118
  nil
111
119
  end
112
120
  end
121
+
122
+ private
123
+
124
+ def soapbody_use(param)
125
+ param ? param.soapbody_use : nil
126
+ end
113
127
  end
114
128
 
115
129
 
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL param definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -40,7 +40,15 @@ class Param < Info
40
40
  if @soapbody
41
41
  @soapbody.use || :literal
42
42
  else
43
- raise RuntimeError.new("soap:body not found")
43
+ nil
44
+ end
45
+ end
46
+
47
+ def soapbody_encodingstyle
48
+ if @soapbody
49
+ @soapbody.encodingstyle
50
+ else
51
+ nil
44
52
  end
45
53
  end
46
54
 
@@ -56,7 +64,7 @@ class Param < Info
56
64
  o
57
65
  when SOAPFaultName
58
66
  o = WSDL::SOAP::Fault.new
59
- @soap_fault = o
67
+ @soapfault = o
60
68
  o
61
69
  when DocumentationName
62
70
  o = Documentation.new
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL XML Instance parser library.
2
- # Copyright (C) 2002, 2003, 2005, 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -74,13 +74,14 @@ public
74
74
  lastframe = @parsestack.last
75
75
  ns = parent = nil
76
76
  if lastframe
77
- ns = lastframe.ns.clone_ns
77
+ ns = lastframe.ns
78
78
  parent = lastframe.node
79
79
  else
80
80
  ns = XSD::NS.new
81
81
  parent = nil
82
82
  end
83
- attrs = XSD::XMLParser.filter_ns(ns, attrs)
83
+ # ns might be the same
84
+ ns, attrs = XSD::XMLParser.filter_ns(ns, attrs)
84
85
  node = decode_tag(ns, name, attrs, parent)
85
86
  @parsestack << ParseFrame.new(ns, name, node)
86
87
  end
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL part definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL port definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL portType definition.
2
- # Copyright (C) 2002, 2003, 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL service definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL SOAP address definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL SOAP binding definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - WSDL SOAP body definition.
2
- # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -43,6 +43,8 @@ class Body < Info
43
43
  end
44
44
  when EncodingStyleAttrName
45
45
  @encodingstyle = value.source
46
+ @encodingstyle = nil if @encodingstyle.to_s.empty?
47
+ value.source
46
48
  when NamespaceAttrName
47
49
  @namespace = value.source
48
50
  else
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - Creating CGI stub code from WSDL.
2
- # Copyright (C) 2002, 2003, 2005, 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -1,5 +1,5 @@
1
1
  # WSDL4R - Creating class definition from WSDL
2
- # Copyright (C) 2002-2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
3
 
4
4
  # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
5
  # redistribute it and/or modify it under the same terms of Ruby's license;
@@ -46,22 +46,22 @@ class ClassDefCreator
46
46
  if type
47
47
  result << dump_classdef(type.name, type)
48
48
  else
49
- str = dump_element
49
+ str = dump_complextype
50
50
  unless str.empty?
51
51
  result << "\n" unless result.empty?
52
52
  result << str
53
53
  end
54
- str = dump_attribute
54
+ str = dump_simpletype
55
55
  unless str.empty?
56
56
  result << "\n" unless result.empty?
57
57
  result << str
58
58
  end
59
- str = dump_complextype
59
+ str = dump_element
60
60
  unless str.empty?
61
61
  result << "\n" unless result.empty?
62
62
  result << str
63
63
  end
64
- str = dump_simpletype
64
+ str = dump_attribute
65
65
  unless str.empty?
66
66
  result << "\n" unless result.empty?
67
67
  result << str
@@ -79,11 +79,10 @@ private
79
79
 
80
80
  def dump_element
81
81
  @elements.collect { |ele|
82
+ qualified = (ele.elementform == 'qualified')
82
83
  if ele.local_complextype
83
- qualified = (ele.elementform == 'qualified')
84
84
  dump_complextypedef(ele.name, ele.local_complextype, qualified)
85
85
  elsif ele.local_simpletype
86
- qualified = (ele.elementform == 'qualified')
87
86
  dump_simpletypedef(ele.name, ele.local_simpletype, qualified)
88
87
  else
89
88
  nil
@@ -106,7 +105,7 @@ private
106
105
  end
107
106
 
108
107
  def dump_complextype
109
- @complextypes.collect { |type|
108
+ definitions = sort_dependency(@complextypes).collect { |type|
110
109
  dump_complextypedef(type.name, type)
111
110
  }.compact.join("\n")
112
111
  end
@@ -116,6 +115,8 @@ private
116
115
  dump_simpletypedef_restriction(qname, simpletype, qualified)
117
116
  elsif simpletype.list
118
117
  dump_simpletypedef_list(qname, simpletype, qualified)
118
+ elsif simpletype.union
119
+ dump_simpletypedef_union(qname, simpletype, qualified)
119
120
  else
120
121
  raise RuntimeError.new("unknown kind of simpletype: #{simpletype}")
121
122
  end
@@ -128,6 +129,7 @@ private
128
129
  return nil
129
130
  end
130
131
  classname = create_class_name(qname)
132
+ check_classname(classname)
131
133
  c = ClassDef.new(classname, '::String')
132
134
  c.comment = "#{qname}"
133
135
  define_classenum_restriction(c, classname, restriction.enumeration)
@@ -136,7 +138,9 @@ private
136
138
 
137
139
  def dump_simpletypedef_list(qname, typedef, qualified)
138
140
  list = typedef.list
139
- c = ClassDef.new(create_class_name(qname), '::Array')
141
+ classname = create_class_name(qname)
142
+ check_classname(classname)
143
+ c = ClassDef.new(classname, '::Array')
140
144
  c.comment = "#{qname}"
141
145
  if simpletype = list.local_simpletype
142
146
  if simpletype.restriction.nil?
@@ -144,7 +148,7 @@ private
144
148
  "unknown kind of simpletype: #{simpletype}")
145
149
  end
146
150
  define_stringenum_restriction(c, simpletype.restriction.enumeration)
147
- c.comment << "\n contains list of #{create_class_name(qname)}::*"
151
+ c.comment << "\n contains list of #{classname}::*"
148
152
  elsif list.itemtype
149
153
  c.comment << "\n contains list of #{create_class_name(list.itemtype)}::*"
150
154
  else
@@ -153,6 +157,17 @@ private
153
157
  c.dump
154
158
  end
155
159
 
160
+ def dump_simpletypedef_union(qname, typedef, qualified)
161
+ union = typedef.union
162
+ c = ClassDef.new(create_class_name(qname), '::String')
163
+ c.comment = "#{qname}"
164
+ if union.member_types
165
+ # fixme
166
+ c.comment << "\n any of #{union.member_types}"
167
+ end
168
+ c.dump
169
+ end
170
+
156
171
  def define_stringenum_restriction(c, enumeration)
157
172
  const = {}
158
173
  enumeration.each do |value|
@@ -178,7 +193,9 @@ private
178
193
  end
179
194
 
180
195
  def dump_simpleclassdef(qname, type_or_element)
181
- c = ClassDef.new(create_class_name(qname), '::String')
196
+ classname = create_class_name(qname)
197
+ check_classname(classname)
198
+ c = ClassDef.new(classname, '::String')
182
199
  c.comment = "#{qname}"
183
200
  init_lines = []
184
201
  unless type_or_element.attributes.empty?
@@ -209,10 +226,18 @@ private
209
226
  end
210
227
 
211
228
  def dump_classdef(qname, typedef, qualified = false)
229
+ classname = create_class_name(qname)
230
+ check_classname(classname)
231
+ baseclassname = nil
232
+ if typedef.complexcontent
233
+ if base = typedef.complexcontent.base
234
+ baseclassname = create_class_name(base)
235
+ end
236
+ end
212
237
  if @faulttypes and @faulttypes.index(qname)
213
- c = ClassDef.new(create_class_name(qname), '::StandardError')
238
+ c = ClassDef.new(classname, '::StandardError')
214
239
  else
215
- c = ClassDef.new(create_class_name(qname))
240
+ c = ClassDef.new(classname, baseclassname)
216
241
  end
217
242
  c.comment = "#{qname}"
218
243
  c.comment << "\nabstract" if typedef.abstract
@@ -245,6 +270,7 @@ private
245
270
  end
246
271
  init_lines << "@__xmlele_any = nil"
247
272
  when XMLSchema::Element
273
+ next if element.ref == SchemaName
248
274
  name = name_element(element).name
249
275
  attrname = safemethodname(name)
250
276
  varname = safevarname(name)
@@ -329,10 +355,48 @@ private
329
355
  end
330
356
 
331
357
  def dump_arraydef(qname, complextype)
332
- c = ClassDef.new(create_class_name(qname), '::Array')
358
+ classname = create_class_name(qname)
359
+ check_classname(classname)
360
+ c = ClassDef.new(classname, '::Array')
333
361
  c.comment = "#{qname}"
334
362
  c.dump
335
363
  end
364
+
365
+ def check_classname(classname)
366
+ if @modulepath.nil? and Module.constants.include?(classname)
367
+ warn("created definition re-opens an existing toplevel class: #{classname}")
368
+ end
369
+ end
370
+
371
+ def sort_dependency(types)
372
+ dep = {}
373
+ root = []
374
+ types.each do |type|
375
+ if type.complexcontent and (base = type.complexcontent.base)
376
+ dep[base] ||= []
377
+ dep[base] << type
378
+ else
379
+ root << type
380
+ end
381
+ end
382
+ sorted = []
383
+ root.each do |type|
384
+ sorted.concat(collect_dependency(type, dep))
385
+ end
386
+ sorted.concat(dep.values.flatten)
387
+ sorted
388
+ end
389
+
390
+ # removes collected key from dep
391
+ def collect_dependency(type, dep)
392
+ result = [type]
393
+ return result unless dep.key?(type.name)
394
+ dep[type.name].each do |deptype|
395
+ result.concat(collect_dependency(deptype, dep))
396
+ end
397
+ dep.delete(type.name)
398
+ result
399
+ end
336
400
  end
337
401
 
338
402