Its a bug.
On Thu, Feb 10, 2011 at 5:34 PM, dr <[email protected]> wrote: > > I couldn't find a reference to this in the mailing list, maybe someone can > help? > > I am creating a jaxrs WebClient for a query, and set the query parameters > with the WebClient.query(...) method. One of the parameters has a length of > 6 spaces in it. When I call the WebClient.get() method, I get a > RuntimeException saying "Dangling meta character '+' near index ...". I > tracked it down to the last statement of the URITemplate constructor, where > after a URLEncode has been done (so the spaces are now '+'s), it tries to do > a Pattern.compile() on the query parameter, thus the complaint about the > dangling meta character. > > Am I doing something the wrong way, or is this a defect? > > Here is a short class that replicates the problem: > > <code> > package example; > > import javax.ws.rs.core.Response; > > import org.apache.cxf.jaxrs.client.WebClient; > > public class WebClientQuery { > public static void main (String[] args) { > WebClient webClient = > WebClient.create("http://some-server:8080/some-service/lookup"); > webClient.query("text", "query parameter"); > Response response = webClient.get(); > } > } > </code> > -- > View this message in context: > http://cxf.547215.n5.nabble.com/WebClient-query-parameter-with-spaces-RuntimeException-tp3379740p3379740.html > Sent from the cxf-user mailing list archive at Nabble.com. >
