Forum Discussion

gsmith_1's avatar
gsmith_1
New Contributor
14 years ago

Error on optional path attribute in RESOURCE in WADL

I have a system generated WADL document from PeopleSoft ERP system and soapUI is throwing a java.lang.NullPointerException error when loading in the WADL document.

I've tracked this down to soapUI insisting (incorrectly in my opinion) on the path attrib in the resource element.

Here's my WADL in it's original form


<?xml version="1.0"?>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:GRSUSERMSG.1="http://xmlns.oracle.com/Enterprise/Tools/schemas/grsPackage.grsDocument.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<grammars>
<include href="GRSUSERMSG.1.xsd"/>
</grammars>

<resources base="http://oxgbhrwbdev01.oxfam.org.uk:82/PSIGW/RESTListeningConnector/">
<resource>
<method href="#User.v1"/>
</resource>
</resources>

<method id="User.v1" name="GET">
<request>
<resource path="user/{User}">
<param name="User" style="template" type="xsd:string"/>
</resource>
</request>
<response Status="200">
<representation element="grsDocument" id="GRSUSERMSG.1.xsd" mediaType="text/xml"/>
</response>
</method>
</application>


If I change

  <resource>
<method href="#User.v1"/>
</resource>


to

  <resource path="User.v1">
<method href="#User.v1"/>
</resource>


then soapUI loads the wadl successfully. However, according to the W3C proposal the path attrib is optional http://www.w3.org/Submission/wadl/#x3-120002.6

Is this a bug?

Thanks
Graham
No RepliesBe the first to reply