SOAP (Module)

In: soap/wsdlDriver.rb
soap/streamHandler.rb
soap/soap.rb
soap/rpc/standaloneServer.rb
soap/rpc/soaplet.rb
soap/rpc/rpc.rb
soap/rpc/router.rb
soap/rpc/proxy.rb
soap/rpc/element.rb
soap/rpc/driver.rb
soap/rpc/cgistub.rb
soap/property.rb
soap/processor.rb
soap/parser.rb
soap/netHttpClient.rb
soap/marshal.rb
soap/mapping/wsdlRegistry.rb
soap/mapping/typeMap.rb
soap/mapping/rubytypeFactory.rb
soap/mapping/registry.rb
soap/mapping/mapping.rb
soap/mapping/factory.rb
soap/generator.rb
soap/encodingstyle/soapHandler.rb
soap/encodingstyle/literalHandler.rb
soap/encodingstyle/handler.rb
soap/encodingstyle/aspDotNetHandler.rb
soap/element.rb
soap/baseData.rb

This program is copyrighted free software by NAKAMURA, Hiroshi. You can redistribute it and/or modify it under the same terms of Ruby’s license; either the dual license version in 2003, or any later version.

Constants

RUBY_VERSION_STRING = "ruby #{ RUBY_VERSION } (#{ RUBY_RELEASE_DATE }) [#{ RUBY_PLATFORM }]"
Version = '1.5.2'
PropertyName = 'soap/property'
EnvelopeNamespace = 'http://schemas.xmlsoap.org/soap/envelope/'
EncodingNamespace = 'http://schemas.xmlsoap.org/soap/encoding/'
LiteralNamespace = 'http://xml.apache.org/xml-soap/literalxml'
NextActor = 'http://schemas.xmlsoap.org/soap/actor/next'
EleEnvelope = 'Envelope'
EleHeader = 'Header'
EleBody = 'Body'
EleFault = 'Fault'
EleFaultString = 'faultstring'
EleFaultActor = 'faultactor'
EleFaultCode = 'faultcode'
EleFaultDetail = 'detail'
AttrMustUnderstand = 'mustUnderstand'
AttrEncodingStyle = 'encodingStyle'
AttrActor = 'actor'
AttrRoot = 'root'
AttrArrayType = 'arrayType'
AttrOffset = 'offset'
AttrPosition = 'position'
ValueArray = 'Array'
EleEnvelopeName = XSD::QName.new(EnvelopeNamespace, EleEnvelope)
EleHeaderName = XSD::QName.new(EnvelopeNamespace, EleHeader)
EleBodyName = XSD::QName.new(EnvelopeNamespace, EleBody)
EleFaultName = XSD::QName.new(EnvelopeNamespace, EleFault)
EleFaultStringName = XSD::QName.new(nil, EleFaultString)
EleFaultActorName = XSD::QName.new(nil, EleFaultActor)
EleFaultCodeName = XSD::QName.new(nil, EleFaultCode)
EleFaultDetailName = XSD::QName.new(nil, EleFaultDetail)
AttrEncodingStyleName = XSD::QName.new(EnvelopeNamespace, AttrEncodingStyle)
AttrRootName = XSD::QName.new(EncodingNamespace, AttrRoot)
AttrArrayTypeName = XSD::QName.new(EncodingNamespace, AttrArrayType)
AttrOffsetName = XSD::QName.new(EncodingNamespace, AttrOffset)
AttrPositionName = XSD::QName.new(EncodingNamespace, AttrPosition)
ValueArrayName = XSD::QName.new(EncodingNamespace, ValueArray)
Base64Literal = 'base64'
SOAPNamespaceTag = 'env'
XSDNamespaceTag = 'xsd'
XSINamespaceTag = 'xsi'
MediaType = 'text/xml'
NO_PROXY_HOSTS = ['localhost']
TypeMap = { XSD::XSDAnySimpleType::Type => SOAPAnySimpleType, XSD::XSDString::Type => SOAPString, XSD::XSDBoolean::Type => SOAPBoolean, XSD::XSDDecimal::Type => SOAPDecimal, XSD::XSDFloat::Type => SOAPFloat, XSD::XSDDouble::Type => SOAPDouble, XSD::XSDDuration::Type => SOAPDuration, XSD::XSDDateTime::Type => SOAPDateTime, XSD::XSDTime::Type => SOAPTime, XSD::XSDDate::Type => SOAPDate, XSD::XSDGYearMonth::Type => SOAPGYearMonth, XSD::XSDGYear::Type => SOAPGYear, XSD::XSDGMonthDay::Type => SOAPGMonthDay, XSD::XSDGDay::Type => SOAPGDay, XSD::XSDGMonth::Type => SOAPGMonth, XSD::XSDHexBinary::Type => SOAPHexBinary, XSD::XSDBase64Binary::Type => SOAPBase64, XSD::XSDAnyURI::Type => SOAPAnyURI, XSD::XSDQName::Type => SOAPQName, XSD::XSDInteger::Type => SOAPInteger, XSD::XSDLong::Type => SOAPLong, XSD::XSDInt::Type => SOAPInt, XSD::XSDShort::Type => SOAPShort, SOAP::SOAPBase64::Type => SOAPBase64, }

