Flowdock
method

unmarshal

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::RPC::Router
unmarshal(conn_data) private

No documentation

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

Hide source
# File lib/soap/rpc/router.rb, line 270
  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] =
        StreamHandler.parse_media_type(mime.root.headers['content-type'].str)
      env = Processor.unmarshal(mime.root.content, opt)
    else
      opt[:charset] = ::SOAP::StreamHandler.parse_media_type(contenttype)
      env = Processor.unmarshal(conn_data.receive_string, opt)
    end
    charset = opt[:charset]
    conn_data.send_contenttype = "text/xml; charset=\"#{charset}\""
    env
  end
Register or log in to add new notes.