### Home Classes Methods

### In Files

- lib/soap/rpc/proxy.rb

### Parent

Object

### Namespace

- CLASS SOAP::RPC::Proxy::Operation

### Methods

- ::new
- #add_document_method
- #add_document_operation
- #add_method
- #add_rpc_method
- #add_rpc_operation
- #call
- #check_fault
- #endpoint_url
- #endpoint_url=
- #inspect
- #invoke
- #reset_stream
- #route
- #set_wiredump_file_base
- #test_loopback_response

### Included Modules

- SOAP

### Files

- tags

### Class/Module Index

Quicksearch

- SOAP
- SOAP::ArrayIndexOutOfBoundsError
- SOAP::ArrayStoreError
- SOAP::Attachment
- SOAP::CGIStub
- SOAP::Charset
- SOAP::Driver
- SOAP::EmptyResponseError
- SOAP::EncodingStyle
- SOAP::EncodingStyle::ASPDotNetHandler
- SOAP::EncodingStyle::ASPDotNetHandler::SOAPTemporalObject
- SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown
- SOAP::EncodingStyle::Handler
- SOAP::EncodingStyle::Handler::EncodingStyleError
- SOAP::EncodingStyle::LiteralHandler
- SOAP::EncodingStyle::SOAPHandler
- SOAP::EncodingStyle::SOAPHandler::SOAPTemporalObject
- SOAP::EncodingStyle::SOAPHandler::SOAPUnknown
- SOAP::Env
- SOAP::Error
- SOAP::FaultCode
- SOAP::FaultError
- SOAP::Filter
- SOAP::Filter::FilterChain
- SOAP::Filter::Handler
- SOAP::Filter::StreamHandler
- SOAP::Generator
- SOAP::Generator::FormatEncodeError
- SOAP::HTTPConfigLoader
- SOAP::HTTPStreamError
- SOAP::HTTPStreamHandler
- SOAP::HTTPStreamHandler::HttpPostRequestFilter
- SOAP::Header
- SOAP::Header::Handler
- SOAP::Header::HandlerSet
- SOAP::Header::MappingHandler
- SOAP::Header::SimpleHandler
- SOAP::MIMEMessage
- SOAP::MIMEMessage::Header
- SOAP::MIMEMessage::Headers
- SOAP::MIMEMessage::MIMEMessageError
- SOAP::MIMEMessage::Part
- SOAP::MPostUnavailableError
- SOAP::Mapping
- SOAP::Mapping::ArrayFactory_
- SOAP::Mapping::AttachmentFactory
- SOAP::Mapping::Base64Factory_
- SOAP::Mapping::BasetypeFactory_
- SOAP::Mapping::DateTimeFactory_
- SOAP::Mapping::EncodedRegistry
- SOAP::Mapping::EncodedRegistry::Map
- SOAP::Mapping::Factory
- SOAP::Mapping::FixnumFactory_
- SOAP::Mapping::HashFactory_
- SOAP::Mapping::LiteralRegistry
- SOAP::Mapping::MappedException
- SOAP::Mapping::MappingError
- SOAP::Mapping::Object
- SOAP::Mapping::Registry
- SOAP::Mapping::RegistrySupport
- SOAP::Mapping::RubytypeFactory
- SOAP::Mapping::SOAPException
- SOAP::Mapping::SchemaChoiceDefinition
- SOAP::Mapping::SchemaComplexTypeDefinition
- SOAP::Mapping::SchemaDefinition
- SOAP::Mapping::SchemaElementDefinition
- SOAP::Mapping::SchemaEmptyDefinition
- SOAP::Mapping::SchemaSequenceDefinition
- SOAP::Mapping::StringFactory_
- SOAP::Mapping::TraverseSupport
- SOAP::Mapping::TypedArrayFactory_
- SOAP::Mapping::TypedStructFactory_
- SOAP::Mapping::URIFactory_
- SOAP::Mapping::WSDLEncodedRegistry
- SOAP::Mapping::WSDLLiteralRegistry
- SOAP::Marshal
- SOAP::Marshal
- SOAP::Marshallable
- SOAP::NS
- SOAP::NestedException
- SOAP::NetHttpClient
- SOAP::NetHttpClient::Response
- SOAP::NetHttpClient::SessionManager
- SOAP::Parser
- SOAP::Parser::FormatDecodeError
- SOAP::Parser::ParseError
- SOAP::Parser::ParseFrame
- SOAP::Parser::ParseFrame::NodeContainer
- SOAP::Parser::UnexpectedElementError
- SOAP::PostUnavailableError
- SOAP::Processor
- SOAP::Property
- SOAP::Property::Util
- SOAP::RPC
- SOAP::RPC::CGIStub
- SOAP::RPC::CGIStub::SOAPFCGIRequest
- SOAP::RPC::CGIStub::SOAPRequest
- SOAP::RPC::CGIStub::SOAPStdinRequest
- SOAP::RPC::Driver
- SOAP::RPC::HTTPServer
- SOAP::RPC::MappingRegistry
- SOAP::RPC::MethodDefinitionError
- SOAP::RPC::ParameterError
- SOAP::RPC::Proxy
- SOAP::RPC::Proxy::Operation
- SOAP::RPC::RPCError
- SOAP::RPC::Router
- SOAP::RPC::Router::ApplicationScopeOperation
- SOAP::RPC::Router::Operation
- SOAP::RPC::Router::RequestScopeOperation
- SOAP::RPC::SOAPMethod
- SOAP::RPC::SOAPMethodRequest
- SOAP::RPC::SOAPMethodResponse
- SOAP::RPC::SOAPVoid
- SOAP::RPC::SOAPlet
- SOAP::RPC::StandaloneServer
- SOAP::RPCRoutingError
- SOAP::RPCUtils
- SOAP::ResponseFormatError
- SOAP::SOAPAnySimpleType
- SOAP::SOAPAnyURI
- SOAP::SOAPArray
- SOAP::SOAPAttachment
- SOAP::SOAPBase64
- SOAP::SOAPBasetype
- SOAP::SOAPBody
- SOAP::SOAPBoolean
- SOAP::SOAPByte
- SOAP::SOAPCompoundtype
- SOAP::SOAPDate
- SOAP::SOAPDateTime
- SOAP::SOAPDecimal
- SOAP::SOAPDouble
- SOAP::SOAPDuration
- SOAP::SOAPENTITIES
- SOAP::SOAPENTITY
- SOAP::SOAPElement
- SOAP::SOAPEnvelope
- SOAP::SOAPEnvelopeElement
- SOAP::SOAPExternalReference
- SOAP::SOAPFault
- SOAP::SOAPFloat
- SOAP::SOAPGDay
- SOAP::SOAPGMonth
- SOAP::SOAPGMonthDay
- SOAP::SOAPGYear
- SOAP::SOAPGYearMonth
- SOAP::SOAPHeader
- SOAP::SOAPHeaderItem
- SOAP::SOAPHexBinary
- SOAP::SOAPID
- SOAP::SOAPIDREF
- SOAP::SOAPIDREFS
- SOAP::SOAPInt
- SOAP::SOAPInteger
- SOAP::SOAPLanguage
- SOAP::SOAPLong
- SOAP::SOAPModuleUtils
- SOAP::SOAPNCName
- SOAP::SOAPNMTOKEN
- SOAP::SOAPNMTOKENS
- SOAP::SOAPName
- SOAP::SOAPNameAccessible
- SOAP::SOAPNegativeInteger
- SOAP::SOAPNil
- SOAP::SOAPNonNegativeInteger
- SOAP::SOAPNonPositiveInteger
- SOAP::SOAPNormalizedString
- SOAP::SOAPPositiveInteger
- SOAP::SOAPQName
- SOAP::SOAPREXMLElementWrap
- SOAP::SOAPRawData
- SOAP::SOAPRawString
- SOAP::SOAPReference
- SOAP::SOAPShort
- SOAP::SOAPString
- SOAP::SOAPStruct
- SOAP::SOAPTime
- SOAP::SOAPToken
- SOAP::SOAPType
- SOAP::SOAPUnsignedByte
- SOAP::SOAPUnsignedInt
- SOAP::SOAPUnsignedLong
- SOAP::SOAPUnsignedShort
- SOAP::StandaloneServer
- SOAP::StreamError
- SOAP::StreamHandler
- SOAP::StreamHandler::ConnectionData
- SOAP::UnhandledMustUnderstandHeaderError
- SOAP::WSDLDriver
- SOAP::WSDLDriver::Servant__
- SOAP::WSDLDriverFactory
- SOAP::WSDLDriverFactory::FactoryError
- WSDL
- WSDL::Binding
- WSDL::Definitions
- WSDL::Documentation
- WSDL::Error
- WSDL::Import
- WSDL::Importer
- WSDL::Info
- WSDL::Message
- WSDL::Operation
- WSDL::Operation::NameInfo
- WSDL::OperationBinding
- WSDL::Param
- WSDL::Parser
- WSDL::Parser::AttributeConstraintError
- WSDL::Parser::ElementConstraintError
- WSDL::Parser::FormatDecodeError
- WSDL::Parser::ParseError
- WSDL::Parser::ParseFrame
- WSDL::Parser::UnexpectedElementError
- WSDL::Parser::UnknownAttributeError
- WSDL::Parser::UnknownElementError
- WSDL::Part
- WSDL::Port
- WSDL::PortType
- WSDL::SOAP
- WSDL::SOAP::Address
- WSDL::SOAP::Binding
- WSDL::SOAP::Body
- WSDL::SOAP::CGIStubCreator
- WSDL::SOAP::ClassDefCreator
- WSDL::SOAP::ClassDefCreatorSupport
- WSDL::SOAP::ClassNameCreator
- WSDL::SOAP::ClientSkeltonCreator
- WSDL::SOAP::DriverCreator
- WSDL::SOAP::EncodedMappingRegistryCreator
- WSDL::SOAP::Fault
- WSDL::SOAP::Header
- WSDL::SOAP::HeaderFault
- WSDL::SOAP::LiteralMappingRegistryCreator
- WSDL::SOAP::MappingRegistryCreator
- WSDL::SOAP::MappingRegistryCreatorSupport
- WSDL::SOAP::MethodDefCreator
- WSDL::SOAP::Operation
- WSDL::SOAP::Operation::OperationInfo
- WSDL::SOAP::ServantSkeltonCreator
- WSDL::SOAP::ServletStubCreator
- WSDL::SOAP::StandaloneServerStubCreator
- WSDL::SOAP::WSDL2Ruby
- WSDL::Service
- WSDL::Types
- WSDL::XMLSchema
- WSDL::XMLSchema::All
- WSDL::XMLSchema::Annotation
- WSDL::XMLSchema::Any
- WSDL::XMLSchema::AnyAttribute
- WSDL::XMLSchema::Attribute
- WSDL::XMLSchema::AttributeGroup
- WSDL::XMLSchema::Choice
- WSDL::XMLSchema::ComplexContent
- WSDL::XMLSchema::ComplexExtension
- WSDL::XMLSchema::ComplexRestriction
- WSDL::XMLSchema::ComplexType
- WSDL::XMLSchema::Content
- WSDL::XMLSchema::Element
- WSDL::XMLSchema::Enumeration
- WSDL::XMLSchema::FractionDigits
- WSDL::XMLSchema::Group
- WSDL::XMLSchema::Import
- WSDL::XMLSchema::ImportHandler
- WSDL::XMLSchema::Importer
- WSDL::XMLSchema::Include
- WSDL::XMLSchema::Length
- WSDL::XMLSchema::List
- WSDL::XMLSchema::MaxExclusive
- WSDL::XMLSchema::MaxInclusive
- WSDL::XMLSchema::MaxLength
- WSDL::XMLSchema::MinExclusive
- WSDL::XMLSchema::MinInclusive
- WSDL::XMLSchema::MinLength
- WSDL::XMLSchema::Parser
- WSDL::XMLSchema::Parser::AttributeConstraintError
- WSDL::XMLSchema::Parser::ElementConstraintError
- WSDL::XMLSchema::Parser::FormatDecodeError
- WSDL::XMLSchema::Parser::ParseError
- WSDL::XMLSchema::Parser::ParseFrame
- WSDL::XMLSchema::Parser::UnexpectedElementError
- WSDL::XMLSchema::Parser::UnknownAttributeError
- WSDL::XMLSchema::Parser::UnknownElementError
- WSDL::XMLSchema::Pattern
- WSDL::XMLSchema::Schema
- WSDL::XMLSchema::Sequence
- WSDL::XMLSchema::SimpleContent
- WSDL::XMLSchema::SimpleExtension
- WSDL::XMLSchema::SimpleRestriction
- WSDL::XMLSchema::SimpleType
- WSDL::XMLSchema::TotalDigits
- WSDL::XMLSchema::Union
- WSDL::XMLSchema::Unique
- WSDL::XMLSchema::WhiteSpace
- WSDL::XMLSchema::XSD2Ruby
- XSD
- XSD::Charset
- XSD::Charset::CharsetConversionError
- XSD::Charset::CharsetError
- XSD::Charset::UnknownCharsetError
- XSD::Charset::XSDError
- XSD::CodeGen
- XSD::CodeGen::ClassDef
- XSD::CodeGen::CommentDef
- XSD::CodeGen::GenSupport
- XSD::CodeGen::MethodDef
- XSD::CodeGen::ModuleDef
- XSD::Error
- XSD::FloatConstants
- XSD::IconvCharset
- XSD::Mapping
- XSD::Mapping::Mapper
- XSD::NS
- XSD::NS::Assigner
- XSD::NS::FormatError
- XSD::NSDBase
- XSD::NamedElements
- XSD::QName
- XSD::ValueSpaceError
- XSD::XMLParser
- XSD::XMLParser::Parser
- XSD::XMLParser::Parser::ElementConstraintError
- XSD::XMLParser::Parser::FormatDecodeError
- XSD::XMLParser::Parser::ParseError
- XSD::XMLParser::Parser::ParserError
- XSD::XMLParser::Parser::UnexpectedElementError
- XSD::XMLParser::Parser::UnknownAttributeError
- XSD::XMLParser::Parser::UnknownElementError
- XSD::XMLParser::REXMLParser
- XSD::XMLParser::XMLParser
- XSD::XMLParser::XMLParser::Listener
- XSD::XMLParser::XMLScanner
- XSD::XSDAnySimpleType
- XSD::XSDAnyURI
- XSD::XSDBase64Binary
- XSD::XSDBoolean
- XSD::XSDByte
- XSD::XSDDate
- XSD::XSDDateTime
- XSD::XSDDateTimeImpl
- XSD::XSDDecimal
- XSD::XSDDouble
- XSD::XSDDuration
- XSD::XSDENTITIES
- XSD::XSDENTITY
- XSD::XSDFloat
- XSD::XSDGDay
- XSD::XSDGMonth
- XSD::XSDGMonthDay
- XSD::XSDGYear
- XSD::XSDGYearMonth
- XSD::XSDHexBinary
- XSD::XSDID
- XSD::XSDIDREF
- XSD::XSDIDREFS
- XSD::XSDInt
- XSD::XSDInteger
- XSD::XSDLanguage
- XSD::XSDLong
- XSD::XSDNCName
- XSD::XSDNMTOKEN
- XSD::XSDNMTOKENS
- XSD::XSDName
- XSD::XSDNegativeInteger
- XSD::XSDNil
- XSD::XSDNonNegativeInteger
- XSD::XSDNonPositiveInteger
- XSD::XSDNormalizedString
- XSD::XSDPositiveInteger
- XSD::XSDQName
- XSD::XSDShort
- XSD::XSDString
- XSD::XSDTime
- XSD::XSDToken
- XSD::XSDUnsignedByte
- XSD::XSDUnsignedInt
- XSD::XSDUnsignedLong
- XSD::XSDUnsignedShort
- Object
- Object::SOAPMarshal
- WEBrick
- WEBrick::Log
- Enumerable
- Kernel

