Revisiting NBN web services

32 views
Skip to first unread message

Charles Roper

unread,
Jun 14, 2007, 8:42:49 AM6/14/07
to soap4r
Hi,

Some time ago I posted regarding the NBN web services found here:
http://www.searchnbn.net/library/webservices/wsIndex.jsp

Here is my original post to put things in context:
http://snipr.com/1nbjx

Anyway, despite NaHi looking into it, I failed to get things working
satisfactorily in the end. There have been a few updates since then,
so I thought I'd give the wsdl2ruby another try, despite the fact that
the trac still says ID is not supported. It didn't go so well
unfortunately. I have posted the results at the end of this post.
Thing is, I don't know if this is an error with the WSDL or SOAP4R.
Any ideas?

$ wsdl2ruby.rb --wsdl http://212.219.37.104/NBNWebServices/ws/WSDL --
type client --force
F, [2007-06-14T13:25:02.804699 #3508] FATAL -- app: Detected an
exception. Stopping ... unknown element: {}STYLE
(WSDL::XMLSchema::Parser::UnknownElementError)
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/xmlSchema/
parser.rb:117:in `decode_tag'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/xmlSchema/
parser.rb:83:in `start_element'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/xsd/xmlparser/
parser.rb:71:in `start_element'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/xsd/xmlparser/
rexmlparser.rb:34:in `tag_start'
/usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:in `parse'
/usr/lib/ruby/1.8/rexml/document.rb:185:in `parse_stream'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/xsd/xmlparser/
rexmlparser.rb:27:in `do_parse'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/xmlSchema/
parser.rb:63:in `parse'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/xmlSchema/
importer.rb:43:in `parse'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/importer.rb:
31:in `parse'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/xmlSchema/
importer.rb:31:in `import'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/importer.rb:
18:in `import'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/soap/
wsdl2ruby.rb:191:in `import'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/lib/wsdl/soap/
wsdl2ruby.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/bin/wsdl2ruby.rb:
44:in `run'
/usr/lib/ruby/1.8/logger.rb:659:in `start'
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20070607/bin/wsdl2ruby.rb:131
/usr/bin/wsdl2ruby.rb:16:in `load'
/usr/bin/wsdl2ruby.rb:16
I, [2007-06-14T13:25:02.805699 #3508] INFO -- app: End of app.
(status: -1)

Charles Roper

unread,
Jun 14, 2007, 8:53:04 AM6/14/07
to soap4r
Update: I get the same error no matter what WSDL I try and parse.

Charles

Charles Roper

unread,
Jun 14, 2007, 10:43:07 AM6/14/07
to soap4r
On 14 Jun, 13:53, Charles Roper <charles.ro...@gmail.com> wrote:
> Update: I get the same error no matter what WSDL I try and parse.

Okay, it looks like it's because I'm behind a corporate proxy. When
using a local file it parses. This is what I get back:

$ wsdl2ruby.rb --wsdl ./gateway_soap.wsdl --client --force
ignored attr: {}version
ignored element: {http://www.w3.org/2001/XMLSchema}minInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored attr: {}abstract
ignored attr: {}substitutionGroup
ignored attr: {}version
ignored attr: {}version
ignored element: {http://www.w3.org/2001/XMLSchema}minInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored attr: {}abstract
ignored attr: {}substitutionGroup
ignored element: {http://www.w3.org/2001/XMLSchema}minExclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}maxExclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}minInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}maxInclusive of
WSDL::XMLSchema::SimpleRestriction
I, [2007-06-14T15:06:32.226268 #2592] INFO -- app: Creating client
skelton.
I, [2007-06-14T15:06:32.237268 #2592] INFO -- app: Creates file
'GatewayWebServiceClient.rb'.
I, [2007-06-14T15:06:32.280268 #2592] INFO -- app: End of app.
(status: 0)

Now I'm a real newb when it comes to all this (I really know very
little about SOAP), so what does this mean, broadly speaking? If
SOAP4R fails to work with these services, should I use the SOAP stuff
that comes with Ruby instead? I'm feeling a little lost here and any
help would be gratefully received. :-/

Many thanks,

Charles

NAKAMURA, Hiroshi

unread,
Jun 16, 2007, 1:15:54 AM6/16/07
to soa...@googlegroups.com
Hi,

Charles Roper wrote:
> Okay, it looks like it's because I'm behind a corporate proxy. When
> using a local file it parses. This is what I get back:

Just ignore the warnings for now. Soap4r's XML Schema support is still
incomplete (I don't think it can be complete.)

> Now I'm a real newb when it comes to all this (I really know very
> little about SOAP), so what does this mean, broadly speaking? If
> SOAP4R fails to work with these services, should I use the SOAP stuff
> that comes with Ruby instead? I'm feeling a little lost here and any
> help would be gratefully received. :-/

You should get default.rb, defaultMappingRegistry.rb, defaultDriver.rb
and GatewayWebServiceClient.rb in the working directory. I wrote the
following sample client according to
http://www.searchnbn.net/library/webservices/wsGridMap2.jsp (I still
don't know what NBN is :-)


require 'defaultDriver.rb'
endpoint_url = ARGV.shift
obj = GatewaySoapPort.new(endpoint_url)

# run ruby with -d to see SOAP wiredumps.
obj.wiredump_dev = STDERR if $DEBUG

taxonVersionKey = "NHMSYS0000309499"
datasetList = nil
resolution = "_2km"
gridMapSettings = GridMapSettings.new(500, 500, "Grid_10km", "OSMap",
59, "GBIreland")
classification = Classification.new
b1 = Band.new
b2 = Band.new
b3 = Band.new
b1.xmlattr_border = "#FF0000"
b1.xmlattr_fill = "#FF0000"
b1.xmlattr_from = "1900"
b1.xmlattr_to = "1970"
b2.xmlattr_border = "#00FF00"
b2.xmlattr_fill = "#00FF00"
b2.xmlattr_from = "1971"
b2.xmlattr_to = "1995"
b3.xmlattr_border = "#0000FF"
b3.xmlattr_fill = "#0000FF"
b3.xmlattr_from = "1996"
b3.xmlattr_to = "2006"
classification << b1 << b2 << b3
body = GridMapRequest.new(taxonVersionKey, datasetList, resolution,
gridMapSettings, classification)
p obj.getGridMap(body)


And it seems to work. Can you try above?


...before posting this, I found that 'Classification' element is not
propery sent. I found the first bug of soap4r-1.5.6. Sigh.

1. apply the attached patch to soap4r-1.5.6. then Classification with
Bands will be sent.

2. send request by XML like the following as a workaround;

require 'rexml/document'
body = REXML::Document.new(<<__XML__)
<GridMapRequest
xmlns="http://webservices.searchnbn.net/query"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TaxonVersionKey>NHMSYS0000309499</TaxonVersionKey>
<Resolution>_2km</Resolution>
<GridMapSettings>
<Width>500</Width>
<Height>500</Height>
<Grid>Grid_10km</Grid>
<Background>OSMap</Background>
<ViceCounty>59</ViceCounty>
<Region>GBIreland</Region>
</GridMapSettings>
<Classification>
<Band border="#FF0000" fill="#FF0000" from="1900" to="1970" />
<Band border="#00FF00" fill="#00FF00" from="1971" to="1995" />
<Band border="#0000FF" fill="#0000FF" from="1996" to="2006" />
</Classification>
</GridMapRequest>
__XML__
p obj.getGridMap(body)


Regards,
// NaHi

nbn.patch

Charles Roper

unread,
Jun 25, 2007, 8:38:30 AM6/25/07
to soap4r

On Jun 16, 6:15 am, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
> You should get default.rb, defaultMappingRegistry.rb, defaultDriver.rb
> and GatewayWebServiceClient.rb in the working directory. I wrote the

> following sample client according tohttp://www.searchnbn.net/library/webservices/wsGridMap2.jsp(I still


> don't know what NBN is :-)

Hi NaHi, thanks for the help. The problems seem to be related to that
fact that I'm behind an ISA server here. Wsdl2ruby just bombs out when
I try and run it on the remote wsdl. It only creates some of the files
you mention when using a local wsdl. A friend (who isn't behind an ISA
server) generated the files for me correctly, so it looks like the ISA
proxy is a problem.

When running the code I get errors like this:
$ ./GatewayWebServiceClient.rb
cannot find mapped class: SpeciesName
cannot find mapped class: TaxonVersionKey
/usr/lib/ruby/gems/1.8/gems/soap4r-1.5.6/lib/soap/streamHandler.rb:
233:in `send_post': 403: Forbidden ( The ISA Server denies the
specified Uniform Resource Locator (URL). ) (SOAP::HTTPStreamError)
from /usr/lib/ruby/gems/1.8/gems/soap4r-1.5.6/lib/soap/
streamHandler.rb:139:in `send'
from /usr/lib/ruby/gems/1.8/gems/soap4r-1.5.6/lib/soap/rpc/proxy.rb:
178:in `route'
from /usr/lib/ruby/gems/1.8/gems/soap4r-1.5.6/lib/soap/rpc/proxy.rb:
142:in `call'
from /usr/lib/ruby/gems/1.8/gems/soap4r-1.5.6/lib/soap/rpc/driver.rb:
180:in `call'
from (eval):6:in `getTaxonomySearch'
from ./GatewayWebServiceClient.rb:23

I don't know why the ISA server isn't allowing the request through.
Could it be related to authentication? I've installed RubySSPI [http://
www.infoq.com/news/2006/11/rubysspi-gem-released] and this gets gems
and Net::HTTP working, so could it be something to do with this?

NAKAMURA, Hiroshi

unread,
Jun 25, 2007, 9:07:19 AM6/25/07
to soa...@googlegroups.com
Hi,

Charles Roper wrote:
> Hi NaHi, thanks for the help. The problems seem to be related to that
> fact that I'm behind an ISA server here. Wsdl2ruby just bombs out when
> I try and run it on the remote wsdl. It only creates some of the files
> you mention when using a local wsdl. A friend (who isn't behind an ISA
> server) generated the files for me correctly, so it looks like the ISA
> proxy is a problem.

Would you please try the latest http-access2 gem?
% gem install http-access --source http://dev.ctor.org/download/

I recently implemented NegotiateAuth support of http-access2 using
RubySSPI. The latest gem (http-access-2.0.7.20070623.gem) should work
with RubySSPI to communicate with ISA but I've not yet been able to test
it because I don't have ISA. Please let me know how it goes under ISA.

By the way, the latest http-access also support DigestAuth with MD5,
too. The next version of soap4r (1.5.7 will be released in a month)
should allow to access a server which requires DigestAuth.

> I don't know why the ISA server isn't allowing the request through.
> Could it be related to authentication? I've installed RubySSPI [http://
> www.infoq.com/news/2006/11/rubysspi-gem-released] and this gets gems
> and Net::HTTP working, so could it be something to do with this?

When you installed http-access, there's no easy way to use net/http
instead of http-access from soap4r. Please tell me if the latest
http-access does not run.

// NaHi

Charles Roper

unread,
Jun 25, 2007, 10:54:38 AM6/25/07
to soap4r
On Jun 25, 2:07 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
> Would you please try the latest http-access2 gem?
> % gem install http-access --sourcehttp://dev.ctor.org/download/

Okay, I've installed the latest http-access and I still get the same
error. Does http-access get used automatically or do I need to
manually require it?

I downloaded the source for http-access and ran the test and got 1
failure and 6 errors:


$ ruby test_http-access2.rb
Loaded suite test_http-access2
Started
.F......................EEEEEE
Finished in 8.574 seconds.

1) Failure:
test_basic_auth(HTTPAccess2::TestClient) [test_http-access2.rb:229]:
<"Authorization: Basic Zm9vOmJhcg=="> expected but was
<"Date: Mon, 25 Jun 2007 14:53:52 GMT">.

2) Error:
test_send_timeout(HTTPAccess2::TestClient):
Errno::EADDRINUSE: Address already in use - bind(2)
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
/usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
/usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
test_http-access2.rb:427:in `new'
test_http-access2.rb:427:in `setup_server'
test_http-access2.rb:28:in `setup'

3) Error:
test_send_timeout(HTTPAccess2::TestClient):
NoMethodError: undefined method `reset_all' for nil:NilClass
test_http-access2.rb:472:in `teardown_client'
test_http-access2.rb:33:in `teardown'

4) Error:
test_timeout(HTTPAccess2::TestClient):
Errno::EADDRINUSE: Address already in use - bind(2)
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
/usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
/usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
test_http-access2.rb:427:in `new'
test_http-access2.rb:427:in `setup_server'
test_http-access2.rb:28:in `setup'

5) Error:
test_timeout(HTTPAccess2::TestClient):
NoMethodError: undefined method `reset_all' for nil:NilClass
test_http-access2.rb:472:in `teardown_client'
test_http-access2.rb:33:in `teardown'

6) Error:
test_trace(HTTPAccess2::TestClient):
Errno::EADDRINUSE: Address already in use - bind(2)
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
/usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
/usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
/usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
test_http-access2.rb:427:in `new'
test_http-access2.rb:427:in `setup_server'
test_http-access2.rb:28:in `setup'

7) Error:
test_trace(HTTPAccess2::TestClient):
NoMethodError: undefined method `reset_all' for nil:NilClass
test_http-access2.rb:472:in `teardown_client'
test_http-access2.rb:33:in `teardown'

27 tests, 105 assertions, 1 failures, 6 errors

NAKAMURA, Hiroshi

unread,
Jun 25, 2007, 11:22:32 AM6/25/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
> On Jun 25, 2:07 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
>> Would you please try the latest http-access2 gem?
>> % gem install http-access --sourcehttp://dev.ctor.org/download/
>
> Okay, I've installed the latest http-access and I still get the same
> error. Does http-access get used automatically or do I need to
> manually require it?

Thanks! After installed the latest http-access2, no need to change
anything.

> I downloaded the source for http-access and ran the test and got 1
> failure and 6 errors:

> 1) Failure:


