Sha256: d8ba5772bc88a17b95385842b5598fefaad3fc5cad2ce99ab2192d26606584d2

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

require 'wash_out'
require 'virtus'
require 'washout_builder/soap'
require 'washout_builder/engine'
require 'washout_builder/dispatcher'
require 'washout_builder/type'


module ActionDispatch::Routing
  class  Mapper

    alias_method  :original_wash_out,:wash_out

    # Adds the routes for a SOAP endpoint at +controller+.
    def wash_out(controller_name, options={})
      options.reverse_merge!(@scope) if @scope

      match "#{controller_name}/doc"   => "#{controller_name}#_generate_doc", :via => :get, :format => false
      original_wash_out(controller_name, options)


    end
  end
end




WashOut::SOAPError.class_eval do
  include Virtus.model
  attribute :code, Integer
  attribute :message, String
  attribute :backtrace, String
end


ActionController::Base.class_eval do

  # Define a SOAP service. The function has no required +options+:
  # but allow any of :parser, :namespace, :wsdl_style, :snakecase_input,
  # :camelize_wsdl, :wsse_username, :wsse_password and :catch_xml_errors.
  #
  # Any of the the params provided allows for overriding the defaults
  # (like supporting multiple namespaces instead of application wide such)
  #
  def self.soap_service(options={})
    include WashoutBuilder::SOAP
    self.soap_config = options
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
washout_builder-0.9.12 lib/washout_builder.rb
washout_builder-0.9.10 lib/washout_builder.rb
washout_builder-0.9.9 lib/washout_builder.rb
washout_builder-0.9.8 lib/washout_builder.rb
washout_builder-0.9.7 lib/washout_builder.rb
washout_builder-0.9.6 lib/washout_builder.rb
washout_builder-0.9.5 lib/washout_builder.rb