Changeset 697
- Timestamp:
- 01/12/03 14:45:19 (6 years ago)
- Files:
-
- trunk/bin/wsdl2ruby.rb (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bin/wsdl2ruby.rb
r624 r697 2 2 3 3 require 'getoptlong' 4 require 'soap/qname' 4 5 require 'wsdl/parser' 5 require 'wsdl/name'6 6 require 'wsdl/soap/classDefCreator' 7 7 require 'wsdl/soap/servantSkeltonCreator' … … 20 20 ['--wsdl','-w', GetoptLong::REQUIRED_ARGUMENT], 21 21 ['--type','-t', GetoptLong::REQUIRED_ARGUMENT], 22 ['--classDef','- f', GetoptLong::NO_ARGUMENT],22 ['--classDef','-e', GetoptLong::NO_ARGUMENT], 23 23 ['--clientSkelton','-c', GetoptLong::OPTIONAL_ARGUMENT], 24 24 ['--servantSkelton','-s', GetoptLong::OPTIONAL_ARGUMENT], … … 26 26 ['--webrickStub','-b', GetoptLong::OPTIONAL_ARGUMENT], 27 27 ['--standaloneServerStub','-a', GetoptLong::OPTIONAL_ARGUMENT], 28 ['--driver','-d', GetoptLong::OPTIONAL_ARGUMENT] 28 ['--driver','-d', GetoptLong::OPTIONAL_ARGUMENT], 29 ['--force','-f', GetoptLong::NO_ARGUMENT], 29 30 ] 30 31 … … 84 85 --standaloneServerStub [serviceName] 85 86 --driver [portTypeName] 87 --force 86 88 87 89 Terminology: … … 118 120 "--webrickStub", "--standaloneServerStub", "--driver" 119 121 opt[ name.sub( /^--/, '' ) ] = arg.empty? ? nil : arg 122 when "--force" 123 opt[ 'force' ] = true 120 124 else 121 125 raise ArgumentError.new( "Unknown type #{ arg }" ) … … 213 217 def checkFile( filename ) 214 218 if FileTest.exist?( filename ) 215 log( SEV_WARN ) { 216 "File '#{ filename }' exists. #{ $0 } did not override it." } 217 false 219 if @opt.has_key?( 'force' ) 220 log( SEV_WARN ) { 221 "File '#{ filename }' exists but overrides it." 222 } 223 true 224 else 225 log( SEV_WARN ) { 226 "File '#{ filename }' exists. #{ $0 } did not override it." 227 } 228 false 229 end 218 230 else 219 231 log( SEV_INFO ) { "Creates file '#{ filename }'." }