REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.99 KB
Close
//proc/thread-self/root/opt/alt/ruby18/lib64/ruby/1.8/soap/attachment.rb
Text
Base64
# soap/attachment.rb: SOAP4R - SwA implementation. # Copyright (C) 2002, 2003 Jamie Herre and NAKAMURA, Hiroshi <nahi@ruby-lang.org>. # 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. require 'soap/baseData' require 'soap/mapping' module SOAP class SOAPAttachment < SOAPExternalReference attr_reader :data def initialize(value) super() @data = value end private def external_contentid @data.contentid end end class Attachment attr_reader :io attr_accessor :contenttype def initialize(string_or_readable = nil) @string_or_readable = string_or_readable @contenttype = "application/octet-stream" @contentid = nil end def contentid @contentid ||= Attachment.contentid(self) end def contentid=(contentid) @contentid = contentid end def mime_contentid '<' + contentid + '>' end def content if @content == nil and @string_or_readable != nil @content = @string_or_readable.respond_to?(:read) ? @string_or_readable.read : @string_or_readable end @content end def to_s content end def write(out) out.write(content) end def save(filename) File.open(filename, "wb") do |f| write(f) end end def self.contentid(obj) # this needs to be fixed [obj.__id__.to_s, Process.pid.to_s].join('.') end def self.mime_contentid(obj) '<' + contentid(obj) + '>' end end module Mapping class AttachmentFactory < SOAP::Mapping::Factory def obj2soap(soap_class, obj, info, map) soap_obj = soap_class.new(obj) mark_marshalled_obj(obj, soap_obj) soap_obj end def soap2obj(obj_class, node, info, map) obj = node.data mark_unmarshalled_obj(node, obj) return true, obj end end DefaultRegistry.add(::SOAP::Attachment, ::SOAP::SOAPAttachment, AttachmentFactory.new, nil) end end
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 4 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
encodingstyle
DIR
-
drwxr-xr-x
2024-03-03 22:48:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
header
DIR
-
drwxr-xr-x
2024-03-03 22:48:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mapping
DIR
-
drwxr-xr-x
2024-03-03 22:48:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rpc
DIR
-
drwxr-xr-x
2024-03-03 22:48:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
attachment.rb
1.99 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
baseData.rb
16.73 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
element.rb
5.40 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
generator.rb
6.66 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
httpconfigloader.rb
3.15 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mapping.rb
381 B
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
marshal.rb
1.50 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mimemessage.rb
4.94 KB
lrw-r--r--
2009-05-26 12:22:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
netHttpClient.rb
4.25 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
parser.rb
6.03 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
processor.rb
1.37 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
property.rb
6.92 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
soap.rb
3.75 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
streamHandler.rb
5.86 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wsdlDriver.rb
15.75 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).