Class: SOAP::EncodingStyle::Handler
- Inherits:
-
Object
- Object
- SOAP::EncodingStyle::Handler
show all
- Defined in:
- lib/soap/encodingstyle/handler.rb
Defined Under Namespace
Classes: EncodingStyleError
Constant Summary
collapse
- @@handlers =
{}
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
-
#decode_epilogue ⇒ Object
-
#decode_prologue ⇒ Object
-
#decode_tag(ns, name, attrs, parent) ⇒ Object
-
#decode_tag_end(ns, name) ⇒ Object
-
#decode_text(ns, text) ⇒ Object
-
#decode_typemap=(definedtypes) ⇒ Object
-
#encode_attr_key(attrs, ns, qname) ⇒ Object
-
#encode_data(generator, ns, data, parent) ⇒ Object
-
#encode_data_end(generator, ns, data, parent) ⇒ Object
-
#encode_epilogue ⇒ Object
-
#encode_prologue ⇒ Object
-
#encode_qname(attrs, ns, qname) ⇒ Object
-
#initialize(charset) ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize(charset) ⇒ Handler
Returns a new instance of Handler.
52
53
54
55
56
|
# File 'lib/soap/encodingstyle/handler.rb', line 52
def initialize(charset)
@charset = charset
@generate_explicit_type = false
@decode_typemap = nil
end
|
Instance Attribute Details
Returns the value of attribute charset.
46
47
48
|
# File 'lib/soap/encodingstyle/handler.rb', line 46
def charset
@charset
end
|
#generate_explicit_type ⇒ Object
Returns the value of attribute generate_explicit_type.
47
48
49
|
# File 'lib/soap/encodingstyle/handler.rb', line 47
def generate_explicit_type
@generate_explicit_type
end
|
Class Method Details
33
34
35
36
37
|
# File 'lib/soap/encodingstyle/handler.rb', line 33
def each
@@handlers.each do |key, value|
yield(value)
end
end
|
.handler(uri) ⇒ Object
29
30
31
|
# File 'lib/soap/encodingstyle/handler.rb', line 29
def handler(uri)
@@handlers[uri]
end
|
25
26
27
|
# File 'lib/soap/encodingstyle/handler.rb', line 25
def uri
self::Namespace
end
|
Instance Method Details
#decode_epilogue ⇒ Object
95
96
|
# File 'lib/soap/encodingstyle/handler.rb', line 95
def decode_epilogue
end
|
#decode_prologue ⇒ Object
92
93
|
# File 'lib/soap/encodingstyle/handler.rb', line 92
def decode_prologue
end
|
#decode_tag(ns, name, attrs, parent) ⇒ Object
decode interface.
Returns SOAP/OM data.
80
81
82
|
# File 'lib/soap/encodingstyle/handler.rb', line 80
def decode_tag(ns, name, attrs, parent)
raise NotImplementError
end
|
#decode_tag_end(ns, name) ⇒ Object
84
85
86
|
# File 'lib/soap/encodingstyle/handler.rb', line 84
def decode_tag_end(ns, name)
raise NotImplementError
end
|
#decode_text(ns, text) ⇒ Object
88
89
90
|
# File 'lib/soap/encodingstyle/handler.rb', line 88
def decode_text(ns, text)
raise NotImplementError
end
|
#decode_typemap=(definedtypes) ⇒ Object
48
49
50
|
# File 'lib/soap/encodingstyle/handler.rb', line 48
def decode_typemap=(definedtypes)
@decode_typemap = definedtypes
end
|
#encode_attr_key(attrs, ns, qname) ⇒ Object
98
99
100
101
102
103
104
105
106
107
|
# File 'lib/soap/encodingstyle/handler.rb', line 98
def encode_attr_key(attrs, ns, qname)
if qname.namespace.nil?
qname.name
else
unless ns.assigned_as_tagged?(qname.namespace)
Generator.assign_ns!(attrs, ns, qname.namespace)
end
ns.name_attr(qname)
end
end
|
#encode_data(generator, ns, data, parent) ⇒ Object
encode interface.
Returns a XML instance as a string.
62
63
64
|
# File 'lib/soap/encodingstyle/handler.rb', line 62
def encode_data(generator, ns, data, parent)
raise NotImplementError
end
|
#encode_data_end(generator, ns, data, parent) ⇒ Object
66
67
68
|
# File 'lib/soap/encodingstyle/handler.rb', line 66
def encode_data_end(generator, ns, data, parent)
raise NotImplementError
end
|
#encode_epilogue ⇒ Object
73
74
|
# File 'lib/soap/encodingstyle/handler.rb', line 73
def encode_epilogue
end
|
#encode_prologue ⇒ Object
70
71
|
# File 'lib/soap/encodingstyle/handler.rb', line 70
def encode_prologue
end
|
#encode_qname(attrs, ns, qname) ⇒ Object
109
110
111
112
113
114
115
116
|
# File 'lib/soap/encodingstyle/handler.rb', line 109
def encode_qname(attrs, ns, qname)
if qname.namespace.nil?
qname.name
else
Generator.assign_ns(attrs, ns, qname.namespace)
ns.name(qname)
end
end
|