soybean 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +38 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +44 -0
- data/VERSION +1 -0
- data/bin/soybean +22 -0
- data/bin/xsd2ruby +90 -0
- data/lib/soybean.rb +11 -0
- data/lib/soybean/actions/generate_classes.rb +33 -0
- data/soybean.gemspec +236 -0
- data/spec/soybean_spec.rb +5 -0
- data/spec/spec_helper.rb +12 -0
- data/vendor/soap4r/soap/attachment.rb +109 -0
- data/vendor/soap4r/soap/attrproxy.rb +35 -0
- data/vendor/soap4r/soap/base_data.rb +1095 -0
- data/vendor/soap4r/soap/element.rb +278 -0
- data/vendor/soap4r/soap/encodingstyle/asp_dot_net_handler.rb +208 -0
- data/vendor/soap4r/soap/encodingstyle/handler.rb +121 -0
- data/vendor/soap4r/soap/encodingstyle/literal_handler.rb +196 -0
- data/vendor/soap4r/soap/encodingstyle/soap_handler.rb +560 -0
- data/vendor/soap4r/soap/filter.rb +14 -0
- data/vendor/soap4r/soap/filter/filterchain.rb +52 -0
- data/vendor/soap4r/soap/filter/handler.rb +32 -0
- data/vendor/soap4r/soap/filter/streamhandler.rb +30 -0
- data/vendor/soap4r/soap/generator.rb +299 -0
- data/vendor/soap4r/soap/header/handler.rb +62 -0
- data/vendor/soap4r/soap/header/handlerset.rb +71 -0
- data/vendor/soap4r/soap/header/mappinghandler.rb +48 -0
- data/vendor/soap4r/soap/header/simplehandler.rb +45 -0
- data/vendor/soap4r/soap/httpconfigloader.rb +140 -0
- data/vendor/soap4r/soap/mapping.rb +13 -0
- data/vendor/soap4r/soap/mapping/encodedregistry.rb +539 -0
- data/vendor/soap4r/soap/mapping/factory.rb +389 -0
- data/vendor/soap4r/soap/mapping/literalregistry.rb +392 -0
- data/vendor/soap4r/soap/mapping/mapping.rb +577 -0
- data/vendor/soap4r/soap/mapping/registry.rb +296 -0
- data/vendor/soap4r/soap/mapping/rubytype_factory.rb +446 -0
- data/vendor/soap4r/soap/mapping/schemadefinition.rb +171 -0
- data/vendor/soap4r/soap/mapping/type_map.rb +107 -0
- data/vendor/soap4r/soap/mapping/wsdlencodedregistry.rb +212 -0
- data/vendor/soap4r/soap/mapping/wsdlliteralregistry.rb +249 -0
- data/vendor/soap4r/soap/marshal.rb +60 -0
- data/vendor/soap4r/soap/mimemessage.rb +243 -0
- data/vendor/soap4r/soap/nestedexception.rb +43 -0
- data/vendor/soap4r/soap/net_http_client.rb +242 -0
- data/vendor/soap4r/soap/ns.rb +39 -0
- data/vendor/soap4r/soap/parser.rb +253 -0
- data/vendor/soap4r/soap/processor.rb +67 -0
- data/vendor/soap4r/soap/property.rb +340 -0
- data/vendor/soap4r/soap/proxy.rb +15 -0
- data/vendor/soap4r/soap/rpc/cgistub.rb +248 -0
- data/vendor/soap4r/soap/rpc/driver.rb +222 -0
- data/vendor/soap4r/soap/rpc/element.rb +375 -0
- data/vendor/soap4r/soap/rpc/httpserver.rb +143 -0
- data/vendor/soap4r/soap/rpc/method_def.rb +69 -0
- data/vendor/soap4r/soap/rpc/proxy.rb +573 -0
- data/vendor/soap4r/soap/rpc/router.rb +663 -0
- data/vendor/soap4r/soap/rpc/rpc.rb +26 -0
- data/vendor/soap4r/soap/rpc/soaplet.rb +201 -0
- data/vendor/soap4r/soap/rpc/standalone_server.rb +44 -0
- data/vendor/soap4r/soap/soap.rb +154 -0
- data/vendor/soap4r/soap/stream_handler.rb +302 -0
- data/vendor/soap4r/soap/version.rb +9 -0
- data/vendor/soap4r/soap/wsdl_driver.rb +165 -0
- data/vendor/soap4r/wsdl/binding.rb +66 -0
- data/vendor/soap4r/wsdl/data.rb +65 -0
- data/vendor/soap4r/wsdl/definitions.rb +237 -0
- data/vendor/soap4r/wsdl/documentation.rb +33 -0
- data/vendor/soap4r/wsdl/import.rb +81 -0
- data/vendor/soap4r/wsdl/importer.rb +39 -0
- data/vendor/soap4r/wsdl/info.rb +51 -0
- data/vendor/soap4r/wsdl/message.rb +55 -0
- data/vendor/soap4r/wsdl/operation.rb +152 -0
- data/vendor/soap4r/wsdl/operation_binding.rb +241 -0
- data/vendor/soap4r/wsdl/param.rb +94 -0
- data/vendor/soap4r/wsdl/parser.rb +165 -0
- data/vendor/soap4r/wsdl/part.rb +53 -0
- data/vendor/soap4r/wsdl/port.rb +67 -0
- data/vendor/soap4r/wsdl/port_type.rb +76 -0
- data/vendor/soap4r/wsdl/service.rb +62 -0
- data/vendor/soap4r/wsdl/soap/address.rb +41 -0
- data/vendor/soap4r/wsdl/soap/binding.rb +50 -0
- data/vendor/soap4r/wsdl/soap/body.rb +59 -0
- data/vendor/soap4r/wsdl/soap/cgi_stub_creator.rb +93 -0
- data/vendor/soap4r/wsdl/soap/class_def_creator.rb +437 -0
- data/vendor/soap4r/wsdl/soap/class_def_creator_support.rb +241 -0
- data/vendor/soap4r/wsdl/soap/class_name_creator.rb +55 -0
- data/vendor/soap4r/wsdl/soap/client_skelton_creator.rb +107 -0
- data/vendor/soap4r/wsdl/soap/complex_type.rb +174 -0
- data/vendor/soap4r/wsdl/soap/data.rb +43 -0
- data/vendor/soap4r/wsdl/soap/definitions.rb +201 -0
- data/vendor/soap4r/wsdl/soap/driver_creator.rb +121 -0
- data/vendor/soap4r/wsdl/soap/element.rb +34 -0
- data/vendor/soap4r/wsdl/soap/encoded_mapping_registry_creator.rb +74 -0
- data/vendor/soap4r/wsdl/soap/fault.rb +57 -0
- data/vendor/soap4r/wsdl/soap/header.rb +87 -0
- data/vendor/soap4r/wsdl/soap/headerfault.rb +57 -0
- data/vendor/soap4r/wsdl/soap/literal_mapping_registry_creator.rb +116 -0
- data/vendor/soap4r/wsdl/soap/mapping_registry_creator.rb +59 -0
- data/vendor/soap4r/wsdl/soap/mapping_registry_creator_support.rb +377 -0
- data/vendor/soap4r/wsdl/soap/method_def_creator.rb +200 -0
- data/vendor/soap4r/wsdl/soap/operation.rb +113 -0
- data/vendor/soap4r/wsdl/soap/servant_skelton_creator.rb +92 -0
- data/vendor/soap4r/wsdl/soap/servlet_stub_creator.rb +105 -0
- data/vendor/soap4r/wsdl/soap/standalone_server_stub_creator.rb +101 -0
- data/vendor/soap4r/wsdl/soap/wsdl2ruby.rb +226 -0
- data/vendor/soap4r/wsdl/types.rb +45 -0
- data/vendor/soap4r/wsdl/wsdl.rb +25 -0
- data/vendor/soap4r/wsdl/xml_schema/all.rb +25 -0
- data/vendor/soap4r/wsdl/xml_schema/annotation.rb +35 -0
- data/vendor/soap4r/wsdl/xml_schema/any.rb +62 -0
- data/vendor/soap4r/wsdl/xml_schema/any_attribute.rb +49 -0
- data/vendor/soap4r/wsdl/xml_schema/attribute.rb +105 -0
- data/vendor/soap4r/wsdl/xml_schema/attribute_group.rb +69 -0
- data/vendor/soap4r/wsdl/xml_schema/choice.rb +59 -0
- data/vendor/soap4r/wsdl/xml_schema/complex_content.rb +98 -0
- data/vendor/soap4r/wsdl/xml_schema/complex_extension.rb +120 -0
- data/vendor/soap4r/wsdl/xml_schema/complex_restriction.rb +105 -0
- data/vendor/soap4r/wsdl/xml_schema/complex_type.rb +194 -0
- data/vendor/soap4r/wsdl/xml_schema/content.rb +96 -0
- data/vendor/soap4r/wsdl/xml_schema/data.rb +117 -0
- data/vendor/soap4r/wsdl/xml_schema/element.rb +154 -0
- data/vendor/soap4r/wsdl/xml_schema/enumeration.rb +37 -0
- data/vendor/soap4r/wsdl/xml_schema/fractiondigits.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/group.rb +101 -0
- data/vendor/soap4r/wsdl/xml_schema/import.rb +54 -0
- data/vendor/soap4r/wsdl/xml_schema/import_handler.rb +46 -0
- data/vendor/soap4r/wsdl/xml_schema/importer.rb +103 -0
- data/vendor/soap4r/wsdl/xml_schema/include.rb +49 -0
- data/vendor/soap4r/wsdl/xml_schema/length.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/list.rb +49 -0
- data/vendor/soap4r/wsdl/xml_schema/maxexclusive.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/maxinclusive.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/maxlength.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/minexclusive.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/mininclusive.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/minlength.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/parser.rb +168 -0
- data/vendor/soap4r/wsdl/xml_schema/pattern.rb +37 -0
- data/vendor/soap4r/wsdl/xml_schema/ref.rb +34 -0
- data/vendor/soap4r/wsdl/xml_schema/schema.rb +179 -0
- data/vendor/soap4r/wsdl/xml_schema/sequence.rb +55 -0
- data/vendor/soap4r/wsdl/xml_schema/simple_content.rb +70 -0
- data/vendor/soap4r/wsdl/xml_schema/simple_extension.rb +63 -0
- data/vendor/soap4r/wsdl/xml_schema/simple_restriction.rb +133 -0
- data/vendor/soap4r/wsdl/xml_schema/simple_type.rb +88 -0
- data/vendor/soap4r/wsdl/xml_schema/totaldigits.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/union.rb +36 -0
- data/vendor/soap4r/wsdl/xml_schema/unique.rb +35 -0
- data/vendor/soap4r/wsdl/xml_schema/whitespace.rb +38 -0
- data/vendor/soap4r/wsdl/xml_schema/xsd2ruby.rb +176 -0
- data/vendor/soap4r/xsd/charset.rb +190 -0
- data/vendor/soap4r/xsd/codegen.rb +13 -0
- data/vendor/soap4r/xsd/codegen/classdef.rb +209 -0
- data/vendor/soap4r/xsd/codegen/commentdef.rb +35 -0
- data/vendor/soap4r/xsd/codegen/gensupport.rb +277 -0
- data/vendor/soap4r/xsd/codegen/methoddef.rb +71 -0
- data/vendor/soap4r/xsd/codegen/moduledef.rb +209 -0
- data/vendor/soap4r/xsd/datatypes.rb +1466 -0
- data/vendor/soap4r/xsd/datatypes1999.rb +21 -0
- data/vendor/soap4r/xsd/iconvcharset.rb +34 -0
- data/vendor/soap4r/xsd/mapping.rb +69 -0
- data/vendor/soap4r/xsd/namedelements.rb +133 -0
- data/vendor/soap4r/xsd/ns.rb +183 -0
- data/vendor/soap4r/xsd/qname.rb +80 -0
- data/vendor/soap4r/xsd/xmlparser.rb +77 -0
- data/vendor/soap4r/xsd/xmlparser/libxmlparser.rb +116 -0
- data/vendor/soap4r/xsd/xmlparser/parser.rb +101 -0
- data/vendor/soap4r/xsd/xmlparser/rexmlparser.rb +59 -0
- data/vendor/soap4r/xsd/xmlparser/xmlparser.rb +51 -0
- data/vendor/soap4r/xsd/xmlparser/xmlscanner.rb +150 -0
- metadata +316 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema import definition.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
require 'wsdl/xml_schema/importer'
|
12
|
+
require 'wsdl/xml_schema/import_handler'
|
13
|
+
|
14
|
+
|
15
|
+
module WSDL
|
16
|
+
module XMLSchema
|
17
|
+
|
18
|
+
|
19
|
+
class Import < Info
|
20
|
+
attr_reader :namespace
|
21
|
+
|
22
|
+
def initialize
|
23
|
+
super
|
24
|
+
@namespace = nil
|
25
|
+
@handler = ImportHandler.new
|
26
|
+
end
|
27
|
+
|
28
|
+
def schemalocation
|
29
|
+
@handler.schemalocation
|
30
|
+
end
|
31
|
+
|
32
|
+
def content
|
33
|
+
@handler.content
|
34
|
+
end
|
35
|
+
|
36
|
+
def parse_element(element)
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
def parse_attr(attr, value)
|
41
|
+
case attr
|
42
|
+
when NamespaceAttrName
|
43
|
+
@namespace = value.source
|
44
|
+
when SchemaLocationAttrName
|
45
|
+
@handler.parse_schemalocation(value.source, root, parent)
|
46
|
+
else
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema import handler.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
require 'wsdl/xml_schema/importer'
|
12
|
+
|
13
|
+
|
14
|
+
module WSDL
|
15
|
+
module XMLSchema
|
16
|
+
|
17
|
+
|
18
|
+
class ImportHandler
|
19
|
+
attr_reader :schemalocation
|
20
|
+
attr_reader :content
|
21
|
+
|
22
|
+
def initialize
|
23
|
+
@schemalocation = nil
|
24
|
+
@content = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def parse_schemalocation(location, root, parent)
|
28
|
+
@schemalocation = URI.parse(location)
|
29
|
+
if @schemalocation.relative? and !parent.location.nil? and
|
30
|
+
!parent.location.relative?
|
31
|
+
@schemalocation = parent.location + @schemalocation
|
32
|
+
end
|
33
|
+
if root.importedschema.key?(@schemalocation)
|
34
|
+
@content = root.importedschema[@schemalocation]
|
35
|
+
else
|
36
|
+
root.importedschema[@schemalocation] = nil # placeholder
|
37
|
+
@content = Importer.import(@schemalocation, root)
|
38
|
+
root.importedschema[@schemalocation] = @content
|
39
|
+
end
|
40
|
+
@schemalocation
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XSD importer library.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'soap/soap'
|
11
|
+
require 'soap/httpconfigloader'
|
12
|
+
require 'wsdl/xml_schema/parser'
|
13
|
+
|
14
|
+
|
15
|
+
module WSDL
|
16
|
+
module XMLSchema
|
17
|
+
|
18
|
+
|
19
|
+
class Importer
|
20
|
+
DO_NOT_IMPORT = [::SOAP::EncodingNamespace]
|
21
|
+
|
22
|
+
def self.import(location, originalroot = nil)
|
23
|
+
new.import(location, originalroot)
|
24
|
+
end
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
@web_client = nil
|
28
|
+
end
|
29
|
+
|
30
|
+
def import(location, originalroot = nil)
|
31
|
+
if DO_NOT_IMPORT.include?(location.to_s)
|
32
|
+
return nil
|
33
|
+
end
|
34
|
+
unless location.is_a?(URI)
|
35
|
+
location = URI.parse(location)
|
36
|
+
end
|
37
|
+
source, normalizedlocation = fetch(location)
|
38
|
+
content = parse(source, normalizedlocation, originalroot)
|
39
|
+
content.location = normalizedlocation
|
40
|
+
content
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def parse(content, location, originalroot)
|
46
|
+
opt = {
|
47
|
+
:location => location,
|
48
|
+
:originalroot => originalroot
|
49
|
+
}
|
50
|
+
WSDL::XMLSchema::Parser.new(opt).parse(content)
|
51
|
+
end
|
52
|
+
|
53
|
+
def fetch(location)
|
54
|
+
warn("importing: #{location}") if $DEBUG
|
55
|
+
content = nil
|
56
|
+
normalizedlocation = location
|
57
|
+
if location.scheme == 'file' or
|
58
|
+
(location.relative? and FileTest.exist?(location.path))
|
59
|
+
content = File.open(location.path).read
|
60
|
+
normalizedlocation = URI.parse('file://' + File.expand_path(location.path))
|
61
|
+
elsif location.scheme and location.scheme.size == 1 and
|
62
|
+
FileTest.exist?(location.to_s)
|
63
|
+
# ToDo: remove this ugly workaround for a path with drive letter
|
64
|
+
# (D://foo/bar)
|
65
|
+
content = File.open(location.to_s).read
|
66
|
+
else
|
67
|
+
client = web_client.new(nil, "WSDL4R")
|
68
|
+
client.proxy = ::SOAP::Env::HTTP_PROXY
|
69
|
+
client.no_proxy = ::SOAP::Env::NO_PROXY
|
70
|
+
if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName)
|
71
|
+
http_opt = opt["client.protocol.http"]
|
72
|
+
::SOAP::HTTPConfigLoader.set_options(client, http_opt) if http_opt
|
73
|
+
end
|
74
|
+
content = client.get_content(location)
|
75
|
+
end
|
76
|
+
return content, normalizedlocation
|
77
|
+
end
|
78
|
+
|
79
|
+
def web_client
|
80
|
+
return @web_client if @web_client
|
81
|
+
begin
|
82
|
+
require 'httpclient'
|
83
|
+
@web_client = HTTPClient
|
84
|
+
rescue LoadError
|
85
|
+
begin
|
86
|
+
require 'http-access2'
|
87
|
+
if HTTPAccess2::VERSION < "2.0"
|
88
|
+
raise LoadError.new("http-access/2.0 or later is required.")
|
89
|
+
end
|
90
|
+
@web_client = HTTPAccess2::Client
|
91
|
+
rescue LoadError
|
92
|
+
warn("Loading http-access2 failed. Net/http is used.") if $DEBUG
|
93
|
+
require 'soap/netHttpClient'
|
94
|
+
@web_client = ::SOAP::NetHttpClient
|
95
|
+
end
|
96
|
+
end
|
97
|
+
@web_client
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema include definition.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
require 'wsdl/xml_schema/importer'
|
12
|
+
require 'wsdl/xml_schema/import_handler'
|
13
|
+
|
14
|
+
|
15
|
+
module WSDL
|
16
|
+
module XMLSchema
|
17
|
+
|
18
|
+
|
19
|
+
class Include < Info
|
20
|
+
def initialize
|
21
|
+
super
|
22
|
+
@handler = ImportHandler.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def schemalocation
|
26
|
+
@handler.schemalocation
|
27
|
+
end
|
28
|
+
|
29
|
+
def content
|
30
|
+
@handler.content
|
31
|
+
end
|
32
|
+
|
33
|
+
def parse_element(element)
|
34
|
+
nil
|
35
|
+
end
|
36
|
+
|
37
|
+
def parse_attr(attr, value)
|
38
|
+
case attr
|
39
|
+
when SchemaLocationAttrName
|
40
|
+
@handler.parse_schemalocation(value.source, root, parent)
|
41
|
+
else
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema length definition for WSDL.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class Length < Info
|
18
|
+
def initialize
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse_element(element)
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def parse_attr(attr, value)
|
27
|
+
case attr
|
28
|
+
when FixedAttrName
|
29
|
+
parent.fixed[:length] = to_boolean(value)
|
30
|
+
when ValueAttrName
|
31
|
+
parent.length = to_int(value)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema list definition for WSDL.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class List < Info
|
18
|
+
attr_reader :itemtype
|
19
|
+
attr_reader :local_simpletype
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
super()
|
23
|
+
@itemtype = nil
|
24
|
+
@local_simpletype = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def parse_element(element)
|
28
|
+
case element
|
29
|
+
when SimpleTypeName
|
30
|
+
@local_simpletype = SimpleType.new
|
31
|
+
@local_simpletype
|
32
|
+
else
|
33
|
+
nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def parse_attr(attr, value)
|
38
|
+
case attr
|
39
|
+
when ItemTypeAttrName
|
40
|
+
@itemtype = value
|
41
|
+
else
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema maxExclusive definition for WSDL.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class MaxExclusive < Info
|
18
|
+
def initialize
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse_element(element)
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def parse_attr(attr, value)
|
27
|
+
case attr
|
28
|
+
when FixedAttrName
|
29
|
+
parent.fixed[:maxexclusive] = to_boolean(value)
|
30
|
+
when ValueAttrName
|
31
|
+
parent.maxexclusive = value.source
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema maxInclusive definition for WSDL.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class MaxInclusive < Info
|
18
|
+
def initialize
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse_element(element)
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def parse_attr(attr, value)
|
27
|
+
case attr
|
28
|
+
when FixedAttrName
|
29
|
+
parent.fixed[:maxinclusive] = to_boolean(value)
|
30
|
+
when ValueAttrName
|
31
|
+
parent.maxinclusive = value.source
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
# WSDL4R - XMLSchema maxLength definition for WSDL.
|
3
|
+
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
4
|
+
|
5
|
+
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
6
|
+
# redistribute it and/or modify it under the same terms of Ruby's license;
|
7
|
+
# either the dual license version in 2003, or any later version.
|
8
|
+
|
9
|
+
|
10
|
+
require 'wsdl/info'
|
11
|
+
|
12
|
+
|
13
|
+
module WSDL
|
14
|
+
module XMLSchema
|
15
|
+
|
16
|
+
|
17
|
+
class MaxLength < Info
|
18
|
+
def initialize
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse_element(element)
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def parse_attr(attr, value)
|
27
|
+
case attr
|
28
|
+
when FixedAttrName
|
29
|
+
parent.fixed[:maxlength] = to_boolean(value)
|
30
|
+
when ValueAttrName
|
31
|
+
parent.maxlength = to_int(value)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|