[BioRuby] esoap.rb

Moses Hohman mmhohman at northwestern.edu
Fri Dec 10 02:20:57 EST 2004


I get a different error:

/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in `initialize': 
Can't assign requested address - connect(2) (Errno::EADDRNOTAVAIL)
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 
`new'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 
`create_socket'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1252:in 
`connect'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in 
`timeout'
         from /usr/local/lib/ruby/1.8/timeout.rb:55:in `timeout'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in 
`connect'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1111:in 
`query'
         from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:833:in 
`query'
          ... 26 levels...
         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:71:in `import'
         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:35:in 
`initialize'
         from test_eruby.rb:12:in `new'

The full backtrace is after the rest of my message.

This seems to have something to do with the fact that eutils.wsdl has 
<wsdl:import> tags with locations that don't specify a base URL or 
something (I'm not very familiar with WSDL). soap4r apparently can't 
handle this, or maybe there's an option one has to set that I don't 
know. If you curl the various imported XSD files, the error goes away 
and a new error occurs:

/usr/local/lib/ruby/1.8/wsdl/xmlSchema/element.rb:76:in `parse_attr': 
NotImplementedError (NotImplementedError)
         from /usr/local/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:142:in 
`decode_tag'
         from /usr/local/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:122:in 
`each'
         from /usr/local/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:122:in 
`decode_tag'
         from /usr/local/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:79:in 
`start_element'
         from /usr/local/lib/ruby/1.8/xsd/xmlparser/parser.rb:67:in 
`start_element'
         from /usr/local/lib/ruby/1.8/xsd/xmlparser/xmlscanner.rb:139:in 
`on_stag_end'
         from /usr/local/lib/ruby/1.8/xsd/xmlparser/xmlscanner.rb:134:in 
`on_stag_end_empty'
         from 
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:470:in 
`on_stag_end_empty'
          ... 28 levels...
         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:71:in `import'
         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:35:in 
`initialize'
         from test_eruby.rb:12:in `new'
         from test_eruby.rb:12


I'm running 1.8.2 preview 3 on OS X 10.3.6. I've also installed a ton 
of ruby stuff, so it's possible my setup's errors will be unique : )

Moses

/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in `initialize'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in `new'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 
`create_socket'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1252:in `connect'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in `timeout'
/usr/local/lib/ruby/1.8/timeout.rb:55:in `timeout'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in `connect'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1111:in `query'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:833:in `query'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:383:in `do_get_block'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:327:in `conn_request'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:259:in `request'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:234:in `get'
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:209:in `get_content'
/usr/local/lib/ruby/1.8/wsdl/importer.rb:39:in `import'
/usr/local/lib/ruby/1.8/wsdl/importer.rb:20:in `import'
/usr/local/lib/ruby/1.8/wsdl/import.rb:65:in `import'
/usr/local/lib/ruby/1.8/wsdl/import.rb:49:in `parse_attr'
/usr/local/lib/ruby/1.8/wsdl/parser.rb:143:in `decode_tag'
/usr/local/lib/ruby/1.8/wsdl/parser.rb:126:in `each'
/usr/local/lib/ruby/1.8/wsdl/parser.rb:126:in `decode_tag'
/usr/local/lib/ruby/1.8/wsdl/parser.rb:81:in `start_element'
/usr/local/lib/ruby/1.8/xsd/xmlparser/parser.rb:67:in `start_element'
/usr/local/lib/ruby/1.8/xsd/xmlparser/xmlscanner.rb:139:in `on_stag_end'
/usr/local/lib/ruby/1.8/xsd/xmlparser/xmlscanner.rb:134:in 
`on_stag_end_empty'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:470:in 
`on_stag_end_empty'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:794:in `scan_stag'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:826:in 
`scan_content'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:1051:in 
`scan_prolog'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:1058:in 
`scan_document'
/usr/local/lib/ruby/site_ruby/1.8/xmlscan/scanner.rb:1073:in `parse'
/usr/local/lib/ruby/1.8/xsd/xmlparser/xmlscanner.rb:25:in `do_parse'
/usr/local/lib/ruby/1.8/wsdl/parser.rb:62:in `parse'
/usr/local/lib/ruby/1.8/wsdl/importer.rb:43:in `import'
/usr/local/lib/ruby/1.8/wsdl/importer.rb:20:in `import'
/usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:71:in `import'
/usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:35:in `initialize'
test_eruby.rb:12:in `new'


On Dec 9, 2004, at 10:53 PM, Toshiaki Katayama wrote:

> Hi,
>
> I have not completed esoap.rb yet. :)
>
> It seems that wsdl:import fails when loading eutils.wsdl
> in Ruby 1.8.1 (comes with SOAP4R).  Any ideas?
>
> Regards,
> Toshiaki Katayama
>
> esoap_test.rb:
> -------------------------
> #!/usr/bin/env ruby
>
> require 'soap/wsdlDriver'
>
> wsdl = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl"
>
> driver = SOAP::WSDLDriverFactory.new(wsdl).create_driver
> -------------------------
>
> % ruby esoap.rb
> /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:121:in 
> `create_connection': Cannot connect to egquery.xsd (Not HTTP.) 
> (RuntimeError)
>         from /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:91:in 
> `start'
>         from /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:82:in 
> `get_content'
>         from /usr/local/lib/ruby/1.8/wsdl/importer.rb:39:in `import'
>         from /usr/local/lib/ruby/1.8/wsdl/importer.rb:20:in `import'
>         from /usr/local/lib/ruby/1.8/wsdl/import.rb:65:in `import'
>         from /usr/local/lib/ruby/1.8/wsdl/import.rb:49:in `parse_attr'
>         from /usr/local/lib/ruby/1.8/wsdl/parser.rb:141:in `decode_tag'
>         from /usr/local/lib/ruby/1.8/wsdl/parser.rb:124:in `each'
>          ... 9 levels...
>         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:69:in `import'
>         from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:33:in 
> `initialize'
>         from esoap_test.rb:5:in `new'
>         from esoap_test.rb:5
>
>
>
> On 2004/12/10, at 7:51, Moses Hohman wrote:
>
>> It would be great if you could help out. esoap.rb is not in CVS, so 
>> Toshiaki will have to email it : )
>>
>> Moses
>>
>> On Dec 9, 2004, at 4:35 PM, david wheeler wrote:
>>
>>> Hi:
>>>
>>> Is it still true that esoap.rb is not working? Is the current version
>>> available?  If so, I'd be happy to help if I could get a copy.
>>>
>>> David Wheeler, NCBI
>>>
>>>
>>> _______________________________________________
>>> BioRuby mailing list
>>> BioRuby at open-bio.org
>>> http://portal.open-bio.org/mailman/listinfo/bioruby
>>>
>>
>> _______________________________________________
>> BioRuby mailing list
>> BioRuby at open-bio.org
>> http://portal.open-bio.org/mailman/listinfo/bioruby
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioruby
>



More information about the BioRuby mailing list