def class_action_module
      @class_action_module ||= Module.new do

        # Returns the memoized <tt>Savon::Client</tt>.
        def client(&block)
          @client ||= Savon::Client.new(&block)
        end

        # Sets the SOAP endpoint to the given +uri+.
        def endpoint(uri)
          client.wsdl.endpoint = uri
        end

        # Sets the target namespace.
        def namespace(uri)
          client.wsdl.namespace = uri
        end

        # Sets the WSDL document to the given +uri+.
        def document(uri)
          client.wsdl.document = uri
        end

        # Sets the HTTP headers.
        def headers(headers)
          client.http.headers = headers
        end

        def client_request(action, body, &block)
          client.request :wsdl, action, body, &block
        end

        # Sets basic auth +login+ and +password+.
        def basic_auth(login, password)
          client.http.auth.basic(login, password)
        end

        # Sets WSSE auth credentials.
        def wsse_auth(*args)
          client.wsse.credentials(*args)
        end

      end.tap { |mod| extend(mod) }
    end
def class_action_module
      @class_action_module ||= Module.new do

        # Returns the memoized <tt>Savon::Client</tt>.
        def client(&block)
          @client ||= Savon::Client.new(&block)
        end

        # Sets the SOAP endpoint to the given +uri+.
        def endpoint(uri)
          client.wsdl.endpoint = uri
        end

        # Sets the target namespace.
        def namespace(uri)
          client.wsdl.namespace = uri
        end

        # Sets the WSDL document to the given +uri+.
        def document(uri)
          client.wsdl.document = uri
        end

        # Sets the HTTP headers.
        def headers(headers)
          client.http.headers = headers
        end

        def client_request(action, body, &block)
          client.request :wsdl, action, body, &block
        end

        # Sets basic auth +login+ and +password+.
        def basic_auth(login, password)
          client.http.auth.basic(login, password)
        end

        # Sets WSSE auth credentials.
        def wsse_auth(*args)
          client.wsse.credentials(*args)
        end

      end.tap { |mod| extend(mod) }
    end
Class methods.