Sha256: f8e5efdff32fe9756391faa02bc35270cd0b7fa0226f75a4e65446794c04c4e5

Contents?: true

Size: 1.52 KB

Versions: 30

Compression:

Stored size: 1.52 KB

Contents

# SOAP4R - A method definition
# Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.

# This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.


module SOAP
module RPC


class MethodDef
  attr_reader :name
  attr_reader :soapaction
  attr_reader :qname
  attr_accessor :style
  attr_accessor :inputuse
  attr_accessor :outputuse
  attr_reader :parameters
  attr_reader :faults

  def initialize(name, soapaction, qname)
    @name = name
    @soapaction = soapaction
    @qname = qname
    @style = @inputuse = @outputuse = nil
    @parameters = []
    @faults = {}
  end

  def add_parameter(io_type, name, qname, mapped_class)
    @parameters << Parameter.new(io_type, name, qname, mapped_class)
  end

  def self.to_param(param)
    if param.respond_to?(:io_type)
      param
    else
      io_type, name, param_type = param
      mapped_class_str, nsdef, namedef = param_type
      if nsdef && namedef
        qname = XSD::QName.new(nsdef, namedef)
      else
        qname = nil
      end
      MethodDef::Parameter.new(io_type.to_sym, name, qname, mapped_class_str)
    end
  end

  class Parameter
    attr_reader :io_type
    attr_reader :name
    attr_reader :qname
    attr_reader :mapped_class

    def initialize(io_type, name, qname, mapped_class)
      @io_type = io_type
      @name = name
      @qname = qname
      @mapped_class = mapped_class
    end
  end
end


end
end

Version data entries

30 entries across 30 versions & 12 rubygems

Version Path
mumboe-soap4r-1.6.0.pre.beta lib/soap/rpc/methodDef.rb
DefV-soap4r-1.5.8.2 lib/soap/rpc/methodDef.rb
mumboe-soap4r-1.5.8.7 lib/soap/rpc/methodDef.rb
soap2r-1.5.8 lib/soap/rpc/methodDef.rb
teo-soap4r-1.5.9b lib/soap/rpc/methodDef.rb
mumboe-soap4r-1.5.8.6 lib/soap/rpc/methodDef.rb
soap4r-spox-1.6.0 lib/soap/rpc/methodDef.rb
soap4r-r19-1.5.9 lib/soap/rpc/methodDef.rb
mumboe-soap4r-1.5.8.5 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-2.0.5 lib/soap/rpc/methodDef.rb
soap4r-sgonyea-1.6.0 lib/soap/rpc/methodDef.rb
soap4r-straightjacket-1.5.9 lib/soap/rpc/methodDef.rb
soap4r-straightjacket-1.5.8 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-2.0.3 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-2.0.2 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-2.0.1 lib/soap/rpc/methodDef.rb
mumboe-soap4r-1.5.8.4 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-2.0.0 lib/soap/rpc/methodDef.rb
hands-soap4r-1.5.8.4 lib/soap/rpc/methodDef.rb
soap4r-ruby1.9-1.0.0 lib/soap/rpc/methodDef.rb