> test_basic_auth(HTTPAccess2::TestClient) [test_http-access2.rb:229]:
> <"Authorization: Basic Zm9vOmJhcg=="> expected but was
> <"Date: Mon, 25 Jun 2007 14:53:52 GMT">.

Hmm. The latest test_http-access2.rb line #229 should not raise the
above message.

229: assert_equal('hello', @client.post_content(@url + 'redirect2'))

Okay, I created the latest snapshot tarball. Would you please try it again?

1. download the latest snapshot:
http://dev.ctor.org/download/http-access-2.0.7.20070625.tar.gz
http://dev.ctor.org/download/http-access-2.0.7.20070625.zip

2. extract it.

3. cd http-access-2.0.7.20070625/test

4. run ruby -I../lib test_http-access2.rb

5. install: cd ..; ruby install.rb

6. run the soap4r client.

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRn/dtx9L2jg5EEGlAQKiFggAn2HeqbUckzwXqmnoV7uzVA+TOhLRh8PH
j+hIfte2TQzQ0PjjxzNAS6GBB86RYGuCBQc1TgexeoFEQRgxtWCSEnQYOwRbm0hV
69ROrz3sr4Q5xEGJHTShIOZIkZbU4BRWvt/I4TYwcLX8s1f2CjmvehDPH3byxfMo
lUTzU/LWDpFgYfB949tcZ5Exp0DOpnO+LU5Qy+lDHWO23gD+S2MQfkuv6Z21KUHi
AciYbvmdHLgMpk1iXWm2KMGUwsuwr3dFVhslI5DfqPxS/ZStvDJcCqKuiKbC6bJ/
Hjm/m8CFcEXeWrmgASfb5VE9slqvKkJ7eaJ2eK9EK3w9Yut7Um1zNA==
=UvMT
-----END PGP SIGNATURE-----

