Unable to parse WADL string due to incorrect XML namespace

Bug #1273846 reported by Daniel Riti
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wadllib
New
Undecided
Unassigned

Bug Description

I attempted to use wadllib to parse the following example WADL file:

http://www.w3.org/Submission/wadl/#x3-40001.3

However, I got the following error:

```
Traceback (most recent call last):
  File "/home/driti/work/wadl-test/test_wadl.py", line 84, in test_something
    wadl = Application("http://localhost:9998/", WADL_STRING_2)
  File "/home/driti/work/wadl-test/venv/local/lib/python2.7/site-packages/wadllib/application.py", line 1074, in __init__
    self.resource_base = self.resources.attrib.get('base')
AttributeError: 'NoneType' object has no attribute 'attrib'
```

So after some investigation, I noticed that wadllib searches for tags using the "http://research.sun.com/wadl/2006/10" XML namespace:

http://bazaar.launchpad.net/~lazr-developers/wadllib/trunk/view/head:/src/wadllib/application.py#L89

Meanwhile, the WADL specification states that "http://wadl.dev.java.net/2009/02" should be used for the XML namespace:

http://www.w3.org/Submission/wadl/#x3-50002

So my question is, am I using wadllib incorrectly? The XML namespace seems to be hardcoded and I don't see any way of setting an "XML namespace" parameter in the Application class constructor. Or is this a bug?

Thanks in advance!

Revision history for this message
P. J. Reed (pjreed) wrote :

I'm seeing the same issue when trying to parse the Confluence Questions API WADL file from https://docs.atlassian.com/confluence-questions/rest/application.wadl .

I know this issue is five years old, but I'm guessing that means nobody is paying attention to this project any more.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.