Forum Discussion

paduffy's avatar
paduffy
Occasional Contributor
13 years ago

NullPointer importing XML validated WADL file

4.5 Beta2 (and Beta1) throw a null pointer exception when loading the attached WADL file.

Seems the first <resource/> is processed and viewable, but the second <resource/> appears causing a NPE and is not viewable in the GUI.

Note: the WADL file validates using XML Spy.

Also note: the file is using a few WADL schema extensions and does not include some commonly used attributes such a "path", "base", etc. which one would expect be required before, say, WADL2JAVA is run. This is because this WADL is intended to serve as normative guidance, with manufacturers first needing to transform the "wx:" elements and attributed to WADL equivalents.

BTW the forum is not allowing attaching wadl files "The extension wadl is not allowed."

?!?

Here it is inline...

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wadl.dev.java.net/2009/02 wadl.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wx="http://zigbee.org/wadlExt" xmlns:sep="http://zigbee.org/sep" xmlns="http://wadl.dev.java.net/2009/02">
<doc title="SEP 2.0 Application">SEP 2.0.37</doc>
<grammars>
<include href="sep.xsd"/>
</grammars>
<resources wx:sampleBase="http://localhost/sep/">
<resource id="SelfDeviceStatus" wx:samplePath="dcap/sdev/sdstat">
<doc title="SelfDeviceStatus">Allows hosts to expose their current operational state. </doc>
<method id="GETSelfDeviceStatus" name="GET" wx:mode="M">
<response>
<representation mediaType="application/xml" element="sep:DeviceStatus"/>
</response>
</method>
<method id="PUTSelfDeviceStatus" name="PUT" wx:mode="D">
<request>
<representation mediaType="application/xml" element="sep:DeviceStatus"/>
</request>
</method>
<method id="POSTSelfDeviceStatus" name="POST" wx:mode="E">
<request>
<representation mediaType="application/xml" element="sep:DeviceStatus"/>
</request>
<response status="400"/>
<response status="405"/>
</method>
<method id="DELETESelfDeviceStatus" name="DELETE" wx:mode="E">
<response status="400"/>
<response status="405"/>
</method>
</resource>
<resource id="SelfEndDeviceCapability" wx:samplePath="dcap/sdev/scap">
<doc title="SelfEndDeviceCapability">Contains the capabilities of the serving device.</doc>
<method id="GETSelfEndDeviceCapability" name="GET" wx:mode="M">
<response>
<representation mediaType="application/xml" element="sep:EndDeviceCapability"/>
</response>
</method>
<method id="PUTSelfEndDeviceCapability" name="PUT" wx:mode="D">
<request>
<representation mediaType="application/xml" element="sep:EndDeviceCapability"/>
</request>
</method>
<method id="POSTSelfEndDeviceCapability" name="POST" wx:mode="E">
<request>
<representation mediaType="application/xml" element="sep:EndDeviceCapability"/>
</request>
<response status="400"/>
<response status="405"/>
</method>
<method id="DELETESelfEndDeviceCapability" name="DELETE" wx:mode="E">
<response status="400"/>
<response status="405"/>
</method>
</resource>
</resources>
</application>

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    thanks for reporting - this will be fixed in the 4.5 final release.

    regards!

    /Ole
    SmartBear Software
  • paduffy's avatar
    paduffy
    Occasional Contributor
    Thanks much!

    Approximate date for 4.5 final?

    Cheers
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    approximate date of arrival is next Wednesday March 28...

    Thanks,

    /Ole
    SmartBear Software