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

Ticket #220 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

'.' in Method names produces an exception

Reported by: anonymous Assigned to: nahi
Priority: high Milestone: 1.5.6
Component: soap4r Version: 1.5
Keywords: Cc:

Description

I am attempting to use the Ruby SOAP library to automate interation with the Horde framework (http://www.horde.org). I have discovered that Horde has named all of its methods using an internal namespace delimited with a '.' and this causes Ruby to break. I can see that there is some code in the library that attempts to map the method names with invalid characters to "safe" names but for some reason it's not working completely. Ruby is not the only library to suffer this fault either; so far Perl (SOAP::Lite) definitively has the same issue and I'm beginning to think Python (SOAPpy) does as well.

I should mention that the WSDL generated by Horde looks to be entirely valid and it's simply by convention that we don't see '.' in method names. I believe this is why the issue still exists.

For testing purposes the WSDL that I am using can be found here: http://mail-new.alkaloid.net/rpc.php?wsdl

And here is what Ruby says when it attempts to load the WSDL (this is Ruby 1.8.4 with soap4r 1.5.5: /usr/lib/ruby/1.8/soap/rpc/element.rb:269:in `check_elename': element name 'horde.perms' not allowed (SOAP::RPC::MethodDefinitionError?)

from /usr/lib/ruby/1.8/soap/rpc/element.rb:238:in `initialize' from /usr/lib/ruby/1.8/soap/rpc/proxy.rb:301:in `initialize' from /usr/lib/ruby/1.8/soap/rpc/proxy.rb:87:in

`add_rpc_operation'

from /usr/lib/ruby/1.8/soap/rpc/driver.rb:154:in

`add_rpc_operation'

from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:111:in

`add_operation'

from /usr/lib/ruby/1.8/xsd/namedelements.rb:58:in `each' from /usr/lib/ruby/1.8/xsd/namedelements.rb:57:in `each' from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:96:in `add_operation' from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:40:in

`create_rpc_driver'

from test.rb:2

And the contents of test.rb: $ cat test.rb require "soap/wsdlDriver" server = SOAP::WSDLDriverFactory.new("http://mail-new.alkaloid.net/rpc.php?wsdl").create_rpc_driver

I'm not particularly good at reading W3C specifications, but from what I'm reading it does appear to be valid for NCName to contain a '.'.

From the spec[1]:

is defined by the following pattern: pattern = \i\c* ? [\i-[:]][\c-[:]]*

I'm not going to fully reconstruct that pattern but the '\c' identifier is defined as the set of name characters matched by "NameChar?"[2]. NameChar? is defined[3] as: NameStartChar? | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F | [#x203F- #x2040]

I understand that to meant that a '.' is valid for an NCName. But I may be misreading it and if so please correct me so I can take this issue to the Horde developers for correction.

References: 1: http://www.w3.org/TR/xmlschema11-2/#NCName 2: http://www.w3.org/TR/xmlschema11-2/#dt-regex (Under the heading "Multi-Character Escape") 3: http://www.w3.org/TR/xml11/#NT-NameChar

Please let me know if I may be of any assistance in resolving this bug. /BAK/ -- Ben Klang Alkaloid Networks bklang@alkaloid.net http://projects.alkaloid.net 404.475.4850

Change History

08/09/06 21:53:05 changed by nahi

  • priority changed from normal to high.
  • milestone changed from undefined to 1.5.6.

09/03/06 21:39:55 changed by nahi

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

[1692] should fix it.