Sha256: cf3df6fbd0b99ea00c42d9bddc1db0e05a5e0c46f2200f66b8cd8efeddf53b85

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

require 'sekken/wsdl/input_output'
require 'sekken/xml/element_builder'

class Sekken
  class WSDL
    class Operation

      def initialize(name, endpoint, binding_operation, port_type_operation, wsdl)
        @name = name
        @endpoint = endpoint
        @binding_operation = binding_operation
        @port_type_operation = port_type_operation
        @wsdl = wsdl
      end

      attr_reader :name, :endpoint, :binding_operation, :port_type_operation

      def soap_action
        @binding_operation.soap_action
      end

      def soap_version
        case @binding_operation.soap_namespace
        when Sekken::NS_SOAP_1_1 then '1.1'
        when Sekken::NS_SOAP_1_2 then '1.2'
        end
      end

      def input
        @input ||= Input.new(@binding_operation, @port_type_operation, @wsdl)
      end

      def output
        @output ||= Output.new(@binding_operation, @port_type_operation, @wsdl)
      end

      def input_style
        "#{@binding_operation.style}/#{@binding_operation.input_body[:use]}"
      end

      def output_style
        "#{@binding_operation.style}/#{@binding_operation.output[:body][:use]}"
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sekken-0.3.0 lib/sekken/wsdl/operation.rb
sekken-0.2.0 lib/sekken/wsdl/operation.rb
sekken-0.1.0 lib/sekken/wsdl/operation.rb