Hi All,

I just started using CXF and had couple of doubts. I have a service which
takes 5 parameters.

public Response getSchedule(
            @QueryParam("index") int index,
            @QueryParam("resultsize") int resultSize,
            @QueryParam("startdatetime") long startTime,
            @QueryParam("enddatetime") long endTime,
            @QueryParam("duration") int duration) {...}


1) All the parameters are not required but few of them are. Is there a way
I can specify required or optional parameter using annotation in CXF?

2) I am getting "XML Parsing Error: no element found
Location:
http://localhost:8080/xboxEpgService/v1/listings/channels.xml?index=0&resultSize=200&duration=120&;
*startdatetime=*
Line Number 1, Column 1:" error when I am trying to execute the above URL.
it's only happens when I pass last parameter as blank.
I noticed below warning in the logs.
Nov 21, 2011 10:00:54 AM org.apache.cxf.jaxrs.impl.
WebApplicationExceptionMapper toResponse
WARNING: WebApplicationException has been caught : For input string: """

I tried specifying @Default annotation but still not luck.

Does anybody know what can I use to handle these kind scenarios, where
nothing is being passed after parameter?

Any help would be appreciating.

Manisha

Reply via email to