Class Bio::SOAPWSDL
In: lib/bio/io/soapwsdl.rb
Parent: Object

Examples

class API < Bio::SOAPWSDL

  def initialize
    @wsdl = 'http://example.com/example.wsdl'
    @log = File.new("soap_log", 'w')
    create_driver
  end

end

Use HTTP proxy

You need to set following two environmental variables (case might be insensitive) as required by SOAP4R.

— soap_use_proxy

Set the value of this variable to ‘on’.

— http_proxy

Set the URL of your proxy server (myproxy.com:8080 etc.).

Example to use HTTP proxy

% export soap_use_proxy=on % export http_proxy=http://localhost:8080

Methods

list_methods   log=   new   wsdl=  

Attributes

log  [R]  Returns current logging IO.
wsdl  [R]  Returns URL of the current WSDL file.

Public Class methods

[Source]

    # File lib/bio/io/soapwsdl.rb, line 54
54:   def initialize(wsdl = nil)
55:     @wsdl = wsdl
56:     @log = nil
57:     create_driver
58:   end

Public Instance methods

List of methods defined by WSDL

[Source]

     # File lib/bio/io/soapwsdl.rb, line 106
106:   def list_methods
107:     @driver.methods(false)
108:   end

Change the IO for logging. The argument is passed to wiredump_dev method of the SOAP4R, thus

  serv = Bio::SOAPWSDL.new
  serv.log = STDERR

will print all the SOAP transactions in standard error. This feature is especially useful for debug.

[Source]

     # File lib/bio/io/soapwsdl.rb, line 99
 99:   def log=(io)
100:     @log = io
101:     @driver.wiredump_dev = @log
102:   end

Change the URL for WSDL file

  serv = Bio::SOAPWSDL.new("http://soap.genome.jp/KEGG.wsdl")

or

  serv = Bio::SOAPWSDL.new
  serv.wsdl = "http://soap.genome.jp/KEGG.wsdl"

Note that you can‘t read two or more different WSDL files at once. In that case, create Bio::SOAPWSDL object for each.

[Source]

    # File lib/bio/io/soapwsdl.rb, line 84
84:   def wsdl=(url)
85:     @wsdl = url
86:     create_driver
87:   end

[Validate]