Changeset 1053
- Timestamp:
- 11/21/03 00:28:46 (5 years ago)
- Files:
-
- trunk/sample/soap/digraph.rb (modified) (1 diff)
- trunk/sample/wsdl/amazon/wsdlDriver.rb (modified) (1 diff)
- trunk/sample/wsdl/googleSearch/sampleClient.rb (modified) (1 diff)
- trunk/sample/wsdl/googleSearch/wsdlDriver.rb (modified) (1 diff)
- trunk/test/wsdl/axisArray/test_axisarray.rb (modified) (2 diffs)
- trunk/test/wsdl/marshal/test_wsdlmarshal.rb (modified) (2 diffs)
- trunk/test/wsdl/test_emptycomplextype.rb (modified) (1 diff)
- trunk/test/wsdl/test_multiplefault.rb (modified) (1 diff)
- trunk/test/xsd/test_xmlschemaparser.rb (modified) (1 diff)
- trunk/test/xsd/xmlschema.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/sample/soap/digraph.rb
r966 r1053 28 28 end 29 29 30 marshalledString = File.open("digraph_marshalled_string.soap") .read30 marshalledString = File.open("digraph_marshalled_string.soap") { |f| f.read } 31 31 32 32 puts marshalledString trunk/sample/wsdl/amazon/wsdlDriver.rb
r989 r1053 31 31 32 32 # You must get 'developer's token" from http://associates.amazon.com/exec/panama/associates/ntg/browse/-/1067662 to use Amazon Web Services 2.0. 33 #devtag = File.open(File.expand_path("~/.amazon_key")) .read.chomp33 #devtag = File.open(File.expand_path("~/.amazon_key")) { |f| f.read }.chomp 34 34 devtag = nil 35 35 trunk/sample/wsdl/googleSearch/sampleClient.rb
r966 r1053 38 38 # 39 39 key = q = start = maxResults = filter = restrict = safeSearch = lr = ie = oe = nil 40 key = File.open(File.expand_path("~/.google_key")) .read.chomp40 key = File.open(File.expand_path("~/.google_key")) { |f| f.read }.chomp 41 41 q = "Ruby" 42 42 start = 0 trunk/sample/wsdl/googleSearch/wsdlDriver.rb
r966 r1053 4 4 word = ARGV.shift 5 5 # You must get key from http://www.google.com/apis/ to use Google Web APIs. 6 key = File.open(File.expand_path("~/.google_key")) .read.chomp6 key = File.open(File.expand_path("~/.google_key")) { |f| f.read }.chomp 7 7 8 8 GOOGLE_WSDL = 'http://api.google.com/GoogleSearch.wsdl' trunk/test/wsdl/axisArray/test_axisarray.rb
r1051 r1053 1 1 require 'test/unit' 2 require 'itemList.rb'3 2 require 'soap/processor' 4 3 require 'soap/mapping' … … 12 11 class TestAxisArray < Test::Unit::TestCase 13 12 def setup 13 dir = File.dirname(File.expand_path(__FILE__)) 14 $:.push(dir) 15 require 'itemList.rb' 16 $:.delete(dir) 14 17 @xml =<<__EOX__ 15 18 <?xml version="1.0" encoding="UTF-8"?> trunk/test/wsdl/marshal/test_wsdlmarshal.rb
r1039 r1053 8 8 9 9 def initialize(wsdlfile) 10 wsdl = WSDL::Parser.new.parse(File.open(wsdlfile) .read)10 wsdl = WSDL::Parser.new.parse(File.open(wsdlfile) { |f| f.read }) 11 11 types = wsdl.collect_complextypes 12 12 @opt = { … … 59 59 raise if File.exist?("Person.rb") 60 60 system("ruby #{pathname("../../../bin/wsdl2ruby.rb")} --classdef --wsdl #{pathname("person.wsdl")} --force") 61 person_org = File.open(pathname("person_org.rb")) .read62 person_new = File.open("Person.rb") .read61 person_org = File.open(pathname("person_org.rb")) { |f| f.read } 62 person_new = File.open("Person.rb") { |f| f.read } 63 63 assert_equal(person_org, person_new) 64 64 File.unlink('Person.rb') if File.exist?('Person.rb') trunk/test/wsdl/test_emptycomplextype.rb
r983 r1053 12 12 13 13 def test_wsdl 14 @wsdl = WSDL::Parser.new.parse(File.open(@@filename) .read)14 @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }) 15 15 end 16 16 end trunk/test/wsdl/test_multiplefault.rb
r1038 r1053 13 13 14 14 def test_multiplefault 15 @wsdl = WSDL::Parser.new.parse(File.open(@@filename) .read)15 @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }) 16 16 classdefstr = WSDL::SOAP::ClassDefCreator.new(@wsdl).dump 17 17 yield_eval_binding(classdefstr) do |b| trunk/test/xsd/test_xmlschemaparser.rb
r983 r1053 7 7 8 8 class TestXMLSchemaParser < Test::Unit::TestCase 9 def se lf.setup(filename)10 @ @filename = filename9 def setup 10 @file = File.join(File.dirname(__FILE__), 'xmlschema.xml') 11 11 end 12 12 13 13 def test_wsdl 14 @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@@filename).read) 14 @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read }) 15 assert_equal(WSDL::XMLSchema::Schema, @wsdl.class) 16 assert_equal(1, @wsdl.collect_elements.size) 15 17 end 16 18 end 17 19 18 TestXMLSchemaParser.setup(File.join(File.dirname(__FILE__), 'xmlschema.xml'))19 20 20 21 trunk/test/xsd/xmlschema.xml
r1010 r1053 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <xs:schema 3 xmlns:mstns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd"4 xmlns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd"5 3 attributeFormDefault="qualified" 6 4 elementFormDefault="qualified" 7 targetNamespace="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd" 8 id="MessageDataSet" 5 targetNamespace="urn:jp.gr.jin.rrr.example.fakeschema" 9 6 xmlns:xs="http://www.w3.org/2001/XMLSchema"> 10 7 <xs:element name="MessageDataSet">