On 03/10/12 11:43, jbright wrote:
I've a complexType specified in the XSD which is the Input parameter for the service operation. Its a search Operation, which takes the 'Request' as the input parameter.The ComplexType is like this <SearchRequest> <SecurityCredentials> <Token>abc</Token> </SecurityCredentials> <SearchParameters> <Name>Apple</Name> <Sex>..</Sex> <Age>..</Age> ..... </SearchParameters> </SearchRequest> This schema has its JAXB classes ... like below along with the associated elements.. @XmlRootElement(name = "SearchRequest ") public class SearchRequest { } In the service implementation, the method signature is as below: @Path ("/salesDepartment") public class SalesDepartmentImpl implements SalesDepartment{ @GET @Path("/searchEmployee") @Produces ("application/xml") @Consumes ("application/xml") public SearchResponse searchEmployee(SearchRequest request) { //..... //Call the DAO method and pass the request as parameter //the DAO will return a SearchResponse object. } } I used the URI like this: http://:/business-restful/services/salesdepartment/searchEmployee?securityCredentials.token=abc&searchParameters.name=Apple Getting the below issue: org.apache.cxf.interceptor.Fault: Parameter should be ordered in the following sequence: [SecurityCredentials, SearchParameters]
You have @Consumes annotation and SearchRequest is expected to capture an XML request body where as you use query parameters. You may want to drop @Consumes and add @QueryParam("") to SearchRequest - that should help. I guess simpler options are also possible, for you to avoid prefixing the properties
Cheers, Sergey
Any help to resolve this please.. -- View this message in context: http://cxf.547215.n5.nabble.com/complexType-Parameter-in-CXF-JAX-RS-tp5715509.html Sent from the cxf-user mailing list archive at Nabble.com.
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
