cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CXF user1109 <xwje...@hotmail.com>
Subject Re: CXF : JAX-RS: support multiple request method designators to one method?
Date Mon, 05 Sep 2011 08:41:50 GMT
Your question :  What is a Tree ? How does a query string look like ? 

Here is the java class:

public class Constraint {
  private List<Term> terms;
  private List<Constraint> innerConstraints;
  ....
}

public class Term {

  private String operator;
  private Object[] values;
  private Long fieldId;
  ...
}

Json string example : 

{"terms":
        [{"values":[0.0],"operator":"lessThan","fieldId":54321}],
"innerConstraints":
       
[{"terms":[{"values":[0.1,0.101],"operator":"between","fieldId":12345},
                 
{"values":[-0.0010,0.0],"operator":"between","fieldId":67890}],
         "innerConstraints":[]}
        ]
}

Service methods are :

  @GET
  @Path("/test")
  List get(@QueryParam("constraint") Constraint constraint,
             @QueryParam("value") @DefaultValue("true") boolean value)

  @POST
  @Path("/test")
  @WebMethod(operationName = "test")
  List post(@FormParam("constraint") @WebParam(name = "constraint")
Constraint constraint,
               @QFormParam("value") @WebParam(name = "value")
@DefaultValue("true") boolean value)


Thank you for your support.

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-JAX-RS-support-multiple-request-method-designators-to-one-method-tp4749559p4769680.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message