Changeset 1828
- Timestamp:
- 06/04/07 22:49:06 (1 year ago)
- Files:
-
- trunk/lib/wsdl/soap/methodDefCreator.rb (modified) (1 diff)
- trunk/test/wsdl/any/any.wsdl (modified) (3 diffs)
- trunk/test/wsdl/any/expectedDriver.rb (modified) (1 diff)
- trunk/test/wsdl/any/test_any.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/wsdl/soap/methodDefCreator.rb
r1824 r1828 173 173 end 174 174 elsif part.type == XSD::AnyTypeName 175 [ XSD::AnyTypeName]175 [nil] 176 176 else 177 177 raise RuntimeError.new("part: #{part.name} cannot be resolved") trunk/test/wsdl/any/any.wsdl
r1771 r1828 42 42 </message> 43 43 44 <message name="msg_echoany_request"> 45 </message> 46 47 <message name="msg_echoany_response"> 48 <part name="echoany_return" type="xsd:anyType"/> 49 </message> 50 44 51 <message name="setOutputAndCompleteRequest"> 45 52 <part name="parameters" element="txd:setOutputAndCompleteRequest"/> … … 54 61 <input message="tns:msg_echoitem"/> 55 62 <output message="tns:msg_echoitem"/> 63 </operation> 64 65 <operation name="echoAny"> 66 <input message="tns:msg_echoany_request"/> 67 <output message="tns:msg_echoany_response"/> 56 68 </operation> 57 69 … … 74 86 </operation> 75 87 88 <operation name="echoAny"> 89 <soap:operation style="rpc" soapAction="urn:example.com:echoAny"/> 90 <input> 91 <soap:body use="encoded"/> 92 </input> 93 <output> 94 <soap:body use="encoded"/> 95 </output> 96 </operation> 97 76 98 <operation name="setOutputAndComplete"> 77 99 <soap:operation soapAction="urn:example.com:echo"/> trunk/test/wsdl/any/expectedDriver.rb
r1790 r1828 15 15 { :request_style => :document, :request_use => :literal, 16 16 :response_style => :document, :response_use => :literal, 17 :faults => {} } 18 ], 19 [ XSD::QName.new("urn:example.com:echo", "echoAny"), 20 "urn:example.com:echoAny", 21 "echoAny", 22 [ ["retval", "echoany_return", [nil]] ], 23 { :request_style => :rpc, :request_use => :encoded, 24 :response_style => :rpc, :response_use => :encoded, 17 25 :faults => {} } 18 26 ], trunk/test/wsdl/any/test_any.rb
r1794 r1828 36 36 XSD::QName.new(TypeNamespace, 'foo.bar') 37 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 ) 38 47 end 39 48 … … 46 55 res 47 56 # TODO: arg 57 end 58 59 AnyStruct = Struct.new(:a, :b) 60 def echoAny 61 AnyStruct.new(1, Time.mktime(2007, 1, 1)) 48 62 end 49 63 end … … 133 147 end 134 148 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) 157 end 158 135 159 def test_wsdl 136 160 wsdl = File.join(DIR, 'any.wsdl')