Class: SOAP::RPC::SOAPMethod
- Inherits:
-
SOAPStruct
- Object
- XSD::NSDBase
- SOAPStruct
- SOAP::RPC::SOAPMethod
- Defined in:
- lib/soap/rpc/element.rb
Direct Known Subclasses
Constant Summary collapse
- RETVAL =
:retval- IN =
:in- OUT =
:out- INOUT =
:inout
Constants included from SOAP
AttrActor, AttrActorName, AttrArrayType, AttrArrayTypeName, AttrEncodingStyle, AttrEncodingStyleName, AttrHref, AttrHrefName, AttrId, AttrIdName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, SOAPNamespaceTag, SOAPProxy, TypeMap, ValueArray, ValueArrayName, Version, XSDNamespaceTag, XSINamespaceTag
Instance Attribute Summary collapse
-
#inparam ⇒ Object
readonly
Returns the value of attribute inparam.
-
#outparam ⇒ Object
readonly
Returns the value of attribute outparam.
-
#param_def ⇒ Object
readonly
Returns the value of attribute param_def.
-
#retval_class_name ⇒ Object
readonly
Returns the value of attribute retval_class_name.
-
#retval_name ⇒ Object
readonly
Returns the value of attribute retval_name.
Attributes included from SOAPCompoundtype
Attributes included from SOAPType
#definedtype, #elename, #encodingstyle, #extraattr, #force_typed, #id, #parent, #position, #precedents, #root
Attributes inherited from XSD::NSDBase
Class Method Summary collapse
Instance Method Summary collapse
- #get_paramtypes(names) ⇒ Object
- #have_member ⇒ Object
- #have_outparam? ⇒ Boolean
-
#initialize(qname, param_def = nil) ⇒ SOAPMethod
constructor
A new instance of SOAPMethod.
- #input_param_types ⇒ Object
- #input_params ⇒ Object
- #output_param_types ⇒ Object
- #output_params ⇒ Object
- #set_outparam(params) ⇒ Object
- #set_param(params) ⇒ Object
Methods inherited from SOAPStruct
#[], #[]=, #add, decode, #each, #key?, #members, #replace, #to_obj, #to_s
Methods included from SOAPType
Methods inherited from XSD::NSDBase
Constructor Details
#initialize(qname, param_def = nil) ⇒ SOAPMethod
Returns a new instance of SOAPMethod.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/soap/rpc/element.rb', line 85 def initialize(qname, param_def = nil) super(nil) @elename = qname @encodingstyle = nil @param_def = param_def @signature = [] @inparam_names = [] @inoutparam_names = [] @outparam_names = [] @inparam = {} @outparam = {} @retval_name = nil @retval_class_name = nil init_params(@param_def) if @param_def end |
Instance Attribute Details
#inparam ⇒ Object (readonly)
Returns the value of attribute inparam.
80 81 82 |
# File 'lib/soap/rpc/element.rb', line 80 def inparam @inparam end |
#outparam ⇒ Object (readonly)
Returns the value of attribute outparam.
81 82 83 |
# File 'lib/soap/rpc/element.rb', line 81 def outparam @outparam end |
#param_def ⇒ Object (readonly)
Returns the value of attribute param_def.
79 80 81 |
# File 'lib/soap/rpc/element.rb', line 79 def param_def @param_def end |
#retval_class_name ⇒ Object (readonly)
Returns the value of attribute retval_class_name.
83 84 85 |
# File 'lib/soap/rpc/element.rb', line 83 def retval_class_name @retval_class_name end |
#retval_name ⇒ Object (readonly)
Returns the value of attribute retval_name.
82 83 84 |
# File 'lib/soap/rpc/element.rb', line 82 def retval_name @retval_name end |
Class Method Details
.parse_mapped_class(mapped_class) ⇒ Object
257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/soap/rpc/element.rb', line 257 def self.parse_mapped_class(mapped_class) # the first element of typedef in param_def can be a String like # "::SOAP::SOAPStruct" or "CustomClass[]". turn this String to a class if # we can. if mapped_class.is_a?(String) if /\[\]\Z/ =~ mapped_class # when '[]' is added, ignore this. mapped_class = nil else mapped_class = Mapping.class_from_name(mapped_class) end end mapped_class end |
Instance Method Details
#get_paramtypes(names) ⇒ Object
144 145 146 147 148 149 150 151 152 |
# File 'lib/soap/rpc/element.rb', line 144 def get_paramtypes(names) types = [] @signature.each do |io_type, name, type_qname| if type_qname && idx = names.index(name) types[idx] = type_qname end end types end |
#have_member ⇒ Object
105 106 107 |
# File 'lib/soap/rpc/element.rb', line 105 def have_member true end |
#have_outparam? ⇒ Boolean
109 110 111 |
# File 'lib/soap/rpc/element.rb', line 109 def have_outparam? @outparam_names.size > 0 end |
#input_param_types ⇒ Object
121 122 123 |
# File 'lib/soap/rpc/element.rb', line 121 def input_param_types collect_param_types(IN, INOUT) end |
#input_params ⇒ Object
113 114 115 |
# File 'lib/soap/rpc/element.rb', line 113 def input_params collect_params(IN, INOUT) end |
#output_param_types ⇒ Object
125 126 127 |
# File 'lib/soap/rpc/element.rb', line 125 def output_param_types collect_param_types(OUT, INOUT) end |
#output_params ⇒ Object
117 118 119 |
# File 'lib/soap/rpc/element.rb', line 117 def output_params collect_params(OUT, INOUT) end |