Class WS::Marshaling::SoapBinding
In: vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb
Parent: Object

Methods

Attributes

element_binding  [R] 
mapping  [R] 
qname  [R] 
type_class  [R] 

Public Class methods

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 163
163:       def initialize(marshaler, qname, type_class, mapping, element_binding=nil)
164:         @marshaler = marshaler
165:         @qname = qname
166:         @type_class = type_class
167:         @mapping = mapping
168:         @element_binding = element_binding
169:       end

Public Instance methods

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 184
184:       def each_member(&block)
185:         if is_typed_struct?
186:           if @mapping[1] == SOAP::Mapping::Registry::TypedStructFactory
187:             if @type_class.respond_to?(:members)
188:               @type_class.members.each do |name, spec|
189:                 yield name, spec
190:               end
191:             end
192:           elsif @mapping[1].is_a?(WS::Marshaling::SoapActiveRecordStructFactory)
193:             @type_class.columns.each do |column|
194:               yield column.name, column.klass
195:             end
196:           end
197:         end
198:       end

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 171
171:       def is_custom_type?
172:         is_typed_array? || is_typed_struct?
173:       end

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 175
175:       def is_typed_array?
176:         @mapping[1].is_a?(WS::Marshaling::SoapTypedArrayFactory)
177:       end

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 179
179:       def is_typed_struct?
180:         @mapping[1] == SOAP::Mapping::Registry::TypedStructFactory || \
181:         @mapping[1].is_a?(WS::Marshaling::SoapActiveRecordStructFactory)
182:       end

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 204
204:       def qualified_type_name(ns=nil)
205:         if is_custom_type?
206:           "#{ns ? ns : @qname.namespace}:#{@qname.name}"
207:         else
208:           ns = XSD::NS.new
209:           ns.assign(XSD::Namespace, SOAP::XSDNamespaceTag)
210:           xsd_klass = mapping[0].ancestors.find{|c| c.const_defined?('Type')}
211:           return ns.name(XSD::AnyTypeName) unless xsd_klass
212:           ns.name(xsd_klass.const_get('Type'))
213:         end
214:       end

[Source]

     # File vendor/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb, line 200
200:       def type_name
201:         is_custom_type? ? @qname.name : nil
202:       end

[Validate]