No matching classes.

# SOAP::RPC::Proxy

### Attributes

allow_unqualified_element[RW]
default_encodingstyle[RW]
filterchain[R]
generate_explicit_type[RW]
headerhandler[R]
literal_mapping_registry[RW]
mandatorycharset[RW]
mapping_registry[RW]
operation[R]
return_response_as_xml[RW]
soapaction[RW]
streamhandler[R]
use_default_namespace[RW]

### Public Class Methods

new(endpoint_url, soapaction, options) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 46
    def initialize(endpoint_url, soapaction, options)
      @endpoint_url = endpoint_url
      @soapaction = soapaction
      @options = options
      @protocol_option = options["protocol"] ||= ::SOAP::Property.new
      initialize_streamhandler(@protocol_option)
      @operation = {}
      @operation_by_qname = {}
      @operation_by_soapaction = {}
      @mandatorycharset = nil
      # TODO: set to false by default or drop thie option in 1.6.0
      @allow_unqualified_element = true
      @default_encodingstyle = nil
      @generate_explicit_type = true
      @use_default_namespace = false
      @return_response_as_xml = false
      @headerhandler = Header::HandlerSet.new
      @filterchain = Filter::FilterChain.new
      @mapping_registry = nil
      @literal_mapping_registry = ::SOAP::Mapping::LiteralRegistry.new
    end

