Hi
In my service I use semicolon (;) based on this JAX-RS Search
<http://cxf.apache.org/docs/jax-rs-search.html#JAX-RSSearch-SearchExpressionsinURIPathsegments>
So my service looks like this
@GET
@Path("services;{search}")
public Response services(@PathParam("search") String searchExpression) {
SearchCondition<Service> sc =
searchContext.getCondition(searchExpression,
Service.class);
SQLPrinterVisitor<Service> visitor = new SQLPrinterVisitor<Service>(
beanPropertiesMap,
beanConfiguration.get("db_table"),
cols);
sc.accept(visitor);
String sql = visitor.getQuery();
}
I added the @Encoded and it solved the problem of the NullPointerException
coming from the SearchContext but I still get don't get what I want. Here is
why
by requesting
http://my.com/appl/services;serviceClass==PROCMON;serviceInstance==director%3B-D
the searchExpression is
objectClass==BA_PROCMON;objectInstance==director--cimlistener%3B-D
and it goes through the searchContext.getCondition(searchExpression,
Service.class); without exceptions.
The problem now is with the %3B which results in a sql of
SELECT * FROM SERVICES WHERE (OBJECT_CLASS = 'BA_PROCMON') AND
(OBJECT_INSTANCE LIKE 'director--cimlistener%3B-D')
The way that I see it is that the url should be send as
http://my.com/appl/services;serviceClass==PROCMON;serviceInstance==director;-D
and the SearchContext should be able to identify based on the fields of the
Service.class which semicolon is part of a value and which ones denote part
of the query.
Is there any way of doing that or I have to implement a workaround?
Thanks in advance
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-escape-semicolon-when-matrix-parameters-FIQL-are-used-tp5746002p5746145.html
Sent from the cxf-user mailing list archive at Nabble.com.