Forum Discussion

pbeach's avatar
12 years ago

query parameter in wadl resources base is bypassed

I have a wadl with a query parameter in the resources base. When I generated a soapui project from the wadl, the query parameter is bypassed / not included in the project. Although the query parameter by practice should be included specifically as a <param> within the resource or request, according to the description of the resource base attribute in http://www.w3.org/Submission/wadl/#x3-120002.6 and http://www.w3.org/Submission/wadl/wadl.xsd, this is an xsd:anyURI type http://www.w3.org/TR/xmlschema11-2/#anyURI, which I believe allows query parameters. I've included the schemaLocation, so this can be put into a schema validation tool to validate it is valid according to the schema. Is there any additional restriction in wadl not expressed in http://www.w3.org/Submission/wadl/wadl.xsd that does not allow query parameters in resources base? I've included a sample wadl to demonstrate. The soapui project includes an endpoint of http://localhost, full path of /rest/aresource, and the param aparam, but the param rev is not present. I believe this is a valid scenario, but please review. This query param named rev is intended to be global across all resources and requests. This rev param is generated by our web services facade layer as a part of a versioning strategy. Please advise! Thank you

<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://wadl.dev.java.net/2009/02 http://www.w3.org/Submission/wadl/wadl.xsd">
<resources base="http://localhost/test?rev=2">
<resource path="aresource">
<method name="GET">
<request>
<!-- Begin meta data params -->
<param name="aparam" style="query" type="xsd:string"/>
</request>
<response status="200">
<representation mediaType="application/xml"/>
</response>
</method>
</resource>
</resources>
</application>
No RepliesBe the first to reply