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

Ticket #271 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

wsdl2ruby.rb generates duplicated class definitions

Reported by: nahi Assigned to: nahi
Priority: normal Milestone: 1.5.6
Component: wsdl4r Version: 1.5
Keywords: Cc:

Description

from soap4r-ML

Hi,

I'm very very new to soap4r, so please excuse me if I'm making a stupid
mistake here.
I'm attempting to to use the webservices found here:

http://www.searchnbn.net/library/webservices/wsIndex.jsp
wsdl: http://www.searchnbn.net/library/webservices/xsd_wsdl.jsp

Specifically, the gateway_soap.wsdl

I've managed to run wsdl2ruby on the wsdl and I'm now trying to use
Grid Map service:

http://www.searchnbn.net/library/webservices/wsGridMap.jsp

Here's the very basic code I'm running:
#!/usr/bin/env ruby
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

# SYNOPSIS
#   GetGridMap(body)
#
# ARGS
#   body            GridMapRequest -
{http://webservices.searchnbn.net/query}GridMapRequest
#
# RETURNS
#   body            GridMap -
{http://webservices.searchnbn.net/data}GridMap
#
gr = GridMapRequest.new("NHMSYS0000309499")
puts obj.getGridMap(gr)

However, I get the following error:

./default.rb:2326: warning: already initialized constant ImageGif
./default.rb:2327: warning: already initialized constant ImageJpeg
./default.rb:2328: warning: already initialized constant ImagePng
./default.rb:3691: warning: already initialized constant EPSG_27700
./default.rb:3692: warning: already initialized constant EPSG_29903
./default.rb:3693: warning: already initialized constant EPSG_4277
./default.rb:3694: warning: already initialized constant EPSG_4326
./default.rb:3695: warning: already initialized constant Osgb_BNG
./default.rb:3696: warning: already initialized constant Osni_ING
./default.rb:3704: warning: already initialized constant Any
./default.rb:3705: warning: already initialized constant C__100m
./default.rb:3706: warning: already initialized constant C__10km
./default.rb:3707: warning: already initialized constant C__1km
./default.rb:3708: warning: already initialized constant C__2km
./default.rb:3716: warning: already initialized constant Box
./default.rb:3717: warning: already initialized constant Polygon
./default.rb:3725: warning: already initialized constant Acres
./default.rb:3726: warning: already initialized constant Hectares
./default.rb:3727: warning: already initialized constant
SquareKilometres
./default.rb:3728: warning: already initialized constant SquareMetres
./default.rb:3729: warning: already initialized constant Unknown
./default.rb:3737: warning: already initialized constant AfterYear
./default.rb:3738: warning: already initialized constant BeforeYear
./default.rb:3739: warning: already initialized constant Circa
./default.rb:3740: warning: already initialized constant Day
./default.rb:3741: warning: already initialized constant DayRange
./default.rb:3742: warning: already initialized constant Month
./default.rb:3743: warning: already initialized constant MonthRange
./default.rb:3744: warning: already initialized constant NoDate
./default.rb:3745: warning: already initialized constant
PublicationDate
./default.rb:3746: warning: already initialized constant Unknown
./default.rb:3747: warning: already initialized constant Year
./default.rb:3748: warning: already initialized constant YearRange
c:/ruby/lib/ruby/1.8/soap/mapping/mapping.rb:206:in `const_from_name':
private method `sub' called for nil:NilClass (NoM
ethodError)
        from c:/ruby/lib/ruby/1.8/soap/mapping/mapping.rb:225:in
`class_from_name'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:447:in
`add_attributes2stubobj'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:444:in
`add_attributes2stubobj'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:378:in
`elesoap2stubobj'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:363:in
`any2obj'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:413:in
`add_elesoap2stubobj'
        from c:/ruby/lib/ruby/1.8/soap/baseData.rb:637:in `each'
        from
c:/ruby/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:401:in
`add_elesoap2stubobj'
         ... 13 levels...
        from c:/ruby/lib/ruby/1.8/soap/rpc/proxy.rb:152:in `call'
        from c:/ruby/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'
        from (eval):6:in `getGridMap'
        from test.rb:20

It looks like a similar problem to that documented here:

http://www.brendonwilson.com/blog/2006/04/02/ruby-soap4r-wsdl-hell/

But on uncommenting the code suggested, I still get the error.

Any ideas? Many thanks,

Charles


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "soap4r" group.
To post to this group, send email to soap4r@googlegroups.com
To unsubscribe from this group, send email to soap4r-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/soap4r
-~----------~----~----~----~------~----~------~--~---

Change History

10/03/06 22:13:37 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1732]) NamedElement#uniq? did not work. closes #271.

06/01/07 17:59:10 changed by nahi

  • component changed from soap4r to wsdl4r.