### Public Instance Methods

add_document_method(soapaction, name, param_def, opt = {}) click to toggle source
Alias for: add_document_operation
add_document_operation(soapaction, name, param_def, opt = {}) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 100
    def add_document_operation(soapaction, name, param_def, opt = {})
      ensure_styleuse_option(opt, :document, :literal)
      op = Operation.new(soapaction, param_def, opt)
      assign_operation(name, nil, soapaction, op)
    end

Also aliased as: add_document_method
add_method(qname, soapaction, name, param_def, opt = {}) click to toggle source

add_method is for shortcut of typical rpc/encoded method definition.

Alias for: add_rpc_operation
add_rpc_method(qname, soapaction, name, param_def, opt = {}) click to toggle source
Alias for: add_rpc_operation
add_rpc_operation(qname, soapaction, name, param_def, opt = {}) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 93
    def add_rpc_operation(qname, soapaction, name, param_def, opt = {})
      ensure_styleuse_option(opt, :rpc, :encoded)
      opt[:request_qname] = qname
      op = Operation.new(soapaction, param_def, opt)
      assign_operation(name, qname, soapaction, op)
    end

Also aliased as: add_method, add_rpc_method
call(name, *params) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 121
    def call(name, *params)
      # name must be used only for lookup
      op_info = lookup_operation(name)
      mapping_opt = create_mapping_opt
      req_header = create_request_header
      req_body = SOAPBody.new(
        op_info.request_body(params, @mapping_registry,
          @literal_mapping_registry, mapping_opt)
      )
      reqopt = create_encoding_opt(
        :soapaction => op_info.soapaction || @soapaction,
        :envelopenamespace => @options["soap.envelope.requestnamespace"],
        :default_encodingstyle =>
          @default_encodingstyle || op_info.request_default_encodingstyle,
        :use_default_namespace =>
          op_info.use_default_namespace || @use_default_namespace
      )
      resopt = create_encoding_opt(
        :envelopenamespace => @options["soap.envelope.responsenamespace"],
        :default_encodingstyle =>
          @default_encodingstyle || op_info.response_default_encodingstyle
      )
      env = route(req_header, req_body, reqopt, resopt)
      if op_info.response_use.nil?
        return nil
      end
      raise EmptyResponseError unless env
      receive_headers(env.header)
      begin
        check_fault(env.body)
      rescue ::SOAP::FaultError => e
        op_info.raise_fault(e, @mapping_registry, @literal_mapping_registry)
      end
      if @return_response_as_xml
        resopt[:response_as_xml]
      else
        op_info.response_obj(env.body, @mapping_registry,
          @literal_mapping_registry, mapping_opt)
      end
    end

