Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1552

Show
Ignore:
Timestamp:
05/18/05 23:36:11 (4 years ago)
Author:
nahi
Message:

use Kernel.warn instead of STDERR.puts. define Kernel.warn for ruby1.6.8.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/soap/rpc/soaplet.rb

    r1520 r1552  
    1515  require 'zlib' 
    1616rescue LoadError 
    17   STDERR.puts "Loading stringio or zlib failed.  No gzipped response supported." if $DEBUG 
     17  warn("Loading stringio or zlib failed.  No gzipped response supported.") if $DEBUG 
    1818end 
    1919 
  • trunk/lib/soap/soap.rb

    r1529 r1552  
    129129  end 
    130130end 
     131 
     132 
     133unless Kernel.respond_to?(:warn) 
     134  module Kernel 
     135    def warn(msg) 
     136      STDERR.puts(msg + "\n") unless $VERBOSE.nil? 
     137    end 
     138  end 
     139end 
  • trunk/lib/soap/streamHandler.rb

    r1520 r1552  
    1313  require 'zlib' 
    1414rescue LoadError 
    15   STDERR.puts "Loading stringio or zlib failed.  No gzipped response support." if $DEBUG 
     15  warn("Loading stringio or zlib failed.  No gzipped response support.") if $DEBUG 
    1616end 
    1717 
     
    2828      HTTPAccess2::Client 
    2929    rescue LoadError 
    30       STDERR.puts "Loading http-access2 failed.  Net/http is used." if $DEBUG 
     30      warn("Loading http-access2 failed.  Net/http is used.") if $DEBUG 
    3131      require 'soap/netHttpClient' 
    3232      SOAP::NetHttpClient 
  • trunk/lib/soap/wsdlDriver.rb

    r1537 r1552  
    4444  # depricated old interface 
    4545  def create_driver(servicename = nil, portname = nil) 
    46     STDERR.puts "WSDLDriverFactory#create_driver is depricated." + 
    47       "  Use create_rpc_driver instead." 
     46    warn("WSDLDriverFactory#create_driver is depricated.  Use create_rpc_driver instead.") 
    4847    port = find_port(servicename, portname) 
    4948    WSDLDriver.new(@wsdl, port, @logdev) 
  • trunk/lib/wsdl/parser.rb

    r1534 r1552  
    128128      unless o 
    129129        unless @ignored.key?(elename) 
    130           STDERR.puts("ignored element: #{elename}") 
     130          warn("ignored element: #{elename}") 
    131131          @ignored[elename] = elename 
    132132        end 
     
    143143      unless o.parse_attr(attr_ele, value_ele) 
    144144        unless @ignored.key?(attr_ele) 
    145           STDERR.puts("ignored attr: #{attr_ele}") 
     145          warn("ignored attr: #{attr_ele}") 
    146146          @ignored[attr_ele] = attr_ele 
    147147        end 
  • trunk/lib/wsdl/soap/cgiStubCreator.rb

    r1520 r1552  
    2727 
    2828  def dump(service_name) 
    29     STDERR.puts "!!! IMPORTANT !!!" 
    30     STDERR.puts "- CGI stub can have only 1 port.  Creating stub for the first port...  Rests are ignored." 
    31     STDERR.puts "!!! IMPORTANT !!!" 
     29    warn("CGI stub can have only 1 port.  Creating stub for the first port...  Rests are ignored.") 
    3230    port = @definitions.service(service_name).ports[0] 
    3331    dump_porttype(port.porttype.name) 
  • trunk/lib/wsdl/soap/standaloneServerStubCreator.rb

    r1520 r1552  
    2727 
    2828  def dump(service_name) 
    29     STDERR.puts "!!! IMPORTANT !!!" 
    30     STDERR.puts "- Standalone stub can have only 1 port for now.  So creating stub for the first port and rests are ignored." 
    31     STDERR.puts "- Standalone server stub ignores port location defined in WSDL.  Location is http://localhost:10080/ by default.  Generated client from WSDL must be configured to point this endpoint manually." 
    32     STDERR.puts "!!! IMPORTANT !!!" 
     29    warn("- Standalone stub can have only 1 port for now.  So creating stub for the first port and rests are ignored.") 
     30    warn("- Standalone server stub ignores port location defined in WSDL.  Location is http://localhost:10080/ by default.  Generated client from WSDL must be configured to point this endpoint manually.") 
    3331    port = @definitions.service(service_name).ports[0] 
    3432    dump_porttype(port.porttype.name) 
  • trunk/lib/wsdl/xmlSchema/importer.rb

    r1534 r1552  
    4444 
    4545  def fetch(location) 
    46     STDERR.puts("importing: #{location}") if $DEBUG 
     46    warn("importing: #{location}") if $DEBUG 
    4747    content = nil 
    4848    if location.scheme == 'file' or 
     
    6969        HTTPAccess2::Client 
    7070      rescue LoadError 
    71         STDERR.puts "Loading http-access2 failed.  Net/http is used." if $DEBUG 
     71        warn("Loading http-access2 failed.  Net/http is used.") if $DEBUG 
    7272        require 'soap/netHttpClient' 
    7373        ::SOAP::NetHttpClient 
  • trunk/lib/wsdl/xmlSchema/parser.rb

    r1534 r1552  
    126126      unless o 
    127127        unless @ignored.key?(elename) 
    128           STDERR.puts("ignored element: #{elename} of #{parent.class}") 
     128          warn("ignored element: #{elename} of #{parent.class}") 
    129129          @ignored[elename] = elename 
    130130        end 
     
    144144        unless o.parse_attr(attr_ele, value_ele) 
    145145          unless @ignored.key?(attr_ele) 
    146             STDERR.puts("ignored attr: #{attr_ele}") 
     146            warn("ignored attr: #{attr_ele}") 
    147147            @ignored[attr_ele] = attr_ele 
    148148          end 
  • trunk/lib/xsd/charset.rb

    r1520 r1552  
    7272 
    7373  def Charset.encoding=(encoding) 
    74     STDERR.puts("xsd charset is set to #{encoding}") if $DEBUG 
     74    warn("xsd charset is set to #{encoding}") if $DEBUG 
    7575    @encoding = encoding 
    7676  end 
  • trunk/lib/xsd/iconvcharset.rb

    r1520 r1552  
    2323      ch, str = e.failed.split(//, 2) 
    2424      out << '?' 
    25       STDERR.puts("Failed to convert #{ch}") 
     25      warn("Failed to convert #{ch}") 
    2626      retry 
    2727    end