method

dump_method

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: WSDL::SOAP::MethodDefCreator
dump_method(operation, binding) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/wsdl/soap/methodDefCreator.rb, line 81
  def dump_method(operation, binding)
    name = safemethodname(operation.name.name)
    name_as = operation.name.name
    style = binding.soapoperation_style
    inputuse = binding.input.soapbody_use
    outputuse = binding.output.soapbody_use
    namespace = binding.input.soapbody.namespace
    if style == :rpc
      qname = XSD::QName.new(namespace, name_as)
      paramstr = param2str(collect_rpcparameter(operation))
    else
      qname = nil
      paramstr = param2str(collect_documentparameter(operation))
    end
    if paramstr.empty?
      paramstr = '[]'
    else
      paramstr = "[ " << paramstr.split(/\r?\n/).join("\n    ") << " ]"
    end
    definitions = "\#{ndq(binding.soapaction)},\n  \#{dq(name)},\n  \#{paramstr},\n  { :request_style =>  \#{sym(style.id2name)}, :request_use =>  \#{sym(inputuse.id2name)},\n    :response_style => \#{sym(style.id2name)}, :response_use => \#{sym(outputuse.id2name)} }\n"
    if style == :rpc
      return "[ \#{qname.dump},\n  \#{definitions}]\n"
    else
      return "[ \#{definitions}]\n"
    end
  end
Register or log in to add new notes.