javarestjax-rsvxml

Can submit different namespace in vxml


Can submit different namespace in vxml, this is example vxml code.

<filled namelist="getSendDay getSendTime getSentMonth">
        <submit next="{}" namelist="getSendDay getSendTime getSentMonth" method="get" />
</filled>

How to catch this different namespace in Restful(Jax-Rs) web service? this value passing way is correct? ( I an looking for Java answer ).


Solution

  • There are when submit in namelist category pass into web service a value like this...

    {url}/hello/param?getSendDay=12&getSendTime=18:30&getSentMonth=05
    

    this can be caught in restful web service using the java class below:

    @Path("/hello")
    public class HelloWorldService {
    
        @GET
        @Path("/param")
        public Response getMsg(@Context UriInfo urlInfo) {
    
            String Day = urlInfo.getQueryParameters().getFirst("getSendDay"); //getSendDay getSendTime getSendMonth
            String Time = urlInfo.getQueryParameters().getFirst("getSendTime");
            String Month = urlInfo.getQueryParameters().getFirst("getSendMonth");
    
    
            String output = "Jersey say : Month is " + Month + ", Day is " + Day + " and Time is " + Time;
    
            return Response.status(200).entity(output).build();
    
        }
    
    }