method
add_operation
v1_8_7_72 -
Show latest stable
- Class:
SOAP::WSDLDriverFactory
add_operation(drv, port)private
No documentation available.
# File lib/soap/wsdlDriver.rb, line 95
def add_operation(drv, port)
port.find_binding.operations.each do |op_bind|
op_name = op_bind.soapoperation_name
soapaction = op_bind.soapaction || ''
orgname = op_name.name
name = XSD::CodeGen::GenSupport.safemethodname(orgname)
param_def = create_param_def(op_bind)
opt = {
:request_style => op_bind.soapoperation_style,
:response_style => op_bind.soapoperation_style,
:request_use => op_bind.input.soapbody_use,
:response_use => op_bind.output.soapbody_use,
:elementformdefault => false,
:attributeformdefault => false
}
if op_bind.soapoperation_style == :rpc
drv.add_rpc_operation(op_name, soapaction, name, param_def, opt)
else
drv.add_document_operation(soapaction, name, param_def, opt)
end
if orgname != name and orgname.capitalize == name.capitalize
::SOAP::Mapping.define_singleton_method(drv, orgname) do |*arg|
__send__(name, *arg)
end
end
end
end