Charles Roper

unread,
Jun 25, 2007, 12:15:19 PM6/25/07
to soap4r
On Jun 25, 4:22 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
> Okay, I created the latest snapshot tarball. Would you please try it again?

Okay, I'm getting somewhere now. I had somehow unset my SOAP_USE_PROXY
and HTTP_PROXY during my debugging efforts and had forgotten to reset
them. I've now done that and I'm getting a response back from the NBN
services. I can now use wsdl2ruby and the code you posted works, as
does some of my own. Fantastic!

Also, here are the results of the latest http-access2 test:
Loaded suite test_http-access2
Started
..........................
Finished in 8.223 seconds.

26 tests, 104 assertions, 0 failures, 0 errors

If I run the same test in Cygwin, I still get errors (the same 6
errors that I posted last time), but not the failure.

Thank you so much for all the help, it is very much appreciated.

Best wishes,
Charles

Charles Roper

unread,
Jun 25, 2007, 1:10:22 PM6/25/07
to soap4r
One thing that I don't quite get: I've used wsdl2ruby on the
following:

http://212.219.37.104/NBNWebServices/ws/WSDL

And I am running the following code:

gem 'soap4r'
require 'defaultDriver.rb'
obj = NBNTaxonomySoapPort.new()
body = TaxonomySearchRequest.new("Lutra")
taxon = obj.getTaxonomySearch(body)