check_fault(body) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 187
    def check_fault(body)
      if body.fault
        raise SOAP::FaultError.new(body.fault)
      end
    end

endpoint_url() click to toggle source

    # File lib/soap/rpc/proxy.rb, line 72
    def endpoint_url
      @endpoint_url
    end

endpoint_url=(endpoint_url) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 76
    def endpoint_url=(endpoint_url)
      @endpoint_url = endpoint_url
      reset_stream
    end

inspect() click to toggle source

    # File lib/soap/rpc/proxy.rb, line 68
    def inspect
      "#<#{self.class}:#{@endpoint_url}>"
    end

invoke(req_header, req_body, opt = nil) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 111
    def invoke(req_header, req_body, opt = nil)
      opt ||= create_encoding_opt
      env = route(req_header, req_body, opt, opt)
      if @return_response_as_xml
        opt[:response_as_xml]
      else
        env
      end
    end

reset_stream() click to toggle source

    # File lib/soap/rpc/proxy.rb, line 81
    def reset_stream
      @streamhandler.reset(@endpoint_url)
    end

route(req_header, req_body, reqopt, resopt) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 162
    def route(req_header, req_body, reqopt, resopt)
      req_env = ::SOAP::SOAPEnvelope.new(req_header, req_body)
      unless reqopt[:envelopenamespace].nil?
        set_envelopenamespace(req_env, reqopt[:envelopenamespace])
      end
      reqopt[:external_content] = nil
      conn_data = marshal(req_env, reqopt)
      if ext = reqopt[:external_content]
        mime = MIMEMessage.new
        ext.each do |k, v|
          mime.add_attachment(v.data)
        end
        mime.add_part(conn_data.send_string + "\r\n")
        mime.close
        conn_data.send_string = mime.content_str
        conn_data.send_contenttype = mime.headers['content-type'].str
      end
      conn_data = @streamhandler.send(@endpoint_url, conn_data,
        reqopt[:soapaction])
      if conn_data.receive_string.empty?
        return nil
      end
      unmarshal(conn_data, resopt)
    end

set_wiredump_file_base(wiredump_file_base) click to toggle source

    # File lib/soap/rpc/proxy.rb, line 85
    def set_wiredump_file_base(wiredump_file_base)
      @streamhandler.wiredump_file_base = wiredump_file_base
    end

test_loopback_response() click to toggle source

    # File lib/soap/rpc/proxy.rb, line 89
    def test_loopback_response
      @streamhandler.test_loopback_response
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.