Class: SOAP::WSDLDriver::Servant__

Class | SOAP::WSDLDriver::Servant__
In: | soap/wsdlDriver.rb
Parent: | Object

### Methods

document_send endpoint_url endpoint_url= headerhandler inspect new reset_stream rpc_call streamhandler test_loopback_response

### Included Modules

SOAP

### Attributes

allow_unqualified_element | [RW] |
default_encodingstyle | [RW] |
generate_explicit_type | [RW] |
mapping_registry | [RW] |
options | [R] |
port | [R] |
soapaction | [RW] |
wsdl_mapping_registry | [RW] |

### Public Class methods

new(host, wsdl, port, logdev)

[Source]

    # File soap/wsdlDriver.rb, line 268
        def initialize(host, wsdl, port, logdev)
          @host = host
          @wsdl = wsdl
          @port = port
          @logdev = logdev
          @soapaction = nil
          @options = setup_options
          @default_encodingstyle = nil
          @allow_unqualified_element = nil
          @generate_explicit_type = false
          @mapping_registry = nil           # for rpc unmarshal
          @wsdl_mapping_registry = nil      # for rpc marshal
          @wiredump_file_base = nil
          @mandatorycharset = nil
          @wsdl_elements = @wsdl.collect_elements
          @wsdl_types = @wsdl.collect_complextypes + @wsdl.collect_simpletypes
          @rpc_decode_typemap = @wsdl_types +
            @wsdl.soap_rpc_complextypes(port.find_binding)
          @wsdl_mapping_registry = Mapping::WSDLEncodedRegistry.new(
            @rpc_decode_typemap)
          @doc_mapper = Mapping::WSDLLiteralRegistry.new(
            @wsdl_types, @wsdl_elements)
          endpoint_url = @port.soap_address.location
          # Convert a map which key is QName, to a Hash which key is String.
          @operation = {}
          @port.inputoperation_map.each do |op_name, op_info|
            orgname = op_name.name
            name = XSD::CodeGen::GenSupport.safemethodname(orgname)
            @operation[name] = @operation[orgname] = op_info
            add_method_interface(op_info)
          end
          @proxy = ::SOAP::RPC::Proxy.new(endpoint_url, @soapaction, @options)
        end

### Public Instance methods

document_send(name, header_obj, body_obj)

req_header: [[element, mustunderstand, encodingstyle(QName/String)], …] req_body: SOAPBasetype/SOAPCompoundtype

[Source]

    # File soap/wsdlDriver.rb, line 363
        def document_send(name, header_obj, body_obj)
          set_wiredump_file_base(name)
          unless op_info = @operation[name]
            raise RuntimeError, "method: #{name} not defined"
          end
          req_header = header_obj ? header_from_obj(header_obj, op_info) : nil
          req_body = body_from_obj(body_obj, op_info)
          opt = create_options({
            :soapaction => op_info.soapaction || @soapaction,
            :decode_typemap => @wsdl_types})
          env = @proxy.invoke(req_header, req_body, opt)
          raise EmptyResponseError unless env
          if env.body.fault
            raise ::SOAP::FaultError.new(env.body.fault)
          end
          res_body_obj = env.body.response ?
            Mapping.soap2obj(env.body.response, @mapping_registry) : nil
          return env.header, res_body_obj
        end

endpoint_url()

[Source]

    # File soap/wsdlDriver.rb, line 306
        def endpoint_url
          @proxy.endpoint_url
        end

endpoint_url=(endpoint_url)

[Source]

    # File soap/wsdlDriver.rb, line 310
        def endpoint_url=(endpoint_url)
          @proxy.endpoint_url = endpoint_url
        end

headerhandler()

[Source]

    # File soap/wsdlDriver.rb, line 314
        def headerhandler
          @proxy.headerhandler
        end

inspect()

[Source]

    # File soap/wsdlDriver.rb, line 302
        def inspect
          "#<#{self.class}:#{@proxy.inspect}>"
        end

reset_stream()

[Source]

    # File soap/wsdlDriver.rb, line 326
        def reset_stream
          @proxy.reset_stream
        end

rpc_call(name, *values)

[Source]

    # File soap/wsdlDriver.rb, line 330
        def rpc_call(name, *values)
          set_wiredump_file_base(name)
          unless op_info = @operation[name]
            raise RuntimeError, "method: #{name} not defined"
          end
          req_header = create_request_header
          req_body = create_request_body(op_info, *values)
          reqopt = create_options({
            :soapaction => op_info.soapaction || @soapaction})
          resopt = create_options({
            :decode_typemap => @rpc_decode_typemap})
          env = @proxy.route(req_header, req_body, reqopt, resopt)
          raise EmptyResponseError unless env
          receive_headers(env.header)
          begin
            @proxy.check_fault(env.body)
          rescue ::SOAP::FaultError => e
            Mapping.fault2exception(e)
          end
          ret = env.body.response ?
            Mapping.soap2obj(env.body.response, @mapping_registry) : nil
          if env.body.outparams
            outparams = env.body.outparams.collect { |outparam|
              Mapping.soap2obj(outparam)
            }
            return [ret].concat(outparams)
          else
            return ret
          end
        end

streamhandler()

[Source]

    # File soap/wsdlDriver.rb, line 318
        def streamhandler
          @proxy.streamhandler
        end

test_loopback_response()

[Source]

    # File soap/wsdlDriver.rb, line 322
        def test_loopback_response
          @proxy.test_loopback_response
        end

[Validate]