Attributes

debug_dev  [RW] 
endpoint_url  [RW] 
no_proxy  [RW] 
protocol_version  [RW] 
proxy  [R] 
ssl_config  [RW] 

Classes and Modules

Module SOAP::EncodingStyle
  ::Class SOAP::EncodingStyle::ASPDotNetHandler
  ::  ::Class SOAP::EncodingStyle::ASPDotNetHandler::SOAPTemporalObject
  ::  ::Class SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown
  ::Class SOAP::EncodingStyle::Handler
  ::  ::Class SOAP::EncodingStyle::Handler::EncodingStyleError
  ::Class SOAP::EncodingStyle::LiteralHandler
  ::  ::Class SOAP::EncodingStyle::LiteralHandler::SOAPTemporalObject
  ::  ::Class SOAP::EncodingStyle::LiteralHandler::SOAPUnknown
  ::Class SOAP::EncodingStyle::SOAPHandler
  ::  ::Class SOAP::EncodingStyle::SOAPHandler::SOAPTemporalObject
  ::  ::Class SOAP::EncodingStyle::SOAPHandler::SOAPUnknown
Module SOAP::Env
Module SOAP::Mapping
  ::Module SOAP::Mapping::MappedException
  ::Module SOAP::Mapping::TraverseSupport
  ::Class SOAP::Mapping::ArrayFactory_
  ::Class SOAP::Mapping::Base64Factory_
  ::Class SOAP::Mapping::BasetypeFactory_
  ::Class SOAP::Mapping::DateTimeFactory_
  ::Class SOAP::Mapping::Factory
  ::Class SOAP::Mapping::HashFactory_
  ::Class SOAP::Mapping::MappingError
  ::Class SOAP::Mapping::Object
  ::Class SOAP::Mapping::Registry
  ::  ::Class SOAP::Mapping::Registry::Map
  ::Class SOAP::Mapping::RubytypeFactory
  ::Class SOAP::Mapping::SOAPException
  ::Class SOAP::Mapping::StringFactory_
  ::Class SOAP::Mapping::TypedArrayFactory_
  ::Class SOAP::Mapping::TypedStructFactory_
  ::Class SOAP::Mapping::URIFactory_
  ::Class SOAP::Mapping::WSDLRegistry
Module SOAP::Marshal
Module SOAP::Marshallable
Module SOAP::Processor
Module SOAP::RPC
  ::Class SOAP::RPC::CGIStub
  ::  ::Class SOAP::RPC::CGIStub::CGIError
  ::  ::Class SOAP::RPC::CGIStub::SOAPRequest
  ::Class SOAP::RPC::Driver
  ::  ::Class SOAP::RPC::Driver::EmptyResponseError
  ::  ::Class SOAP::RPC::Driver::Servant__
  ::Class SOAP::RPC::MethodDefinitionError
  ::Class SOAP::RPC::ParameterError
  ::Class SOAP::RPC::Proxy
  ::  ::Class SOAP::RPC::Proxy::Request
  ::Class SOAP::RPC::RPCError
  ::Class SOAP::RPC::Router
  ::Class SOAP::RPC::SOAPMethod
  ::Class SOAP::RPC::SOAPMethodRequest
  ::Class SOAP::RPC::SOAPMethodResponse
  ::Class SOAP::RPC::SOAPVoid
  ::Class SOAP::RPC::SOAPlet
  ::  ::Class SOAP::RPC::SOAPlet::RequestRouter
  ::Class SOAP::RPC::StandaloneServer
Module SOAP::SOAPBasetype
Module SOAP::SOAPCompoundtype
Module SOAP::SOAPEnvelopeElement
Module SOAP::SOAPModuleUtils
Module SOAP::SOAPType
Class SOAP::ArrayIndexOutOfBoundsError
Class SOAP::ArrayStoreError
Class SOAP::ConnectionData
Class SOAP::Error
Class SOAP::FaultError
Class SOAP::HTTPStreamError
Class SOAP::MPostUnavailableError
Class SOAP::NetHttpClient
Class SOAP::Parser
  ::Class SOAP::Parser::FormatDecodeError
  ::Class SOAP::Parser::ParseError
  ::Class SOAP::Parser::ParseFrame
  ::  ::Class SOAP::Parser::ParseFrame::NodeContainer
  ::Class SOAP::Parser::UnexpectedElementError
