method

unmarshal

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: SOAP::RPC::Proxy

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

unmarshal(conn_data, opt) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/rpc/proxy.rb, line 218
  def unmarshal(conn_data, opt)
    contenttype = conn_data.receive_contenttype
    if /#{MIMEMessage::MultipartContentType}/i =~ contenttype
      opt[:external_content] = {}
      mime = MIMEMessage.parse("Content-Type: " + contenttype,
        conn_data.receive_string)
      mime.parts.each do |part|
        value = Attachment.new(part.content)
        value.contentid = part.contentid
        obj = SOAPAttachment.new(value)
        opt[:external_content][value.contentid] = obj if value.contentid
      end
      opt[:charset] = @mandatorycharset ||
        StreamHandler.parse_media_type(mime.root.headers['content-type'].str)
      env = Processor.unmarshal(mime.root.content, opt)
    else
      opt[:charset] = @mandatorycharset ||
        ::SOAP::StreamHandler.parse_media_type(contenttype)
      env = Processor.unmarshal(conn_data.receive_string, opt)
    end
    unless env.is_a?(::SOAP::SOAPEnvelope)
      raise ResponseFormatError.new(
        "response is not a SOAP envelope: #{conn_data.receive_string}")
    end
    env
  end
Register or log in to add new notes.