taxon.each do |t|
puts t.taxonName
end

This yields the following results:

cannot find mapped class: SpeciesName
cannot find mapped class: TaxonVersionKey

Lutra lutra
Lutraria
Lutraria angustior
Lutraria lutraria
Lutraria magna
Wiedemannia phantasma
Aporrectodea caliginosa

What's with the "cannot find mapped class" messages? They seem to
getting generated when I require 'defaultDriver.rb'.

NAKAMURA, Hiroshi

unread,
Jun 27, 2007, 1:38:20 AM6/27/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
> One thing that I don't quite get: I've used wsdl2ruby on the
> following:
>
> http://212.219.37.104/NBNWebServices/ws/WSDL

> This yields the following results:


>
> cannot find mapped class: SpeciesName
> cannot find mapped class: TaxonVersionKey
> Lutra lutra
> Lutraria
> Lutraria angustior
> Lutraria lutraria
> Lutraria magna
> Wiedemannia phantasma
> Aporrectodea caliginosa
>
> What's with the "cannot find mapped class" messages? They seem to
> getting generated when I require 'defaultDriver.rb'.

I found a bug around MappingRegistry generator about 'ref' handling.
Can you try the attached patch? You need to re-generate stub files
with wsdl2ruby.rb.

Sorry for an inconvenience again.

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRoH3yx9L2jg5EEGlAQInpwf/QYFkvYfr0ajVRYt1fRroTEuulcxmIPr+
At5Jjnonv0LGj4dEVX8GytwxD6RTZfp4g8W1+80Fj5AIZ/BGazo7x3uF0nnixBt1
ZBabsuFNNBLDWi5Tk8QNOL2unO8b3WtHF1lrYDMZaw3Jt5QKVusBv6bmIbloY/+U
YuaOE7Y5czfug+XaSko817kWGbJ3GXZcXHsEpOAwov1/jNggPiPnMbf5dOak25tz
EyCbCwF8qlm0aZnT2jxF2c99g/VPqiu8YLp4ieDCxnlRza8zIIKEIRqv77T6Egpj
5zNb4ciGQ/OLzB8CggAg9jq8K3hk3cZJhObmVEkHm83EjAGePQguIg==
=+LlF
-----END PGP SIGNATURE-----

nbn-2.diff.sig
nbn-2.diff

Charles Roper

unread,
Jun 27, 2007, 8:16:48 AM6/27/07
to soap4r
Hi NaHi,

