# File soap/mapping/mapping.rb, line 101
  def self._obj2soap(obj, registry, type = nil)
    if referent = Thread.current[:SOAPMarshalDataKey][obj.__id__]
      SOAPReference.new(referent)
    else
      registry.obj2soap(obj.class, obj, type)
    end
  end