savonrb / wasabi

A simple WSDL parser
MIT License
90 stars 84 forks source link

input_for in parser.rb raising NoMethodError #11

Closed cschiewek closed 12 years ago

cschiewek commented 12 years ago

I'm getting the following error:

NoMethodError: undefined method `attribute' for nil:NilClass
    from wasabi-2.5.0/lib/wasabi/parser.rb:156:in `input_for'
    from wasabi-2.5.0/lib/wasabi/parser.rb:92:in `block in parse_operations'

When calling pretty much any method on a document object (namespace, soap_actions, operations, etc). Here is the WSDL that causes the problem: http://sudbury.production.its4mobility.com/Tmix.Cap.Ti/1.3.4/TrafficInformationService.svc?wsdl

I'm not overly familiar with WSDL, but SOAPUI is having no problems parsing it.

Thanks!

rubiii commented 12 years ago

soapUI probably has the best wsdl/xsd parser i've ever seen. so i'm not surprised that it works :) thanks for providing the wsdl. i'll look into this later today or tomorrow.

could you let me know which versions of savon and its direct dependencies you're using?

cschiewek commented 12 years ago

I initially ran into the issue using savon 1.1.0, and then tested it directly with wasabi 2.5.0 (which was using nokogiri 1.5.4) and got the same result. Thanks!

rubiii commented 12 years ago

thanks for the effort you put into this, but i fear the solution for this is not that easy. i just downloaded your original wsdl file and all of its xsd imports. as it turns out, the wsdl actually contains a portType element, but it's "hidden" in one of those imports.

the problem here is, that the current parser does not support imports and therefore can't handle the wsdl. this is a problem that i aim to fix with the new sax parser. for now, i would suggest to not use the wsdl at all.

ps. there's an open issue #1 to track the progress of this feature.

cschiewek commented 12 years ago

Sounds good to me. Thanks!