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

Ticket #435 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

rpc/encoded service + detail element without xsi:type attribute causes NameError

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

Description

from soap4r-ml

Thanks for your help so far. I am sorry to keep bothering you, but I
have come across yet another problem:

If i receive an error like this one

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>DN cannot be empty</faultstring><detail /></
soap:Fault></soap:Body></soap:Envelope>

from the webservice, soap4r raises the following error

/opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
registry.rb:218:in `find_node_definition': undefined method `name' for
nil:NilClass (NoMethodError)
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/encodedregistry.rb:361:in `_soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/encodedregistry.rb:309:in `soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:150:in `_soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/wsdlencodedregistry.rb:64:in `soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:150:in `_soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:65:in `soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:592:in `protect_mapping'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:565:in `protect_threadvars'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:581:in `protect_mapping'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:64:in `soap2obj'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
mapping/mapping.rb:95:in `fault2exception'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
rpc/proxy.rb:431:in `raise_fault'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
rpc/proxy.rb:152:in `call'
        from /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/
rpc/driver.rb:181:in `call'
        from (eval):6:in `getUserByDn'

I would prefer to be able to rescue a soap::FaultError, but that does
not seem to be possible.

Somewere else I am getting an error like this one:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>Operation failed; nested exception is
javax.naming.InvalidNameException: fasfd: [LDAP: error code 34 -
Invalid DN]; remaining name 'fasfd'</faultstring></soap:Fault></
soap:Body></soap:Envelope>

Which can be rescued fine. The only difference between the two is the
<detail/> tag. Is that what is causing the problem?

My wsdl can be found here: http://pastie.caboo.se/100120

Thanks in advance
Thomas

Change History

09/27/07 17:58:13 changed by nahi

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

(In [1987]) * rpc/encoded service + detail element without xsi:type attribute caused NameError? since 1.5.6. closes #435.