Issue Details (XML | Word | Printable)

Key: JERSEY-1336
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Pavel Bucek
Reporter: gdavison
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

WADL for Matrix parameters are in contravention of the WADL specification

Created: 02/Aug/12 02:33 PM   Updated: 23/Aug/12 03:57 PM   Resolved: 23/Aug/12 03:57 PM
Component/s: None
Affects Version/s: 1.13
Fix Version/s: 1.14

Time Tracking:
Not Specified

Participants: gdavison and Pavel Bucek

 Description  « Hide

Section 2.12 of the WADL specification states that a matrix parameter can only exist on a resource element:

But if you run this trivial example:

package project1;


public class MatrixExample {

private String con;

public MatrixExample() {

public String matrixExample(@MatrixParam("param") String param) { return param + " " + con; }

public void setCon(String con) { this.con = con; }

public String getCon() { return con; }

Then you end up with the following WADL which is in contravention of the specification:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:application xmlns:ns0="">
<ns0:doc xmlns:ns1="" ns1:generatedBy="Jersey: 1.13-b01 03/09/2012 03:52 PM"/>
<ns0:resources base="http://localhost:7101/Application1-Project1-context-root/resources/">
<ns0:resource path="/matrix">
<ns0:param name="con" style="matrix" xmlns:ns2="" type="ns2:string"/>
<ns0:method id="matrixExample" name="GET">
<ns0:param name="param" style="matrix" xmlns:ns3="" type="ns3:string"/>
<ns0:representation mediaType="/"/>

The second matrix parameter should be added at the resource level, this shouldn't be a problem for other methods as parameter are optional by default.