Class SOAP::PostUnavailableError
Class SOAP::Property
Class SOAP::RPCRoutingError
Class SOAP::Response
Class SOAP::SOAPAnySimpleType
Class SOAP::SOAPAnyURI
Class SOAP::SOAPArray
Class SOAP::SOAPBase64
Class SOAP::SOAPBody
Class SOAP::SOAPBoolean
Class SOAP::SOAPDate
Class SOAP::SOAPDateTime
Class SOAP::SOAPDecimal
Class SOAP::SOAPDouble
Class SOAP::SOAPDuration
Class SOAP::SOAPElement
Class SOAP::SOAPEnvelope
Class SOAP::SOAPFault
Class SOAP::SOAPFloat
Class SOAP::SOAPGDay
Class SOAP::SOAPGMonth
Class SOAP::SOAPGMonthDay
Class SOAP::SOAPGYear
Class SOAP::SOAPGYearMonth
Class SOAP::SOAPGenerator
  ::Class SOAP::SOAPGenerator::FormatEncodeError
Class SOAP::SOAPHeader
Class SOAP::SOAPHeaderItem
Class SOAP::SOAPHexBinary
Class SOAP::SOAPInt
Class SOAP::SOAPInteger
Class SOAP::SOAPLong
Class SOAP::SOAPNil
Class SOAP::SOAPQName
Class SOAP::SOAPRawString
Class SOAP::SOAPReference
Class SOAP::SOAPShort
Class SOAP::SOAPString
Class SOAP::SOAPStruct
Class SOAP::SOAPTime
Class SOAP::SessionManager
Class SOAP::StreamError
Class SOAP::StreamHandler
Class SOAP::WSDLDriver
  ::Class SOAP::WSDLDriver::Servant__
  ::  ::Class SOAP::WSDLDriver::Servant__::Mapper
Class SOAP::WSDLDriverFactory
  ::Class SOAP::WSDLDriverFactory::FactoryError

Public Class methods

[Source]

# File soap/streamHandler.rb, line 69
  def self.create_media_type(charset)
    "#{ MediaType }; charset=#{ charset }"
  end

[Source]

# File soap/netHttpClient.rb, line 30
  def initialize(proxy = nil, agent = nil)
    @proxy = proxy ? URI.parse(proxy) : nil
    @agent = agent
    @debug_dev = nil
    @session_manager = SessionManager.new
    @no_proxy = nil
  end

[Source]

# File soap/streamHandler.rb, line 56
  def initialize(endpoint_url)
    @endpoint_url = endpoint_url
  end

[Source]

# File soap/streamHandler.rb, line 60
  def self.parse_media_type(str)
    if /^#{ MediaType }(?:\s*;\s*charset=([^"]+|"[^"]+"))?$/i !~ str
      raise StreamError.new("Illegal media type.");
    end
    charset = $1
    charset.gsub!(/"/, '') if charset
    charset || 'us-ascii'
  end

Public Instance methods

[Source]

# File soap/netHttpClient.rb, line 78
  def get_content(url, header = {})
    url = URI.parse(url)
    extra = header.dup
    extra['User-Agent'] = @agent if @agent
    res = start(url) { |http|
        http.get(url.request_uri, extra)
      }
    res.body
  end

[Source]

# File soap/netHttpClient.rb, line 68
  def post(url, req_body, header = {})
    url = URI.parse(url)
    extra = header.dup
    extra['User-Agent'] = @agent if @agent
    res = start(url) { |http|
        http.post(url.request_uri, req_body, extra)
      }
    Response.new(res)
  end

[Source]

# File soap/netHttpClient.rb, line 38
  def proxy=(proxy_str)
    if proxy_str.nil?
      @proxy = nil
    else
      @proxy = URI.parse(proxy_str)
      if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or
          @proxy.host == nil or @proxy.port == nil
        raise ArgumentError.new("unsupported proxy `#{proxy_str}'")
      end
      @proxy
    end
  end

[Source]

# File soap/netHttpClient.rb, line 60
  def reset(url)
    # no persistent connection.  ignored.

  end

[Source]

# File soap/netHttpClient.rb, line 64
  def reset_all
    # no persistent connection.  ignored.

  end

[Source]

# File soap/netHttpClient.rb, line 51
  def set_basic_auth(uri, user_id, passwd)
    # net/http does not handle url.

    @basic_auth = [user_id, passwd]
  end

[Source]

# File soap/netHttpClient.rb, line 56
  def set_cookie_store(filename)
    # ignored.

  end

[Validate]