Class: ActionWebService::Protocol::Soap::SoapBinding
- Inherits:
-
Object
- Object
- ActionWebService::Protocol::Soap::SoapBinding
- Defined in:
- lib/action_web_service/protocol/soap_protocol/marshaler.rb
Instance Attribute Summary collapse
-
#element_binding ⇒ Object
readonly
Returns the value of attribute element_binding.
-
#mapping ⇒ Object
readonly
Returns the value of attribute mapping.
-
#qname ⇒ Object
readonly
Returns the value of attribute qname.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(marshaler, qname, type, mapping, element_binding = nil) ⇒ SoapBinding
constructor
A new instance of SoapBinding.
- #qualified_type_name(ns = nil) ⇒ Object
- #type_name ⇒ Object
Constructor Details
#initialize(marshaler, qname, type, mapping, element_binding = nil) ⇒ SoapBinding
Returns a new instance of SoapBinding.
142 143 144 145 146 147 148 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 142 def initialize(marshaler, qname, type, mapping, element_binding=nil) @marshaler = marshaler @qname = qname @type = type @mapping = mapping @element_binding = element_binding end |
Instance Attribute Details
#element_binding ⇒ Object (readonly)
Returns the value of attribute element_binding.
140 141 142 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 140 def element_binding @element_binding end |
#mapping ⇒ Object (readonly)
Returns the value of attribute mapping.
139 140 141 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 139 def mapping @mapping end |
#qname ⇒ Object (readonly)
Returns the value of attribute qname.
137 138 139 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 137 def qname @qname end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
138 139 140 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 138 def type @type end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
167 168 169 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 167 def eql?(other) @qname == other.qname end |
#hash ⇒ Object
172 173 174 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 172 def hash @qname.hash end |
#qualified_type_name(ns = nil) ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 154 def qualified_type_name(ns=nil) if @type.custom? "#{ns ? ns : @qname.namespace}:#{@qname.name}" else ns = XSD::NS.new ns.assign(XSD::Namespace, SOAP::XSDNamespaceTag) ns.assign(SOAP::EncodingNamespace, "soapenc") xsd_klass = mapping[0].ancestors.find{|c| c.const_defined?('Type')} return ns.name(XSD::AnyTypeName) unless xsd_klass ns.name(xsd_klass.const_get('Type')) end end |
#type_name ⇒ Object
150 151 152 |
# File 'lib/action_web_service/protocol/soap_protocol/marshaler.rb', line 150 def type_name @type.custom? ? @qname.name : nil end |