I applied the patches and regenerated, but I'm still getting the
"cannot find mapped class" messages when requiring defaultDriver.rb.
Then I realised I had posted the wrong wsdl link in my previous post
(the NBN Web Services have two separate wsdl's for different things).
Here's the correct one:

http://212.219.37.104/NBNWebServices/ws/taxonomy/WSDL

In case you were wondering, the NBN is the (British) National
Biodiversity Network and is essentially a big database holding wild
plant and animal data for the UK. The web services allow you to
generate maps and otherwise pull out biodiversity data.

The service I'm trying to use now - the taxonomy one - is dictionary
of species names and synonyms. So, for example, you can pass in the
name of a species and get the scientific name back out along with
other synonyms. The following code looks for species with the string
"otter" in their names:

gem 'soap4r'
require 'defaultDriver.rb'
obj = NBNTaxonomySoapPort.new()

taxon = obj.getTaxonomySearch(TaxonomySearchRequest.new("Otter"))

taxon.each do |t|
puts t.taxonName + " (" + t.taxonReportingCategory + ")"
if t.synonymList
t.synonymList.each do |s|
puts "\t#{s.taxonName}"
end
end
puts "\n"
end

Best wishes,
Charles

> nbn-2.diff.sig
> 1KDownload
>
> [nbn-2.diff]Index: lib/wsdl/xmlSchema/element.rb
> ===================================================================
> --- lib/wsdl/xmlSchema/element.rb (revision 1849)
> +++ lib/wsdl/xmlSchema/element.rb (working copy)
> @@ -69,6 +69,10 @@
> @refelement = nil
> end
>
> + def empty?
> + !(@local_simpletype || @local_complextype || @constraint || @ref || @type)
> + end
> +
> def refelement
> @refelement ||= (@ref ? root.collect_elements[@ref] : nil)
> end
> Index: lib/wsdl/soap/literalMappingRegistryCreator.rb
> ===================================================================
> --- lib/wsdl/soap/literalMappingRegistryCreator.rb (revision 1852)
> +++ lib/wsdl/soap/literalMappingRegistryCreator.rb (working copy)
> @@ -164,7 +164,8 @@
> if klass = element_basetype(child_element)
> type = klass.name
> else
> - type = create_class_name(child_element.name, @modulepath)
> + typename = child_element.type || child_element.name
> + type = create_class_name(typename, @modulepath)
> end
> elsif child_type
> type = create_class_name(child_type, @modulepath)
> Index: lib/wsdl/soap/mappingRegistryCreatorSupport.rb
> ===================================================================
> --- lib/wsdl/soap/mappingRegistryCreatorSupport.rb (revision 1849)
> +++ lib/wsdl/soap/mappingRegistryCreatorSupport.rb (working copy)
> @@ -130,6 +130,8 @@
> klass
> elsif ele.local_simpletype
> basetype_class(ele.local_simpletype.base)
> + elsif ele.empty?
> + ::SOAP::SOAPString
> else
> nil
> end
> Index: lib/wsdl/soap/classDefCreator.rb
> ===================================================================
> --- lib/wsdl/soap/classDefCreator.rb (revision 1849)
> +++ lib/wsdl/soap/classDefCreator.rb (working copy)
> @@ -303,6 +303,8 @@
> klass
> elsif ele.local_simpletype
> basetype_class(ele.local_simpletype.base)
> + elsif ele.empty?
> + ::SOAP::SOAPString
> else
> nil
> end

NAKAMURA, Hiroshi

unread,
Jun 27, 2007, 10:03:08 AM6/27/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
> I applied the patches and regenerated, but I'm still getting the
> "cannot find mapped class" messages when requiring defaultDriver.rb.
> Then I realised I had posted the wrong wsdl link in my previous post
> (the NBN Web Services have two separate wsdl's for different things).
> Here's the correct one:
>
> http://212.219.37.104/NBNWebServices/ws/taxonomy/WSDL

I confirmed that. Sorry for hasty response. I'll look into this.

By the way, I got the following resopnse with "Otter". Is this right?
In the previous WSDL I see many substitutionGroup definitions which is
not supported by current soap4r. I'm worried that it doesn't work
correctly even when wsdl2ruby.rb can generate stub files.

// NaHi

Lutra lutra (terrestrial mammal)
European Otter
Lutra lutra
Otter

Anthophora (Pyganthophora) retusa (insect - hymenopteran)
Anthophora haworthana [Genus inferred]
Anthophora pennipes [Genus inferred]
Anthophora retusa
Anthophora retusa
Potter Flower Bee

Charadrius morinellus (bird)
Charadrius morinellus
Dotterel
Eudromias morinellus
Eurasian Dotterel

Eumenes coarctatus (insect - hymenopteran)
Eumenes coarctata
Eumenes coarctatus
Heath Potter Wasp

Schottera nicaeensis (alga)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEUAwUBRoJuGx9L2jg5EEGlAQJ1dQf4grwkLEWK9XPcvrcX46gEBjGSZBMSSLdD
J6j2h/8cCWx7LzllP55QkhXFmszRfWI+5b1hDkqJXebtCxn8cLzyGRRy6/x5vrtE
83Vh8zgYvCexMdm72PviFRyu5ABhF2gaKVhVPRBRmoFA5/mU4qWqRcI7TBmI1DxX
jurOc1iWWSas6Tr+3iE95hFpR6pxFHmXe79OfNCTTvc03JD8Eid/KOh+Kr5erGEp
8e/WA/wEuBeVfxnYI5a24jO1CEqP+Kpbo+Ww6KXJhwX8L7gP0w3qOokEmnQDxY9L
4BXeVGke7NFpHY45nLTv9CFFo94Bw6qHDSaAspIGRqMI7h12iI7M
=srJU
-----END PGP SIGNATURE-----

NAKAMURA, Hiroshi

unread,
Jun 27, 2007, 11:03:33 AM6/27/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again,

NAKAMURA, Hiroshi wrote:
>> I applied the patches and regenerated, but I'm still getting the
>> "cannot find mapped class" messages when requiring defaultDriver.rb.
>> Then I realised I had posted the wrong wsdl link in my previous post
>> (the NBN Web Services have two separate wsdl's for different things).
>> Here's the correct one:
>
>> http://212.219.37.104/NBNWebServices/ws/taxonomy/WSDL
>
> I confirmed that. Sorry for hasty response. I'll look into this.

Attached is the third try. Please revert the 2nd patch then apply it.

The problem is from the following definitions:
> <xsd:element name="TaxonVersionKey"/>
> <xsd:element name="SpeciesName"/>

With the patch I let wsdl2ruby.rb generate;
class TaxonVersionKey < ::String
class SpeciesName < ::String
but it may cause a new problem.

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRoJ8RB9L2jg5EEGlAQJEugf9EhM/RsWa8rL5KaVK3n6A/iXsEs7zMn/+
pCIvRzLPisnO73XRMJD8Rw5s+EN52Ape30ZIGSnT3F8oUg5Em0QW7+T4vKQL05xA
SmUymhPrFMRZtxZfQOJnCKt4RKywXiCcWCFLHht8xMm0J1UsrbKhNfdIfkQlmBV9
F/K0agP7terDRf+bnTr4ZFWr5A7QUG+4iGypAidFJCgDaPeSx/MtQWc2hbRa/ffL
nuN0uzHzDXwuFK6mzfpPHZzGqrBaXVX4k3LwFsjaXMLephvNuXdpIXxE6xpUKc9J
6+g4ooz2DmFjX0dROgTmz+Rf/h2/LB4xhgWZAUZNVJgMspscw0DY7A==
=Q6pm
-----END PGP SIGNATURE-----

nbn-3.diff

Charles Roper

unread,
Jun 27, 2007, 12:26:18 PM6/27/07
to soap4r
Hi,

I reverted the 2nd patch (leaving the first in place) and then applied
the 3rd patch. I then regenerated the stub files, but unfortunately
I'm still getting those messages. Sorry to cause such a hassle!

Charles

> [nbn-3.diff]Index: lib/wsdl/xmlSchema/element.rb


> ===================================================================
> --- lib/wsdl/xmlSchema/element.rb (revision 1849)
> +++ lib/wsdl/xmlSchema/element.rb (working copy)
> @@ -69,6 +69,10 @@
> @refelement = nil
> end
>
> + def empty?

> + !(local_simpletype || local_complextype || constraint || type)


> + end
> +
> def refelement
> @refelement ||= (@ref ? root.collect_elements[@ref] : nil)
> end
> Index: lib/wsdl/soap/literalMappingRegistryCreator.rb
> ===================================================================
> --- lib/wsdl/soap/literalMappingRegistryCreator.rb (revision 1852)
> +++ lib/wsdl/soap/literalMappingRegistryCreator.rb (working copy)
> @@ -164,7 +164,8 @@
> if klass = element_basetype(child_element)
> type = klass.name
> else
> - type = create_class_name(child_element.name, @modulepath)
> + typename = child_element.type || child_element.name
> + type = create_class_name(typename, @modulepath)
> end
> elsif child_type
> type = create_class_name(child_type, @modulepath)

> Index: lib/wsdl/soap/classDefCreator.rb
> ===================================================================
> --- lib/wsdl/soap/classDefCreator.rb (revision 1849)
> +++ lib/wsdl/soap/classDefCreator.rb (working copy)

> @@ -84,6 +84,8 @@
> dump_complextypedef(ele.name, ele.local_complextype, qualified)
> elsif ele.local_simpletype
> dump_simpletypedef(ele.name, ele.local_simpletype, qualified)
> + elsif ele.empty?
> + dump_simpleclassdef(ele.name, nil)
> else
> nil
> end
> @@ -198,7 +200,7 @@
> c = ClassDef.new(classname, '::String')
> c.comment = "#{qname}"
> init_lines = []
> - unless type_or_element.attributes.empty?
> + if type_or_element and !type_or_element.attributes.empty?
> define_attribute(c, type_or_element.attributes)
> init_lines << "@__xmlattr = {}"
> end

Charles Roper

unread,
Jun 27, 2007, 12:44:55 PM6/27/07
to soap4r

On Jun 27, 3:03 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:

> By the way, I got the following resopnse with "Otter". Is this right?
> In the previous WSDL I see many substitutionGroup definitions which is
> not supported by current soap4r. I'm worried that it doesn't work
> correctly even when wsdl2ruby.rb can generate stub files.

Yes, the results below look to me to be correct (all species with
either a scientific name or synonym containing the string "otter" are
returned). I've not tested thoroughly, but it looks good so far.

Charles

Charles Roper

unread,
Jun 27, 2007, 1:41:17 PM6/27/07
to soap4r
On Jun 27, 3:03 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:

> By the way, I got the following resopnse with "Otter". Is this right?
> In the previous WSDL I see many substitutionGroup definitions which is
> not supported by current soap4r. I'm worried that it doesn't work
> correctly even when wsdl2ruby.rb can generate stub files.

Okay, I have found a problem: there should be an attribute called
taxonVersionKey, but it appears like this: @__xmlattr={#<XSD::QName:
0x15e97fe {}taxonVersionKey>=>"NBNSYS0000005133"}, which is easy
enough to work around.

Here's a pp dump for "otter":

[#<Taxon:0x364fe08
@__xmlattr={#<XSD::QName:0x15e97fe
{}taxonVersionKey>=>"NBNSYS0000005133"},
@authority="(Linnaeus, 1758)",
@synonymList=
[#<Taxon:0x364e5e4
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0000332266"},
@authority="&nbsp;",
@taxonName="European Otter",
@taxonReportingCategory="terrestrial mammal">,
#<Taxon:0x364c9ec
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0001771990"},
@authority="&nbsp;",
@taxonName="Lutra lutra",
@taxonReportingCategory="terrestrial mammal">,
#<Taxon:0x364a8cc
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000169293"},
@authority="&nbsp;",
@taxonName="Otter",
@taxonReportingCategory="terrestrial mammal">],
@taxonName="Lutra lutra",
@taxonReportingCategory="terrestrial mammal">,
#<Taxon:0x3647cf8
@__xmlattr={#<XSD::QName:0x15e97fe
{}taxonVersionKey>=>"NHMSYS0000875400"},
@authority="(Linnaeus, 1758)",
@synonymList=
[#<Taxon:0x3645fac
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0000875404"},
@authority="(Kirby, 1802)",
@taxonName="Anthophora haworthana [Genus inferred]",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x36443c8
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0000875405"},
@authority="(Kirby, 1802)",
@taxonName="Anthophora pennipes [Genus inferred]",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x36422d0
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0000875409"},
@authority="(Linnaeus, 1758)",
@taxonName="Anthophora retusa",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x36401d8
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000009829"},
@authority="(Linnaeus)",
@taxonName="Anthophora retusa",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x363e0b8
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000169633"},
@authority="&nbsp;",
@taxonName="Potter Flower Bee",
@taxonReportingCategory="insect - hymenopteran">],
@taxonName="Anthophora (Pyganthophora) retusa",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x363b50c
@__xmlattr={#<XSD::QName:0x15e97fe
{}taxonVersionKey>=>"NBNSYS0000000176"},
@authority="Linnaeus, 1758",
@synonymList=
[#<Taxon:0x36397c0
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NHMSYS0001771868"},
@authority="&nbsp;",
@taxonName="Charadrius morinellus",
@taxonReportingCategory="bird">,
#<Taxon:0x3637bb4
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000166550"},
@authority="&nbsp;",
@taxonName="Dotterel",
@taxonReportingCategory="bird">,
#<Taxon:0x3635a94
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000162769"},
@authority="&nbsp;",
@taxonName="Eudromias morinellus",
@taxonReportingCategory="bird">,
#<Taxon:0x3633974
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000188827"},
@authority="&nbsp;",
@taxonName="Eurasian Dotterel",
@taxonReportingCategory="bird">],
@taxonName="Charadrius morinellus",
@taxonReportingCategory="bird">,
#<Taxon:0x3630dc8
@__xmlattr={#<XSD::QName:0x15e97fe
{}taxonVersionKey>=>"NHMSYS0000875934"},
@authority="(Linnaeus, 1758)",
@synonymList=
[#<Taxon:0x362f07c
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000147098"},
@authority="&nbsp;",
@taxonName="Eumenes coarctata",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x362d470
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000009438"},
@authority="Latreille",
@taxonName="Eumenes coarctatus",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x362b350
@__xmlattr=
{#<XSD::QName:0x15e97fe {}taxonVersionKey>=>"NBNSYS0000167674"},
@authority="&nbsp;",
@taxonName="Heath Potter Wasp",
@taxonReportingCategory="insect - hymenopteran">],
@taxonName="Eumenes coarctatus",
@taxonReportingCategory="insect - hymenopteran">,
#<Taxon:0x36287a4
@__xmlattr={#<XSD::QName:0x15e97fe
{}taxonVersionKey>=>"NBNSYS0000177846"},
@authority="(Lamouroux ex Duby) Guiry et Hollenberg",
@taxonName="Schottera nicaeensis",
@taxonReportingCategory="alga">]

NAKAMURA, Hiroshi

unread,
Jun 28, 2007, 2:52:42 AM6/28/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
> I reverted the 2nd patch (leaving the first in place) and then applied
> the 3rd patch. I then regenerated the stub files, but unfortunately
> I'm still getting those messages. Sorry to cause such a hassle!

Doesn't default.rb contain 'class SpeciesName < ::String' definition?
Hmm. Here's a log of what I did.

I downloaded the WSDL as nbn.wsdl, /data as data.xsd and /request as
request.xsd. Then I replaced 'include' definition in the nbn.wsdl as
follows;

> 0% ls
> data.xsd nbn.wsdl request.xsd
> 0% grep include nbn.wsdl
> <xsd:include schemaLocation="data.xsd"/>
> <xsd:include schemaLocation="request.xsd"/>

> 0% wsdl2ruby.rb --wsdl nbn.wsdl --type client --force
> ignored attr: {}version
> I, [2007-06-28T15:51:57.907983 #29112] INFO -- app: Creating class definition.
> I, [2007-06-28T15:51:57.909167 #29112] INFO -- app: Creates file 'default.rb'.
> I, [2007-06-28T15:51:57.953785 #29112] INFO -- app: Creating mapping registry definition.
> I, [2007-06-28T15:51:57.954228 #29112] INFO -- app: Creates file 'defaultMappingRegistry.rb'.
> unresolved attribute type {http://www.w3.org/2001/XMLSchema}ID for {}taxonVersionKey
> I, [2007-06-28T15:51:57.999005 #29112] INFO -- app: Creating driver.
> I, [2007-06-28T15:51:58.000068 #29112] INFO -- app: Creates file 'defaultDriver.rb'.
> I, [2007-06-28T15:51:58.022836 #29112] INFO -- app: Creating client skelton.
> I, [2007-06-28T15:51:58.023978 #29112] INFO -- app: Creates file 'GatewayWebServiceClient.rb'.
> I, [2007-06-28T15:51:58.026883 #29112] INFO -- app: End of app. (status: 0)
> 0% grep SpeciesName default.rb
> # {http://webservices.searchnbn.net/taxonomyQuery}SpeciesName
> class SpeciesName < ::String
> 0% ruby -rdefaultMappingRegistry.rb -e 0
> 0%

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRoNauR9L2jg5EEGlAQLKKQf/fMNFyL0I1qZGbZocOcdfRffohwjngQAk
G8eJF4gAJsQGN97hlPhaTIP+3fDVMZwaL1pvEfO+Rl53fd7DI0enbeycnPJ4ez+i
DBcJipqCxUIuJolMG4BmZuvsY43mPsorWM3Dmpisl7lExGhtZXZqh4amOp/BKXOT
ALJQtnI2UpwbhgEdVEjwXfTQRsm1eNLkUK/AH+QMSxQgCMTe3R8lUJl29oQef0LK
NuxM2gsrZV38rveoaZYSUlNE4UCMJI2y/HB6KjOfmV/MHo5lCm3AgLnlWRZH+RBC
I6EDoMLn8QoX/+F5PSpvqbPUFZIrcs6eJhpVmdXsUQH2QHFSxlcrxA==
=UYXY
-----END PGP SIGNATURE-----

Charles Roper

unread,
Jun 28, 2007, 7:44:58 AM6/28/07
to soap4r
On Jun 28, 7:52 am, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
> Doesn't default.rb contain 'class SpeciesName < ::String' definition?
> Hmm. Here's a log of what I did.

I uninstalled soap4r completely them reinstalled it and re-applied the
patches from scratch and it is now working. Thanks very much for the
help.

Regarding the taxonVersionKey attribute, that's because the wsdl2ruby
can't handle the ID attribute type, right?

Cheers,
Charles

NAKAMURA, Hiroshi

unread,
Jun 28, 2007, 11:23:23 AM6/28/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
>> Doesn't default.rb contain 'class SpeciesName < ::String' definition?
>> Hmm. Here's a log of what I did.
>
> I uninstalled soap4r completely them reinstalled it and re-applied the
> patches from scratch and it is now working. Thanks very much for the
> help.

Good.

> Regarding the taxonVersionKey attribute, that's because the wsdl2ruby
> can't handle the ID attribute type, right?

Please wait for a while. I'll try from now.

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRoPSah9L2jg5EEGlAQI2+gf9FyNHe2fH62NhanmrZtrRHCdl6d5DNlNd
q7vwQjWwE34qNLspqPl2tgPOiLv62I7EVzfJtu3CDhB4nan56CQkQJaBXQ5YKwn2
uZ0FZ+aGpdirYEg7ATxlsXx2apNb9HkEJRJiSO3ewc/Ux1ItPKxhqFEYe6jWzbcM
Rys92dSUPbGpCOiuwBMbbgI8VhYPUsdbioQTOSC9o1oDkGtZechKdbXErpVl5Xue
qJfKMSy7L9D1sxUowUW1kqLVya74y2ysk9vcZ5ziNjeaxIT+cndqYKz3sjXmzcOG
vorTIE0j/RlcGmntK9VQ0XxDHpkvt/gBDPZc1gKIGJ8k8zuKuIqCaw==
=xlD4
-----END PGP SIGNATURE-----

NAKAMURA, Hiroshi

unread,
Jun 28, 2007, 11:27:25 AM6/28/07
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Charles Roper wrote:
> Okay, I have found a problem: there should be an attribute called
> taxonVersionKey, but it appears like this: @__xmlattr={#<XSD::QName:
> 0x15e97fe {}taxonVersionKey>=>"NBNSYS0000005133"}, which is easy
> enough to work around.

Here's my try;

> 0% cat client.rb

> require 'defaultDriver.rb'
> obj = NBNTaxonomySoapPort.new()
> taxon = obj.getTaxonomySearch(TaxonomySearchRequest.new("Otter"))
>
> taxon.each do |t|

> puts "#{t.xmlattr_taxonVersionKey} #{t.taxonName} (#{ t.taxonReportingCategory })"


> if t.synonymList
> t.synonymList.each do |s|
> puts "\t#{s.taxonName}"
> end
> end
> puts "\n"
> end

> 0% ruby client.rb
> NBNSYS0000005133 Lutra lutra (terrestrial mammal)


> European Otter
> Lutra lutra
> Otter
>

> NHMSYS0000875400 Anthophora (Pyganthophora) retusa (insect - hymenopteran)


> Anthophora haworthana [Genus inferred]
> Anthophora pennipes [Genus inferred]
> Anthophora retusa
> Anthophora retusa
> Potter Flower Bee
>

> NBNSYS0000000176 Charadrius morinellus (bird)


> Charadrius morinellus
> Dotterel
> Eudromias morinellus
> Eurasian Dotterel
>

> NHMSYS0000875934 Eumenes coarctatus (insect - hymenopteran)


> Eumenes coarctata
> Eumenes coarctatus
> Heath Potter Wasp
>

> NBNSYS0000177846 Schottera nicaeensis (alga)
>
> 0%

Taxon#xmlattr_taxonVersionKey should be defined in generated classdef
file. Isn't it?

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRoPTXB9L2jg5EEGlAQK+0wf/R/z4Yc9bggeE72KnuuMfLEsSjGN0RZBy
y2XVXXDQgFyTxHNzJmsHWpg+O75AU6+a1DSSrBlWzzDQ58Xk9iB5mPyRh2/hU1Du
HQ1piT3E0wVXKI3bR56U0UR8s651E7owIquU4i+OncqcKYkcdvitkzxQfNGitpj/
FUY0x7ATDFG2/hyYCXrP3bLCOH+xiIxgsuv9KNZN65VC7pH0uKm+VU5IsF8M7BeB
Bv0qGnHyXcxuEYF+VGcH4yzM9xmvcZaGl6emy8f4U7jYL3pzc+yavd02cNhs3yfm
o2oeqt1yCmz6Df1a0AguR89NZmIBva6S/jjWC49o9jglS5/1o+Lzxg==
=pBSx
-----END PGP SIGNATURE-----

Charles Roper

unread,
Jun 28, 2007, 12:14:51 PM6/28/07
to soap4r
On Jun 28, 4:27 pm, "NAKAMURA, Hiroshi" <nakah...@sarion.co.jp> wrote:
> Taxon#xmlattr_taxonVersionKey should be defined in generated classdef
> file. Isn't it?

Yes it is (as a schema_attribute), and thanks to your example I'm now
getting expected results. I was initially doing this to grab the key:

taxonVersionKey = t.__xmlattr.to_s[-16..-1]

But your way is much cleaner. Thanks so much! :)

Cheers,
Charles

Reply all
Reply to author
Forward
0 new messages