Class: SOAP::EncodingStyle::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/soap/encodingstyle/handler.rb

Direct Known Subclasses

ASPDotNetHandler, LiteralHandler, SOAPHandler

Defined Under Namespace

Classes: EncodingStyleError

Constant Summary

@@handlers =
{}

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Handler) initialize(charset)



51
52
53
54
55
# File 'lib/soap/encodingstyle/handler.rb', line 51

def initialize(charset)
  @charset = charset
  @generate_explicit_type = true
  @decode_typemap = nil
end

Instance Attribute Details

- (Object) charset (readonly)

Returns the value of attribute charset



45
46
47
# File 'lib/soap/encodingstyle/handler.rb', line 45

def charset
  @charset
end

- (Object) generate_explicit_type

Returns the value of attribute generate_explicit_type



46
47
48
# File 'lib/soap/encodingstyle/handler.rb', line 46

def generate_explicit_type
  @generate_explicit_type
end

Class Method Details

+ (Object) each



32
33
34
35
36
# File 'lib/soap/encodingstyle/handler.rb', line 32

def each
  @@handlers.each do |key, value|
	yield(value)
  end
end

+ (Object) handler(uri)



28
29
30
# File 'lib/soap/encodingstyle/handler.rb', line 28

def handler(uri)
  @@handlers[uri]
end

+ (Object) uri



24
25
26
# File 'lib/soap/encodingstyle/handler.rb', line 24

def uri
  self::Namespace
end

Instance Method Details

- (Object) decode_epilogue



94
95
# File 'lib/soap/encodingstyle/handler.rb', line 94

def decode_epilogue
end

- (Object) decode_prologue



91
92
# File 'lib/soap/encodingstyle/handler.rb', line 91

def decode_prologue
end

- (Object) decode_tag(ns, name, attrs, parent)

decode interface.

Returns SOAP/OM data.

Raises:

  • (NotImplementError)


79
80
81
# File 'lib/soap/encodingstyle/handler.rb', line 79

def decode_tag(ns, name, attrs, parent)
  raise NotImplementError
end

- (Object) decode_tag_end(ns, name)

Raises:

  • (NotImplementError)


83
84
85
# File 'lib/soap/encodingstyle/handler.rb', line 83

def decode_tag_end(ns, name)
  raise NotImplementError
end

- (Object) decode_text(ns, text)

Raises:

  • (NotImplementError)


87
88
89
# File 'lib/soap/encodingstyle/handler.rb', line 87

def decode_text(ns, text)
  raise NotImplementError
end

- (Object) decode_typemap=(definedtypes)



47
48
49
# File 'lib/soap/encodingstyle/handler.rb', line 47

def decode_typemap=(definedtypes)
  @decode_typemap = definedtypes
end

- (Object) encode_attr_key(attrs, ns, qname)



97
98
99
100
101
102
103
104
105
106
# File 'lib/soap/encodingstyle/handler.rb', line 97

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

- (Object) encode_data(generator, ns, data, parent)

encode interface.

Returns a XML instance as a string.

Raises:

  • (NotImplementError)


61
62
63
# File 'lib/soap/encodingstyle/handler.rb', line 61

def encode_data(generator, ns, data, parent)
  raise NotImplementError
end

- (Object) encode_data_end(generator, ns, data, parent)

Raises:

  • (NotImplementError)


65
66
67
# File 'lib/soap/encodingstyle/handler.rb', line 65

def encode_data_end(generator, ns, data, parent)
  raise NotImplementError
end

- (Object) encode_epilogue



72
73
# File 'lib/soap/encodingstyle/handler.rb', line 72

def encode_epilogue
end

- (Object) encode_prologue



69
70
# File 'lib/soap/encodingstyle/handler.rb', line 69

def encode_prologue
end

- (Object) encode_qname(attrs, ns, qname)



108
109
110
111
112
113
114
115
# File 'lib/soap/encodingstyle/handler.rb', line 108

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