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,8 @@
|
|
1
1
|
require 'xsd/qname'
|
2
2
|
|
3
|
+
module WSDL::Any
|
4
|
+
|
5
|
+
|
3
6
|
# {urn:example.com:echo-type}foo.bar
|
4
7
|
class FooBar
|
5
8
|
attr_accessor :before
|
@@ -16,3 +19,19 @@ class FooBar
|
|
16
19
|
@after = after
|
17
20
|
end
|
18
21
|
end
|
22
|
+
|
23
|
+
# {urn:example.com:echo-type}setOutputAndCompleteRequest
|
24
|
+
class SetOutputAndCompleteRequest
|
25
|
+
attr_accessor :taskId
|
26
|
+
attr_accessor :data
|
27
|
+
attr_accessor :participantToken
|
28
|
+
|
29
|
+
def initialize(taskId = nil, data = nil, participantToken = nil)
|
30
|
+
@taskId = taskId
|
31
|
+
@data = data
|
32
|
+
@participantToken = participantToken
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -3,6 +3,8 @@ require 'echoServant.rb'
|
|
3
3
|
require 'echoMappingRegistry.rb'
|
4
4
|
require 'soap/rpc/standaloneServer'
|
5
5
|
|
6
|
+
module WSDL; module Any
|
7
|
+
|
6
8
|
class Echo_port_type
|
7
9
|
Methods = [
|
8
10
|
[ "urn:example.com:echo",
|
@@ -10,16 +12,37 @@ class Echo_port_type
|
|
10
12
|
[ ["in", "parameters", ["::SOAP::SOAPElement", "urn:example.com:echo-type", "foo.bar"]],
|
11
13
|
["out", "parameters", ["::SOAP::SOAPElement", "urn:example.com:echo-type", "foo.bar"]] ],
|
12
14
|
{ :request_style => :document, :request_use => :literal,
|
13
|
-
:response_style => :document, :response_use => :literal
|
15
|
+
:response_style => :document, :response_use => :literal,
|
16
|
+
:faults => {} }
|
17
|
+
],
|
18
|
+
[ XSD::QName.new("urn:example.com:echo", "echoAny"),
|
19
|
+
"urn:example.com:echoAny",
|
20
|
+
"echoAny",
|
21
|
+
[ ["retval", "echoany_return", [nil]] ],
|
22
|
+
{ :request_style => :rpc, :request_use => :encoded,
|
23
|
+
:response_style => :rpc, :response_use => :encoded,
|
24
|
+
:faults => {} }
|
25
|
+
],
|
26
|
+
[ "urn:example.com:echo",
|
27
|
+
"setOutputAndComplete",
|
28
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "urn:example.com:echo-type", "setOutputAndCompleteRequest"]],
|
29
|
+
["out", "parameters", ["::SOAP::SOAPElement", "urn:example.com:echo-type", "setOutputAndCompleteRequest"]] ],
|
30
|
+
{ :request_style => :document, :request_use => :literal,
|
31
|
+
:response_style => :document, :response_use => :literal,
|
32
|
+
:faults => {} }
|
14
33
|
]
|
15
34
|
]
|
16
35
|
end
|
17
36
|
|
37
|
+
end; end
|
38
|
+
|
39
|
+
module WSDL; module Any
|
40
|
+
|
18
41
|
class Echo_port_typeApp < ::SOAP::RPC::StandaloneServer
|
19
42
|
def initialize(*arg)
|
20
43
|
super(*arg)
|
21
|
-
servant = Echo_port_type.new
|
22
|
-
Echo_port_type::Methods.each do |definitions|
|
44
|
+
servant = WSDL::Any::Echo_port_type.new
|
45
|
+
WSDL::Any::Echo_port_type::Methods.each do |definitions|
|
23
46
|
opt = definitions.last
|
24
47
|
if opt[:request_style] == :document
|
25
48
|
@router.add_document_operation(servant, *definitions)
|
@@ -32,9 +55,11 @@ class Echo_port_typeApp < ::SOAP::RPC::StandaloneServer
|
|
32
55
|
end
|
33
56
|
end
|
34
57
|
|
58
|
+
end; end
|
59
|
+
|
35
60
|
if $0 == __FILE__
|
36
61
|
# Change listen port.
|
37
|
-
server = Echo_port_typeApp.new('app', nil, '0.0.0.0', 10080)
|
62
|
+
server = WSDL::Any::Echo_port_typeApp.new('app', nil, '0.0.0.0', 10080)
|
38
63
|
trap(:INT) do
|
39
64
|
server.shutdown
|
40
65
|
end
|
data/test/wsdl/any/test_any.rb
CHANGED
@@ -3,6 +3,7 @@ require 'wsdl/parser'
|
|
3
3
|
require 'wsdl/soap/wsdl2ruby'
|
4
4
|
require 'soap/rpc/standaloneServer'
|
5
5
|
require 'soap/wsdlDriver'
|
6
|
+
require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
|
6
7
|
|
7
8
|
|
8
9
|
module WSDL; module Any
|
@@ -34,6 +35,15 @@ class TestAny < Test::Unit::TestCase
|
|
34
35
|
XSD::QName.new(TypeNamespace, 'foo.bar'),
|
35
36
|
XSD::QName.new(TypeNamespace, 'foo.bar')
|
36
37
|
)
|
38
|
+
add_rpc_operation(self,
|
39
|
+
XSD::QName.new("urn:example.com:echo", "echoAny"),
|
40
|
+
"urn:example.com:echoAny",
|
41
|
+
"echoAny",
|
42
|
+
[ ["retval", "echoany_return", [XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]] ],
|
43
|
+
{ :request_style => :rpc, :request_use => :encoded,
|
44
|
+
:response_style => :rpc, :response_use => :encoded,
|
45
|
+
:faults => {} }
|
46
|
+
)
|
37
47
|
end
|
38
48
|
|
39
49
|
def echo(arg)
|
@@ -45,6 +55,11 @@ class TestAny < Test::Unit::TestCase
|
|
45
55
|
res
|
46
56
|
# TODO: arg
|
47
57
|
end
|
58
|
+
|
59
|
+
AnyStruct = Struct.new(:a, :b)
|
60
|
+
def echoAny
|
61
|
+
AnyStruct.new(1, Time.mktime(2007, 1, 1))
|
62
|
+
end
|
48
63
|
end
|
49
64
|
|
50
65
|
DIR = File.dirname(File.expand_path(__FILE__))
|
@@ -61,7 +76,11 @@ class TestAny < Test::Unit::TestCase
|
|
61
76
|
teardown_server
|
62
77
|
unless $DEBUG
|
63
78
|
File.unlink(pathname('echo.rb')) if File.exist?(pathname('echo.rb'))
|
79
|
+
File.unlink(pathname('echoMappingRegistry.rb')) if File.exist?(pathname('echoMappingRegistry.rb'))
|
64
80
|
File.unlink(pathname('echoDriver.rb')) if File.exist?(pathname('echoDriver.rb'))
|
81
|
+
File.unlink(pathname('echoServant.rb')) if File.exist?(pathname('echoServant.rb'))
|
82
|
+
File.unlink(pathname('echo_service.rb')) if File.exist?(pathname('echo_service.rb'))
|
83
|
+
File.unlink(pathname('echo_serviceClient.rb')) if File.exist?(pathname('echo_serviceClient.rb'))
|
65
84
|
end
|
66
85
|
@client.reset_stream if @client
|
67
86
|
end
|
@@ -69,7 +88,7 @@ class TestAny < Test::Unit::TestCase
|
|
69
88
|
def setup_server
|
70
89
|
@server = Server.new('Test', Namespace, '0.0.0.0', Port)
|
71
90
|
@server.level = Logger::Severity::ERROR
|
72
|
-
@server_thread = start_server_thread(@server)
|
91
|
+
@server_thread = TestUtil.start_server_thread(@server)
|
73
92
|
end
|
74
93
|
|
75
94
|
def setup_classdef
|
@@ -78,16 +97,12 @@ class TestAny < Test::Unit::TestCase
|
|
78
97
|
gen.basedir = DIR
|
79
98
|
gen.logger.level = Logger::FATAL
|
80
99
|
gen.opt['classdef'] = nil
|
100
|
+
gen.opt['mapping_registry'] = nil
|
101
|
+
gen.opt['module_path'] = self.class.to_s.sub(/::[^:]+$/, '')
|
81
102
|
gen.opt['driver'] = nil
|
82
103
|
gen.opt['force'] = true
|
83
104
|
gen.run
|
84
|
-
|
85
|
-
back = $:.dup
|
86
|
-
$:.unshift(pathname("."))
|
87
|
-
require pathname('echoDriver')
|
88
|
-
ensure
|
89
|
-
$:.replace(back) if back
|
90
|
-
end
|
105
|
+
TestUtil.require(DIR, 'echoDriver.rb', 'echoMappingRegistry.rb', 'echo.rb')
|
91
106
|
end
|
92
107
|
|
93
108
|
def teardown_server
|
@@ -96,14 +111,6 @@ class TestAny < Test::Unit::TestCase
|
|
96
111
|
@server_thread.join
|
97
112
|
end
|
98
113
|
|
99
|
-
def start_server_thread(server)
|
100
|
-
t = Thread.new {
|
101
|
-
Thread.current.abort_on_exception = true
|
102
|
-
server.start
|
103
|
-
}
|
104
|
-
t
|
105
|
-
end
|
106
|
-
|
107
114
|
def pathname(filename)
|
108
115
|
File.join(DIR, filename)
|
109
116
|
end
|
@@ -113,17 +120,19 @@ class TestAny < Test::Unit::TestCase
|
|
113
120
|
gen.location = pathname("any.wsdl")
|
114
121
|
gen.basedir = DIR
|
115
122
|
gen.logger.level = Logger::FATAL
|
123
|
+
gen.opt['module_path'] = self.class.to_s.sub(/::[^:]+$/, '')
|
116
124
|
gen.opt['classdef'] = nil
|
125
|
+
gen.opt['mapping_registry'] = nil
|
117
126
|
gen.opt['driver'] = nil
|
118
127
|
gen.opt['client_skelton'] = nil
|
119
128
|
gen.opt['servant_skelton'] = nil
|
120
129
|
gen.opt['standalone_server_stub'] = nil
|
121
130
|
gen.opt['force'] = true
|
122
|
-
|
131
|
+
TestUtil.silent do
|
123
132
|
gen.run
|
124
133
|
end
|
125
|
-
compare("expectedDriver.rb", "echoDriver.rb")
|
126
134
|
compare("expectedEcho.rb", "echo.rb")
|
135
|
+
compare("expectedDriver.rb", "echoDriver.rb")
|
127
136
|
compare("expectedService.rb", "echo_service.rb")
|
128
137
|
|
129
138
|
File.unlink(pathname("echo_service.rb"))
|
@@ -134,21 +143,17 @@ class TestAny < Test::Unit::TestCase
|
|
134
143
|
end
|
135
144
|
|
136
145
|
def compare(expected, actual)
|
137
|
-
|
146
|
+
TestUtil.filecompare(pathname(expected), pathname(actual))
|
138
147
|
end
|
139
148
|
|
140
|
-
def
|
141
|
-
File.
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
yield
|
149
|
-
ensure
|
150
|
-
$VERBOSE = back
|
151
|
-
end
|
149
|
+
def test_anyreturl_wsdl
|
150
|
+
wsdl = File.join(DIR, 'any.wsdl')
|
151
|
+
@client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
|
152
|
+
@client.endpoint_url = "http://localhost:#{Port}/"
|
153
|
+
@client.wiredump_dev = STDOUT if $DEBUG
|
154
|
+
res = @client.echoAny
|
155
|
+
assert_equal(1, res.a)
|
156
|
+
assert_equal(2007, res.b.year)
|
152
157
|
end
|
153
158
|
|
154
159
|
def test_wsdl
|
@@ -53,6 +53,22 @@
|
|
53
53
|
</xsd:sequence>
|
54
54
|
</xsd:complexType>
|
55
55
|
</xsd:element>
|
56
|
+
|
57
|
+
<xsd:element name="echoele_complex">
|
58
|
+
<xsd:complexType>
|
59
|
+
<xsd:sequence>
|
60
|
+
<xsd:element name="data" type="tns:andor"/>
|
61
|
+
</xsd:sequence>
|
62
|
+
</xsd:complexType>
|
63
|
+
</xsd:element>
|
64
|
+
|
65
|
+
<xsd:element name="echo_complex_response">
|
66
|
+
<xsd:complexType>
|
67
|
+
<xsd:sequence>
|
68
|
+
<xsd:element name="data" type="tns:andor"/>
|
69
|
+
</xsd:sequence>
|
70
|
+
</xsd:complexType>
|
71
|
+
</xsd:element>
|
56
72
|
</xsd:schema>
|
57
73
|
</types>
|
58
74
|
|
@@ -62,12 +78,23 @@
|
|
62
78
|
<message name="echo_out">
|
63
79
|
<part name="parameters" element="tns:echo_response" />
|
64
80
|
</message>
|
81
|
+
<message name="echo_complex_in">
|
82
|
+
<part name="parameters" element="tns:echoele_complex" />
|
83
|
+
</message>
|
84
|
+
<message name="echo_complex_out">
|
85
|
+
<part name="parameters" element="tns:echo_complex_response" />
|
86
|
+
</message>
|
65
87
|
|
66
88
|
<portType name="choice_porttype">
|
67
89
|
<operation name="echo">
|
68
90
|
<input message="tns:echo_in" />
|
69
91
|
<output message="tns:echo_out" />
|
70
92
|
</operation>
|
93
|
+
|
94
|
+
<operation name="echo_complex">
|
95
|
+
<input message="tns:echo_complex_in" />
|
96
|
+
<output message="tns:echo_complex_out" />
|
97
|
+
</operation>
|
71
98
|
</portType>
|
72
99
|
|
73
100
|
<binding name="choice_binding" type="tns:choice_porttype">
|
@@ -81,6 +108,16 @@
|
|
81
108
|
<soap:body use="literal" />
|
82
109
|
</output>
|
83
110
|
</operation>
|
111
|
+
|
112
|
+
<operation name="echo_complex">
|
113
|
+
<soap:operation soapAction="urn:choice:echo_complex" style="document" />
|
114
|
+
<input>
|
115
|
+
<soap:body use="literal" />
|
116
|
+
</input>
|
117
|
+
<output>
|
118
|
+
<soap:body use="literal" />
|
119
|
+
</output>
|
120
|
+
</operation>
|
84
121
|
</binding>
|
85
122
|
|
86
123
|
<service name="choice_service">
|
@@ -3,6 +3,7 @@ require 'wsdl/parser'
|
|
3
3
|
require 'wsdl/soap/wsdl2ruby'
|
4
4
|
require 'soap/rpc/standaloneServer'
|
5
5
|
require 'soap/wsdlDriver'
|
6
|
+
require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
|
6
7
|
|
7
8
|
|
8
9
|
module WSDL; module Choice
|
@@ -20,12 +21,23 @@ class TestChoice < Test::Unit::TestCase
|
|
20
21
|
XSD::QName.new(Namespace, 'echoele'),
|
21
22
|
XSD::QName.new(Namespace, 'echo_response')
|
22
23
|
)
|
24
|
+
add_document_method(
|
25
|
+
self,
|
26
|
+
Namespace + ':echo_complex',
|
27
|
+
'echo_complex',
|
28
|
+
XSD::QName.new(Namespace, 'echoele_complex'),
|
29
|
+
XSD::QName.new(Namespace, 'echo_complex_response')
|
30
|
+
)
|
23
31
|
@router.literal_mapping_registry = ChoiceMappingRegistry::LiteralRegistry
|
24
32
|
end
|
25
33
|
|
26
34
|
def echo(arg)
|
27
35
|
arg
|
28
36
|
end
|
37
|
+
|
38
|
+
def echo_complex(arg)
|
39
|
+
Echo_complex_response.new(arg.data)
|
40
|
+
end
|
29
41
|
end
|
30
42
|
|
31
43
|
DIR = File.dirname(File.expand_path(__FILE__))
|
@@ -42,6 +54,7 @@ class TestChoice < Test::Unit::TestCase
|
|
42
54
|
teardown_server
|
43
55
|
unless $DEBUG
|
44
56
|
File.unlink(pathname('choice.rb'))
|
57
|
+
File.unlink(pathname('choiceMappingRegistry.rb'))
|
45
58
|
File.unlink(pathname('choiceDriver.rb'))
|
46
59
|
end
|
47
60
|
@client.reset_stream if @client
|
@@ -50,7 +63,7 @@ class TestChoice < Test::Unit::TestCase
|
|
50
63
|
def setup_server
|
51
64
|
@server = Server.new('Test', Server::Namespace, '0.0.0.0', Port)
|
52
65
|
@server.level = Logger::Severity::ERROR
|
53
|
-
@server_thread = start_server_thread(@server)
|
66
|
+
@server_thread = TestUtil.start_server_thread(@server)
|
54
67
|
end
|
55
68
|
|
56
69
|
def setup_classdef
|
@@ -59,17 +72,12 @@ class TestChoice < Test::Unit::TestCase
|
|
59
72
|
gen.basedir = DIR
|
60
73
|
gen.logger.level = Logger::FATAL
|
61
74
|
gen.opt['classdef'] = nil
|
75
|
+
gen.opt['mapping_registry'] = nil
|
76
|
+
gen.opt['module_path'] = self.class.to_s.sub(/::[^:]+$/, '')
|
62
77
|
gen.opt['driver'] = nil
|
63
78
|
gen.opt['force'] = true
|
64
79
|
gen.run
|
65
|
-
|
66
|
-
begin
|
67
|
-
Dir.chdir(DIR)
|
68
|
-
require pathname('choice')
|
69
|
-
require pathname('choiceMappingRegistry')
|
70
|
-
ensure
|
71
|
-
Dir.chdir(backupdir)
|
72
|
-
end
|
80
|
+
TestUtil.require(DIR, 'choiceMappingRegistry.rb', 'choice.rb')
|
73
81
|
end
|
74
82
|
|
75
83
|
def teardown_server
|
@@ -78,14 +86,6 @@ class TestChoice < Test::Unit::TestCase
|
|
78
86
|
@server_thread.join
|
79
87
|
end
|
80
88
|
|
81
|
-
def start_server_thread(server)
|
82
|
-
t = Thread.new {
|
83
|
-
Thread.current.abort_on_exception = true
|
84
|
-
server.start
|
85
|
-
}
|
86
|
-
t
|
87
|
-
end
|
88
|
-
|
89
89
|
def pathname(filename)
|
90
90
|
File.join(DIR, filename)
|
91
91
|
end
|
@@ -128,6 +128,55 @@ class TestChoice < Test::Unit::TestCase
|
|
128
128
|
assert_equal("devId", ret.terminalID.devId)
|
129
129
|
assert_nil(ret.terminalID.imei)
|
130
130
|
end
|
131
|
+
|
132
|
+
def test_naive_complex
|
133
|
+
@client = ::SOAP::RPC::Driver.new("http://localhost:#{Port}/")
|
134
|
+
@client.add_document_method('echo_complex', 'urn:choice:echo_complex',
|
135
|
+
XSD::QName.new('urn:choice', 'echoele_complex'),
|
136
|
+
XSD::QName.new('urn:choice', 'echo_complex_response'))
|
137
|
+
@client.wiredump_dev = STDOUT if $DEBUG
|
138
|
+
@client.literal_mapping_registry = ChoiceMappingRegistry::LiteralRegistry
|
139
|
+
#
|
140
|
+
ret = @client.echo_complex(Echoele_complex.new(Andor.new("A", "B1", nil, nil, nil, nil, "C1", "C2")))
|
141
|
+
assert_equal("A", ret.data.a)
|
142
|
+
assert_equal("B1", ret.data.b1)
|
143
|
+
assert_equal(nil, ret.data.b2a)
|
144
|
+
assert_equal(nil, ret.data.b2b)
|
145
|
+
assert_equal(nil, ret.data.b3a)
|
146
|
+
assert_equal(nil, ret.data.b3b)
|
147
|
+
assert_equal("C1", ret.data.c1)
|
148
|
+
assert_equal("C2", ret.data.c2)
|
149
|
+
#
|
150
|
+
ret = @client.echo_complex(Echoele_complex.new(Andor.new("A", nil, "B2a", "B2b", nil, nil, "C1", "C2")))
|
151
|
+
assert_equal("A", ret.data.a)
|
152
|
+
assert_equal(nil, ret.data.b1)
|
153
|
+
assert_equal("B2a", ret.data.b2a)
|
154
|
+
assert_equal("B2b", ret.data.b2b)
|
155
|
+
assert_equal(nil, ret.data.b3a)
|
156
|
+
assert_equal(nil, ret.data.b3b)
|
157
|
+
assert_equal("C1", ret.data.c1)
|
158
|
+
assert_equal("C2", ret.data.c2)
|
159
|
+
#
|
160
|
+
ret = @client.echo_complex(Echoele_complex.new(Andor.new("A", nil, nil, nil, "B3a", nil, "C1", "C2")))
|
161
|
+
assert_equal("A", ret.data.a)
|
162
|
+
assert_equal(nil, ret.data.b1)
|
163
|
+
assert_equal(nil, ret.data.b2a)
|
164
|
+
assert_equal(nil, ret.data.b2b)
|
165
|
+
assert_equal("B3a", ret.data.b3a)
|
166
|
+
assert_equal(nil, ret.data.b3b)
|
167
|
+
assert_equal("C1", ret.data.c1)
|
168
|
+
assert_equal("C2", ret.data.c2)
|
169
|
+
#
|
170
|
+
ret = @client.echo_complex(Echoele_complex.new(Andor.new("A", nil, nil, nil, nil, "B3b", "C1", "C2")))
|
171
|
+
assert_equal("A", ret.data.a)
|
172
|
+
assert_equal(nil, ret.data.b1)
|
173
|
+
assert_equal(nil, ret.data.b2a)
|
174
|
+
assert_equal(nil, ret.data.b2b)
|
175
|
+
assert_equal(nil, ret.data.b3a)
|
176
|
+
assert_equal("B3b", ret.data.b3b)
|
177
|
+
assert_equal("C1", ret.data.c1)
|
178
|
+
assert_equal("C2", ret.data.c2)
|
179
|
+
end
|
131
180
|
end
|
132
181
|
|
133
182
|
|
@@ -3,6 +3,7 @@ require 'wsdl/parser'
|
|
3
3
|
require 'wsdl/soap/wsdl2ruby'
|
4
4
|
require 'soap/rpc/standaloneServer'
|
5
5
|
require 'soap/wsdlDriver'
|
6
|
+
require File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'testutil.rb')
|
6
7
|
|
7
8
|
|
8
9
|
module WSDL; module ComplexContent
|
@@ -38,14 +39,17 @@ class TestEcho < Test::Unit::TestCase
|
|
38
39
|
|
39
40
|
def teardown
|
40
41
|
teardown_server
|
41
|
-
|
42
|
+
unless $DEBUG
|
43
|
+
File.unlink(pathname('complexContent.rb'))
|
44
|
+
File.unlink(pathname('complexContentMappingRegistry.rb'))
|
45
|
+
end
|
42
46
|
@client.reset_stream if @client
|
43
47
|
end
|
44
48
|
|
45
49
|
def setup_server
|
46
50
|
@server = Server.new('Test', Server::Namespace, '0.0.0.0', Port)
|
47
51
|
@server.level = Logger::Severity::ERROR
|
48
|
-
@server_thread = start_server_thread(@server)
|
52
|
+
@server_thread = TestUtil.start_server_thread(@server)
|
49
53
|
end
|
50
54
|
|
51
55
|
def setup_classdef
|
@@ -57,14 +61,7 @@ class TestEcho < Test::Unit::TestCase
|
|
57
61
|
gen.opt['mapping_registry'] = nil
|
58
62
|
gen.opt['force'] = true
|
59
63
|
gen.run
|
60
|
-
|
61
|
-
begin
|
62
|
-
Dir.chdir(DIR)
|
63
|
-
require pathname('complexContent')
|
64
|
-
require pathname('complexContentMappingRegistry')
|
65
|
-
ensure
|
66
|
-
Dir.chdir(backupdir)
|
67
|
-
end
|
64
|
+
TestUtil.require(DIR, 'complexContentMappingRegistry.rb', 'complexContent.rb')
|
68
65
|
end
|
69
66
|
|
70
67
|
def teardown_server
|
@@ -73,14 +70,6 @@ class TestEcho < Test::Unit::TestCase
|
|
73
70
|
@server_thread.join
|
74
71
|
end
|
75
72
|
|
76
|
-
def start_server_thread(server)
|
77
|
-
t = Thread.new {
|
78
|
-
Thread.current.abort_on_exception = true
|
79
|
-
server.start
|
80
|
-
}
|
81
|
-
t
|
82
|
-
end
|
83
|
-
|
84
73
|
def pathname(filename)
|
85
74
|
File.join(DIR, filename)
|
86
75
|
end
|