Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 可以在vxml中提交不同的命名空间_Java_Rest_Jax Rs_Vxml - Fatal编程技术网

Java 可以在vxml中提交不同的命名空间

Java 可以在vxml中提交不同的命名空间,java,rest,jax-rs,vxml,Java,Rest,Jax Rs,Vxml,可以在vxml中提交不同的名称空间,这是示例vxml代码 <filled namelist="getSendDay getSendTime getSentMonth"> <submit next="{}" namelist="getSendDay getSendTime getSentMonth" method="get" /> </filled> 如何在Restful(Jax-Rs)web服务中捕获这个不同的名称空间?这个值传递方式正确

可以在vxml中提交不同的名称空间,这是示例vxml代码

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


如何在Restful(Jax-Rs)web服务中捕获这个不同的名称空间?这个值传递方式正确吗?(我正在寻找Java答案)。

在名称列表类别中提交时,会向web服务传递这样一个值

{url}/hello/param?getSendDay=12&getSendTime=18:30&getSentMonth=05
这可以使用下面的java类在restful web服务中捕获:

@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();

    }

}