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.
- data/bin/wsdl2ruby.rb +8 -8
- data/lib/soap/XMLSchemaDatatypes.rb +1 -1
- data/lib/soap/XMLSchemaDatatypes1999.rb +1 -1
- data/lib/soap/attachment.rb +1 -1
- data/lib/soap/baseData.rb +102 -54
- data/lib/soap/cgistub.rb +1 -1
- data/lib/soap/charset.rb +1 -1
- data/lib/soap/driver.rb +1 -1
- data/lib/soap/element.rb +20 -12
- data/lib/soap/encodingstyle/aspDotNetHandler.rb +2 -2
- data/lib/soap/encodingstyle/handler.rb +1 -1
- data/lib/soap/encodingstyle/literalHandler.rb +29 -73
- data/lib/soap/encodingstyle/soapHandler.rb +8 -7
- data/lib/soap/filter.rb +10 -0
- data/lib/soap/filter/filterchain.rb +51 -0
- data/lib/soap/filter/handler.rb +31 -0
- data/lib/soap/generator.rb +11 -3
- data/lib/soap/header/handler.rb +6 -5
- data/lib/soap/header/handlerset.rb +7 -7
- data/lib/soap/header/simplehandler.rb +1 -1
- data/lib/soap/httpconfigloader.rb +7 -2
- data/lib/soap/mapping.rb +1 -1
- data/lib/soap/mapping/encodedregistry.rb +36 -26
- data/lib/soap/mapping/encodedregistry.rb~ +531 -0
- data/lib/soap/mapping/factory.rb +2 -2
- data/lib/soap/mapping/literalregistry.rb +107 -67
- data/lib/soap/mapping/mapping.rb +92 -112
- data/lib/soap/mapping/registry.rb +25 -8
- data/lib/soap/mapping/rubytypeFactory.rb +1 -1
- data/lib/soap/mapping/schemadefinition.rb +163 -0
- data/lib/soap/mapping/typeMap.rb +7 -1
- data/lib/soap/mapping/wsdlencodedregistry.rb +2 -2
- data/lib/soap/mapping/wsdlliteralregistry.rb +14 -23
- data/lib/soap/mappingRegistry.rb +1 -1
- data/lib/soap/marshal.rb +1 -1
- data/lib/soap/namespace.rb +1 -1
- data/lib/soap/netHttpClient.rb +43 -13
- data/lib/soap/parser.rb +40 -42
- data/lib/soap/processor.rb +1 -1
- data/lib/soap/property.rb +7 -7
- data/lib/soap/proxy.rb +1 -1
- data/lib/soap/qname.rb +1 -1
- data/lib/soap/rpc/cgistub.rb +34 -1
- data/lib/soap/rpc/driver.rb +2 -1
- data/lib/soap/rpc/element.rb +42 -15
- data/lib/soap/rpc/httpserver.rb +13 -1
- data/lib/soap/rpc/proxy.rb +51 -41
- data/lib/soap/rpc/router.rb +88 -33
- data/lib/soap/rpc/rpc.rb +1 -1
- data/lib/soap/rpc/soaplet.rb +51 -3
- data/lib/soap/rpc/standaloneServer.rb +1 -1
- data/lib/soap/rpcRouter.rb +1 -1
- data/lib/soap/rpcUtils.rb +1 -1
- data/lib/soap/server.rb +1 -1
- data/lib/soap/soap.rb +2 -2
- data/lib/soap/standaloneServer.rb +1 -1
- data/lib/soap/streamHandler.rb +13 -4
- data/lib/soap/wsdlDriver.rb +11 -15
- data/lib/tags +5144 -0
- data/lib/wsdl/binding.rb +1 -1
- data/lib/wsdl/data.rb +1 -1
- data/lib/wsdl/definitions.rb +1 -1
- data/lib/wsdl/documentation.rb +1 -1
- data/lib/wsdl/import.rb +1 -1
- data/lib/wsdl/importer.rb +1 -1
- data/lib/wsdl/info.rb +1 -1
- data/lib/wsdl/message.rb +1 -1
- data/lib/wsdl/operation.rb +10 -7
- data/lib/wsdl/operationBinding.rb +19 -5
- data/lib/wsdl/param.rb +11 -3
- data/lib/wsdl/parser.rb +4 -3
- data/lib/wsdl/part.rb +1 -1
- data/lib/wsdl/port.rb +1 -1
- data/lib/wsdl/portType.rb +1 -1
- data/lib/wsdl/service.rb +1 -1
- data/lib/wsdl/soap/address.rb +1 -1
- data/lib/wsdl/soap/binding.rb +1 -1
- data/lib/wsdl/soap/body.rb +3 -1
- data/lib/wsdl/soap/cgiStubCreator.rb +1 -1
- data/lib/wsdl/soap/classDefCreator.rb +78 -14
- data/lib/wsdl/soap/classDefCreatorSupport.rb +28 -11
- data/lib/wsdl/soap/clientSkeltonCreator.rb +3 -2
- data/lib/wsdl/soap/complexType.rb +8 -11
- data/lib/wsdl/soap/data.rb +1 -1
- data/lib/wsdl/soap/definitions.rb +49 -4
- data/lib/wsdl/soap/driverCreator.rb +1 -1
- data/lib/wsdl/soap/element.rb +3 -2
- data/lib/wsdl/soap/encodedMappingRegistryCreator.rb +1 -1
- data/lib/wsdl/soap/fault.rb +1 -1
- data/lib/wsdl/soap/header.rb +1 -1
- data/lib/wsdl/soap/headerfault.rb +1 -1
- data/lib/wsdl/soap/literalMappingRegistryCreator.rb +41 -21
- data/lib/wsdl/soap/mappingRegistryCreator.rb +2 -1
- data/lib/wsdl/soap/mappingRegistryCreatorSupport.rb +45 -19
- data/lib/wsdl/soap/methodDefCreator.rb +28 -17
- data/lib/wsdl/soap/operation.rb +11 -11
- data/lib/wsdl/soap/servantSkeltonCreator.rb +3 -2
- data/lib/wsdl/soap/standaloneServerStubCreator.rb +1 -1
- data/lib/wsdl/soap/wsdl2ruby.rb +8 -2
- data/lib/wsdl/types.rb +1 -1
- data/lib/wsdl/wsdl.rb +1 -1
- data/lib/wsdl/xmlSchema/all.rb +1 -1
- data/lib/wsdl/xmlSchema/annotation.rb +1 -1
- data/lib/wsdl/xmlSchema/any.rb +10 -5
- data/lib/wsdl/xmlSchema/attribute.rb +1 -1
- data/lib/wsdl/xmlSchema/choice.rb +1 -1
- data/lib/wsdl/xmlSchema/complexContent.rb +11 -2
- data/lib/wsdl/xmlSchema/complexExtension.rb +8 -1
- data/lib/wsdl/xmlSchema/complexRestriction.rb +6 -2
- data/lib/wsdl/xmlSchema/complexType.rb +9 -1
- data/lib/wsdl/xmlSchema/content.rb +26 -5
- data/lib/wsdl/xmlSchema/data.rb +4 -1
- data/lib/wsdl/xmlSchema/element.rb +12 -9
- data/lib/wsdl/xmlSchema/enumeration.rb +1 -1
- data/lib/wsdl/xmlSchema/import.rb +1 -1
- data/lib/wsdl/xmlSchema/importer.rb +9 -6
- data/lib/wsdl/xmlSchema/include.rb +1 -1
- data/lib/wsdl/xmlSchema/length.rb +1 -1
- data/lib/wsdl/xmlSchema/list.rb +1 -1
- data/lib/wsdl/xmlSchema/maxlength.rb +1 -1
- data/lib/wsdl/xmlSchema/minlength.rb +1 -1
- data/lib/wsdl/xmlSchema/parser.rb +4 -3
- data/lib/wsdl/xmlSchema/pattern.rb +1 -1
- data/lib/wsdl/xmlSchema/schema.rb +1 -1
- data/lib/wsdl/xmlSchema/sequence.rb +1 -1
- data/lib/wsdl/xmlSchema/simpleContent.rb +1 -1
- data/lib/wsdl/xmlSchema/simpleExtension.rb +1 -1
- data/lib/wsdl/xmlSchema/simpleRestriction.rb +1 -1
- data/lib/wsdl/xmlSchema/simpleType.rb +8 -1
- data/lib/wsdl/xmlSchema/union.rb +35 -0
- data/lib/wsdl/xmlSchema/unique.rb +1 -1
- data/lib/wsdl/xmlSchema/xsd2ruby.rb +6 -1
- data/lib/xsd/charset.rb +1 -1
- data/lib/xsd/classloader.rb +26 -0
- data/lib/xsd/codegen.rb +1 -1
- data/lib/xsd/codegen/classdef.rb +1 -1
- data/lib/xsd/codegen/commentdef.rb +1 -1
- data/lib/xsd/codegen/gensupport.rb +119 -14
- data/lib/xsd/codegen/methoddef.rb +1 -1
- data/lib/xsd/codegen/moduledef.rb +1 -1
- data/lib/xsd/datatypes.rb +52 -13
- data/lib/xsd/datatypes1999.rb +1 -1
- data/lib/xsd/iconvcharset.rb +1 -1
- data/lib/xsd/mapping.rb +1 -1
- data/lib/xsd/namedelements.rb +1 -1
- data/lib/xsd/ns.rb +2 -2
- data/lib/xsd/qname.rb +1 -1
- data/lib/xsd/xmlparser.rb +16 -3
- data/lib/xsd/xmlparser/parser.rb +6 -2
- data/lib/xsd/xmlparser/rexmlparser.rb +5 -1
- data/lib/xsd/xmlparser/xmlparser.rb +1 -1
- data/lib/xsd/xmlparser/xmlscanner.rb +4 -2
- data/test/interopR2/InteropTest.rb +83 -0
- data/test/interopR2/InteropTest.wsdl +315 -0
- data/test/interopR2/InteropTestC.wsdl +208 -0
- data/test/interopR2/InteropTestDriver.rb +328 -0
- data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2.wsdl +461 -0
- data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2GroupB.wsdl +20 -0
- data/test/interopR2/SOAP4R_SOAPBuildersInteropTest_R2GroupCClient.rb +178 -0
- data/test/interopR2/SOAPBuildersInterop_R2GrC.wsdl +17 -0
- data/test/interopR2/clientBase.rb +0 -3
- data/test/interopR2/groupc.wsdl +17 -0
- data/test/interopR2/result_client.NetRemoting.txt +0 -4593
- data/test/interopR2/test.sh +9 -9
- data/test/runner.rb +1 -3
- data/test/soap/asp.net/test_aspdotnet.rb +20 -9
- data/test/soap/case/test_mapping.rb +57 -0
- data/test/soap/filter/test_filter.rb +146 -0
- data/test/soap/literalArrayMapping/test_definedarray.rb +7 -9
- data/test/soap/marshal/marshaltestlib.rb +1 -1
- data/test/soap/ssl/test_ssl.rb +0 -10
- data/test/soap/struct/test_struct.rb +2 -9
- data/test/soap/test_basetype.rb +114 -0
- data/test/soap/test_empty.rb +26 -2
- data/test/soap/test_envelopenamespace.rb +2 -9
- data/test/soap/test_extraattr.rb +55 -0
- data/test/soap/test_httpconfigloader.rb +17 -0
- data/test/soap/test_property.rb +4 -1
- data/test/soap/test_response_as_xml.rb +31 -9
- data/test/soap/test_soapelement.rb +21 -3
- data/test/soap/test_streamhandler.rb +3 -10
- data/test/soap/test_styleuse.rb +2 -9
- data/test/soap/wsdlDriver/test_calc.rb +3 -20
- data/test/soap/wsdlDriver/test_document.rb +2 -9
- data/test/soap/wsdlDriver/test_simpletype.rb +2 -9
- data/test/testutil.rb +54 -0
- data/test/wsdl/abstract/abstract.wsdl +82 -3
- data/test/wsdl/abstract/test_abstract.rb +48 -19
- data/test/wsdl/any/any.wsdl +63 -0
- data/test/wsdl/any/expectedDriver.rb +22 -1
- data/test/wsdl/any/expectedEcho.rb +19 -0
- data/test/wsdl/any/expectedService.rb +29 -4
- data/test/wsdl/any/test_any.rb +36 -31
- data/test/wsdl/choice/choice.wsdl +37 -0
- data/test/wsdl/choice/test_choice.rb +66 -17
- data/test/wsdl/complexcontent/test_echo.rb +7 -18
- data/test/wsdl/document/array/test_array.rb +8 -18
- data/test/wsdl/document/ping_nosoapaction.wsdl +1 -1
- data/test/wsdl/document/test_nosoapaction.rb +2 -9
- data/test/wsdl/document/test_number.rb +3 -10
- data/test/wsdl/document/test_rpc.rb +96 -21
- data/test/wsdl/fault/fault.wsdl +79 -0
- data/test/wsdl/fault/multifault.wsdl +96 -0
- data/test/wsdl/fault/test_fault.rb +119 -0
- data/test/wsdl/fault/test_multifault.rb +134 -0
- data/test/wsdl/list/test_list.rb +6 -16
- data/test/wsdl/marshal/test_wsdlmarshal.rb +10 -13
- data/test/wsdl/oneway/oneway.wsdl +36 -0
- data/test/wsdl/oneway/test_oneway.rb +108 -0
- data/test/wsdl/overload/test_overload.rb +3 -10
- data/test/wsdl/qualified/test_qualified.rb +9 -17
- data/test/wsdl/qualified/test_unqualified.rb +14 -21
- data/test/wsdl/ref/expectedDriver.rb +51 -0
- data/test/wsdl/ref/expectedProduct.rb +71 -71
- data/test/wsdl/ref/test_ref.rb +13 -35
- data/test/wsdl/rpc/rpc.wsdl +27 -1
- data/test/wsdl/rpc/test-rpc-lit-qualified.wsdl +74 -0
- data/test/wsdl/rpc/test-rpc-lit.wsdl +11 -4
- data/test/wsdl/rpc/test-rpc-lit12.wsdl +455 -0
- data/test/wsdl/rpc/test_rpc.rb +20 -19
- data/test/wsdl/rpc/test_rpc_lit.rb +82 -29
- data/test/wsdl/simplecontent/simplecontent.wsdl +1 -0
- data/test/wsdl/simplecontent/test_simplecontent.rb +5 -19
- data/test/wsdl/simpletype/rpc/expectedDriver.rb +6 -4
- data/test/wsdl/simpletype/rpc/expectedEchoVersion.rb +15 -0
- data/test/wsdl/simpletype/rpc/expectedMappingRegistry.rb +64 -0
- data/test/wsdl/simpletype/rpc/expectedService.rb +6 -4
- data/test/wsdl/simpletype/rpc/rpc.wsdl +18 -0
- data/test/wsdl/simpletype/rpc/test_rpc.rb +6 -16
- data/test/wsdl/simpletype/simpletype.wsdl +19 -0
- data/test/wsdl/simpletype/test_simpletype.rb +2 -9
- data/test/wsdl/soap/wsdl2ruby/expectedDriver.rb +6 -4
- data/test/wsdl/soap/wsdl2ruby/expectedMappingRegistry.rb +40 -0
- data/test/wsdl/soap/wsdl2ruby/expectedService.cgi +6 -4
- data/test/wsdl/soap/wsdl2ruby/expectedService.rb +6 -4
- data/test/wsdl/soap/wsdl2ruby/section/test_section.rb +5 -6
- data/test/wsdl/soap/wsdl2ruby/soapenc/test_soapenc.rb +3 -16
- data/test/wsdl/soap/wsdl2ruby/test_wsdl2ruby.rb +9 -17
- data/test/wsdl/soaptype/test_soaptype.rb +29 -11
- data/test/xsd/test_xsd.rb +115 -1
- metadata +421 -454
- data/test/interopR2/client.NetRemoting.rb.result +0 -3410
- data/test/interopR2/client.NetRemoting_Base.log +0 -6279
- data/test/interopR2/client.NetRemoting_GroupB.log +0 -1188
- data/test/interopR2/client4S4C2_Base.log +0 -4955
- data/test/interopR2/client4S4C2_GroupB.log +0 -1000
- data/test/interopR2/client4S4C_Base.log +0 -4635
- data/test/interopR2/client4S4C_GroupB.log +0 -900
- data/test/interopR2/clientASP.NET_Base.log +0 -5468
- data/test/interopR2/clientASP.NET_GroupB.log +0 -977
- data/test/interopR2/clientApacheAxis_Base.log +0 -3171
- data/test/interopR2/clientApacheAxis_GroupB.log +0 -498
- data/test/interopR2/clientApacheSOAP_Base.log +0 -3171
- data/test/interopR2/clientBEAWebLogic_Base.log +0 -3171
- data/test/interopR2/clientBEAWebLogic_GroupB.log +0 -498
- data/test/interopR2/clientCapeConnect_Base.log +0 -2126
- data/test/interopR2/clientDelphi_Base.log +0 -0
- data/test/interopR2/clientEasySoap_Base.log +0 -6187
- data/test/interopR2/clientEasySoap_GroupB.log +0 -1076
- data/test/interopR2/clientFrontier_Base.log +0 -5188
- data/test/interopR2/clientHP_Base.log +0 -3171
- data/test/interopR2/clientHP_GroupB.log +0 -498
- data/test/interopR2/clientJSOAP_Base.log +0 -4465
- data/test/interopR2/clientJSOAP_GroupB.log +0 -824
- data/test/interopR2/clientKafkaXSLT_Base.log +0 -10299
- data/test/interopR2/clientKafkaXSLT_GroupB.log +0 -1739
- data/test/interopR2/clientMSSOAPToolkit2.0_Base.log +0 -4805
- data/test/interopR2/clientMSSOAPToolkit2.0_GroupB.log +0 -871
- data/test/interopR2/clientMSSOAPToolkit3.0_Base.log +0 -5076
- data/test/interopR2/clientMSSOAPToolkit3.0_GroupB.log +0 -908
- data/test/interopR2/clientNuSOAP_Base.log +0 -5076
- data/test/interopR2/clientNuSOAP_GroupB.log +0 -958
- data/test/interopR2/clientNuWave_Base.log +0 -2019
- data/test/interopR2/clientOpenLink_Base.log +0 -6171
- data/test/interopR2/clientOpenLink_GroupB.log +0 -1094
- data/test/interopR2/clientOracle_Base.log +0 -5594
- data/test/interopR2/clientPEAR_Base.log +0 -6261
- data/test/interopR2/clientPEAR_GroupB.log +0 -1106
- data/test/interopR2/clientPhalanx_Base.log +0 -41036
- data/test/interopR2/clientPhalanx_GroupB.log +0 -6519
- data/test/interopR2/clientSIMACE_Base.log +0 -6171
- data/test/interopR2/clientSIMACE_GroupB.log +0 -1093
- data/test/interopR2/clientSOAP4R.rb.result +0 -3409
- data/test/interopR2/clientSOAP4R_Base.log +0 -6366
- data/test/interopR2/clientSOAP4R_GroupB.log +0 -1112
- data/test/interopR2/clientSQLData_Base.log +0 -4857
- data/test/interopR2/clientSQLData_GroupB.log +0 -770
- data/test/interopR2/clientSilverStream_Base.log +0 -3171
- data/test/interopR2/clientSpray2001_Base.log +0 -8187
- data/test/interopR2/clientSpray2001_GroupB.log +0 -1408
- data/test/interopR2/clientSun_Base.log +0 -4641
- data/test/interopR2/clientSun_GroupB.log +0 -856
- data/test/interopR2/clientVWOpentalkSoap_Base.log +0 -5402
- data/test/interopR2/clientVWOpentalkSoap_GroupB.log +0 -972
- data/test/interopR2/clientWASPC_Base.log +0 -4187
- data/test/interopR2/clientWASPC_GroupB.log +0 -763
- data/test/interopR2/clientWASP_Base.log +0 -5414
- data/test/interopR2/clientWASP_GroupB.log +0 -970
- data/test/interopR2/clientWebMethods_Base.log +0 -3075
- data/test/interopR2/clientWebMethods_GroupB.log +0 -483
- data/test/interopR2/clientWhiteMesa_Base.log +0 -4359
- data/test/interopR2/clientWhiteMesa_GroupB.log +0 -808
- data/test/interopR2/clientWingfoot_Base.log +0 -4445
- data/test/interopR2/clientWingfoot_GroupB.log +0 -848
- data/test/interopR2/clientXMLBus_Base.log +0 -3075
- data/test/interopR2/clientXMLBus_GroupB.log +0 -483
- data/test/interopR2/clientXSOAP_Base.log +0 -4445
- data/test/interopR2/clienteSOAP_Base.log +0 -8728
- data/test/interopR2/clientgSOAP_Base.log +0 -4689
- data/test/interopR2/clientgSOAP_GroupB.log +0 -1014
- data/test/interopR2/clientkSOAP_Base.log +0 -5625
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema complexType extension definition for WSDL.
|
2
|
-
# Copyright (C)
|
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,6 +49,13 @@ class ComplexExtension < Info
|
|
49
49
|
result
|
50
50
|
end
|
51
51
|
|
52
|
+
def nested_elements
|
53
|
+
result = XSD::NamedElements.new
|
54
|
+
result.concat(basetype.nested_elements)
|
55
|
+
result.concat(content.nested_elements) if content
|
56
|
+
result
|
57
|
+
end
|
58
|
+
|
52
59
|
def attributes
|
53
60
|
basetype.attributes + @attributes
|
54
61
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema complexType restriction definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -47,11 +47,15 @@ class ComplexRestriction < Info
|
|
47
47
|
@content ? @content.elements : XSD::NamedElements::Empty
|
48
48
|
end
|
49
49
|
|
50
|
+
def nested_elements
|
51
|
+
@content ? @content.nested_elements : XSD::NamedElements::Empty
|
52
|
+
end
|
53
|
+
|
50
54
|
def check_type
|
51
55
|
if @base == ::SOAP::ValueArrayName
|
52
56
|
:TYPE_ARRAY
|
53
57
|
else
|
54
|
-
basetype.check_type
|
58
|
+
basetype.check_type if basetype
|
55
59
|
end
|
56
60
|
end
|
57
61
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema complexType definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -80,6 +80,14 @@ class ComplexType < Info
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
def nested_elements
|
84
|
+
if c = @complexcontent || @content
|
85
|
+
c.nested_elements
|
86
|
+
else
|
87
|
+
XSD::NamedElements::Empty
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
83
91
|
def find_element(name)
|
84
92
|
return nil if name.nil?
|
85
93
|
elements.each do |element|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema content base definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -20,8 +20,8 @@ class Content < Info
|
|
20
20
|
|
21
21
|
def initialize
|
22
22
|
super()
|
23
|
-
@minoccurs =
|
24
|
-
@maxoccurs =
|
23
|
+
@minoccurs = 1
|
24
|
+
@maxoccurs = 1
|
25
25
|
@elements = XSD::NamedElements.new
|
26
26
|
end
|
27
27
|
|
@@ -41,6 +41,22 @@ class Content < Info
|
|
41
41
|
false
|
42
42
|
end
|
43
43
|
|
44
|
+
def map_as_array?
|
45
|
+
maxoccurs.nil? or maxoccurs != 1
|
46
|
+
end
|
47
|
+
|
48
|
+
def nested_elements
|
49
|
+
elements = XSD::NamedElements.new
|
50
|
+
@elements.each do |ele|
|
51
|
+
if ele.respond_to?(:nested_elements)
|
52
|
+
elements.concat(ele.nested_elements)
|
53
|
+
else
|
54
|
+
elements << ele
|
55
|
+
end
|
56
|
+
end
|
57
|
+
elements
|
58
|
+
end
|
59
|
+
|
44
60
|
def <<(element)
|
45
61
|
@elements << element
|
46
62
|
end
|
@@ -60,9 +76,14 @@ class Content < Info
|
|
60
76
|
def parse_attr(attr, value)
|
61
77
|
case attr
|
62
78
|
when MaxOccursAttrName
|
63
|
-
|
79
|
+
if value.source == 'unbounded'
|
80
|
+
@maxoccurs = nil
|
81
|
+
else
|
82
|
+
@maxoccurs = Integer(value.source)
|
83
|
+
end
|
84
|
+
value.source
|
64
85
|
when MinOccursAttrName
|
65
|
-
@minoccurs = value.source
|
86
|
+
@minoccurs = Integer(value.source)
|
66
87
|
else
|
67
88
|
nil
|
68
89
|
end
|
data/lib/wsdl/xmlSchema/data.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema data definitions.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -26,6 +26,7 @@ require 'wsdl/xmlSchema/choice'
|
|
26
26
|
require 'wsdl/xmlSchema/sequence'
|
27
27
|
require 'wsdl/xmlSchema/list'
|
28
28
|
require 'wsdl/xmlSchema/attribute'
|
29
|
+
require 'wsdl/xmlSchema/union'
|
29
30
|
require 'wsdl/xmlSchema/unique'
|
30
31
|
require 'wsdl/xmlSchema/enumeration'
|
31
32
|
require 'wsdl/xmlSchema/length'
|
@@ -59,6 +60,7 @@ SequenceName = XSD::QName.new(XSD::Namespace, 'sequence')
|
|
59
60
|
SchemaName = XSD::QName.new(XSD::Namespace, 'schema')
|
60
61
|
SimpleContentName = XSD::QName.new(XSD::Namespace, 'simpleContent')
|
61
62
|
SimpleTypeName = XSD::QName.new(XSD::Namespace, 'simpleType')
|
63
|
+
UnionName = XSD::QName.new(XSD::Namespace, 'union')
|
62
64
|
UniqueName = XSD::QName.new(XSD::Namespace, 'unique')
|
63
65
|
|
64
66
|
AbstractAttrName = XSD::QName.new(nil, 'abstract')
|
@@ -72,6 +74,7 @@ FormAttrName = XSD::QName.new(nil, 'form')
|
|
72
74
|
IdAttrName = XSD::QName.new(nil, 'id')
|
73
75
|
ItemTypeAttrName = XSD::QName.new(nil, 'itemType')
|
74
76
|
MaxOccursAttrName = XSD::QName.new(nil, 'maxOccurs')
|
77
|
+
MemberTypesAttrName = XSD::QName.new(nil, 'memberTypes')
|
75
78
|
MinOccursAttrName = XSD::QName.new(nil, 'minOccurs')
|
76
79
|
MixedAttrName = XSD::QName.new(nil, 'mixed')
|
77
80
|
NameAttrName = XSD::QName.new(nil, 'name')
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema element definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -41,8 +41,8 @@ class Element < Info
|
|
41
41
|
attr_writer :local_simpletype
|
42
42
|
attr_writer :local_complextype
|
43
43
|
attr_writer :constraint
|
44
|
-
|
45
|
-
|
44
|
+
attr_accessor :maxoccurs
|
45
|
+
attr_accessor :minoccurs
|
46
46
|
attr_writer :nillable
|
47
47
|
|
48
48
|
attr_reader_ref :name
|
@@ -51,8 +51,6 @@ class Element < Info
|
|
51
51
|
attr_reader_ref :local_simpletype
|
52
52
|
attr_reader_ref :local_complextype
|
53
53
|
attr_reader_ref :constraint
|
54
|
-
attr_reader_ref :maxoccurs
|
55
|
-
attr_reader_ref :minoccurs
|
56
54
|
attr_reader_ref :nillable
|
57
55
|
|
58
56
|
attr_accessor :ref
|
@@ -64,8 +62,8 @@ class Element < Info
|
|
64
62
|
@type = type
|
65
63
|
@local_simpletype = @local_complextype = nil
|
66
64
|
@constraint = nil
|
67
|
-
@maxoccurs =
|
68
|
-
@minoccurs =
|
65
|
+
@maxoccurs = 1
|
66
|
+
@minoccurs = 1
|
69
67
|
@nillable = nil
|
70
68
|
@ref = nil
|
71
69
|
@refelement = nil
|
@@ -130,7 +128,12 @@ class Element < Info
|
|
130
128
|
"cannot parse #{value} for #{attr}")
|
131
129
|
end
|
132
130
|
end
|
133
|
-
|
131
|
+
if value.source == 'unbounded'
|
132
|
+
@maxoccurs = nil
|
133
|
+
else
|
134
|
+
@maxoccurs = Integer(value.source)
|
135
|
+
end
|
136
|
+
value.source
|
134
137
|
when MinOccursAttrName
|
135
138
|
if parent.is_a?(All)
|
136
139
|
unless ['0', '1'].include?(value.source)
|
@@ -138,7 +141,7 @@ class Element < Info
|
|
138
141
|
"cannot parse #{value} for #{attr}")
|
139
142
|
end
|
140
143
|
end
|
141
|
-
@minoccurs = value.source
|
144
|
+
@minoccurs = Integer(value.source)
|
142
145
|
when NillableAttrName
|
143
146
|
@nillable = (value.source == 'true')
|
144
147
|
else
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema enumeration definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema import definition.
|
2
|
-
# Copyright (C)
|
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 - XSD importer library.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -27,8 +27,9 @@ class Importer
|
|
27
27
|
unless location.is_a?(URI)
|
28
28
|
location = URI.parse(location)
|
29
29
|
end
|
30
|
-
|
31
|
-
content
|
30
|
+
source, normalizedlocation = fetch(location)
|
31
|
+
content = parse(source, normalizedlocation, originalroot)
|
32
|
+
content.location = normalizedlocation
|
32
33
|
content
|
33
34
|
end
|
34
35
|
|
@@ -45,9 +46,11 @@ private
|
|
45
46
|
def fetch(location)
|
46
47
|
warn("importing: #{location}") if $DEBUG
|
47
48
|
content = nil
|
49
|
+
normalizedlocation = location
|
48
50
|
if location.scheme == 'file' or
|
49
51
|
(location.relative? and FileTest.exist?(location.path))
|
50
52
|
content = File.open(location.path).read
|
53
|
+
normalizedlocation = URI.parse('file://' + File.expand_path(location.path))
|
51
54
|
elsif location.scheme and location.scheme.size == 1 and
|
52
55
|
FileTest.exist?(location.to_s)
|
53
56
|
# ToDo: remove this ugly workaround for a path with drive letter
|
@@ -58,12 +61,12 @@ private
|
|
58
61
|
client.proxy = ::SOAP::Env::HTTP_PROXY
|
59
62
|
client.no_proxy = ::SOAP::Env::NO_PROXY
|
60
63
|
if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName)
|
61
|
-
|
62
|
-
|
64
|
+
http_opt = opt["client.protocol.http"]
|
65
|
+
::SOAP::HTTPConfigLoader.set_options(client, http_opt) if http_opt
|
63
66
|
end
|
64
67
|
content = client.get_content(location)
|
65
68
|
end
|
66
|
-
content
|
69
|
+
return content, normalizedlocation
|
67
70
|
end
|
68
71
|
|
69
72
|
def web_client
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema include definition.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema length definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
data/lib/wsdl/xmlSchema/list.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema list definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema maxLength definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema minLength definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 XML Instance parser library.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -72,13 +72,14 @@ public
|
|
72
72
|
lastframe = @parsestack.last
|
73
73
|
ns = parent = nil
|
74
74
|
if lastframe
|
75
|
-
ns = lastframe.ns
|
75
|
+
ns = lastframe.ns
|
76
76
|
parent = lastframe.node
|
77
77
|
else
|
78
78
|
ns = XSD::NS.new
|
79
79
|
parent = nil
|
80
80
|
end
|
81
|
-
|
81
|
+
# ns might be the same
|
82
|
+
ns, attrs = XSD::XMLParser.filter_ns(ns, attrs)
|
82
83
|
node = decode_tag(ns, name, attrs, parent)
|
83
84
|
@parsestack << ParseFrame.new(ns, name, node)
|
84
85
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# WSDL4R - XMLSchema pattern definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema schema definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema complexType definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema simpleContent definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema simpleType extension definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema simpleContent restriction definition for WSDL.
|
2
|
-
# Copyright (C)
|
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 - XMLSchema simpleType definition for WSDL.
|
2
|
-
# Copyright (C)
|
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;
|
@@ -18,12 +18,15 @@ class SimpleType < Info
|
|
18
18
|
attr_accessor :name
|
19
19
|
attr_reader :restriction
|
20
20
|
attr_reader :list
|
21
|
+
attr_reader :union
|
21
22
|
|
22
23
|
def check_lexical_format(value)
|
23
24
|
if @restriction
|
24
25
|
check_restriction(value)
|
25
26
|
elsif @list
|
26
27
|
# TODO: check
|
28
|
+
elsif @union
|
29
|
+
# TODO: check
|
27
30
|
else
|
28
31
|
raise ArgumentError.new("incomplete simpleType")
|
29
32
|
end
|
@@ -42,6 +45,7 @@ class SimpleType < Info
|
|
42
45
|
@name = name
|
43
46
|
@restriction = nil
|
44
47
|
@list = nil
|
48
|
+
@union = nil
|
45
49
|
end
|
46
50
|
|
47
51
|
def targetnamespace
|
@@ -56,6 +60,9 @@ class SimpleType < Info
|
|
56
60
|
when ListName
|
57
61
|
@list = List.new
|
58
62
|
@list
|
63
|
+
when UnionName
|
64
|
+
@union = Union.new
|
65
|
+
@union
|
59
66
|
end
|
60
67
|
end
|
61
68
|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# WSDL4R - XMLSchema union definition for WSDL.
|
2
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
3
|
+
|
4
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
5
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
6
|
+
# either the dual license version in 2003, or any later version.
|
7
|
+
|
8
|
+
|
9
|
+
require 'wsdl/info'
|
10
|
+
require 'xsd/namedelements'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class Union < Info
|
18
|
+
attr_reader :member_types
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super
|
22
|
+
@member_types = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
def parse_attr(attr, value)
|
26
|
+
case attr
|
27
|
+
when MemberTypesAttrName
|
28
|
+
@member_types = value.source
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|