Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.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 wsgen使用@WebMethod生成WSDL,但忽略@WebParam_Java_Wsdl_Wsgen - Fatal编程技术网

Java wsgen使用@WebMethod生成WSDL,但忽略@WebParam

Java wsgen使用@WebMethod生成WSDL,但忽略@WebParam,java,wsdl,wsgen,Java,Wsdl,Wsgen,我使用@WebService、@WebMethod和@WebParam注释从Java类生成WSDL。WSDL已生成,并包含@WebService和@WebMethod的输出,但@WebParam注释似乎被忽略 这里有一个与此问题相关的方法声明: @WebMethod(action = "jmsServiceInitialise") public boolean jmsServiceInitialise( @WebParam(name = "queue") String queue

我使用@WebService、@WebMethod和@WebParam注释从Java类生成WSDL。WSDL已生成,并包含@WebService和@WebMethod的输出,但@WebParam注释似乎被忽略

这里有一个与此问题相关的方法声明:

@WebMethod(action = "jmsServiceInitialise")
public boolean jmsServiceInitialise(
        @WebParam(name = "queue") String queueName, 
        @WebParam(name = "channel") String channel, 
        @WebParam(name = "hostname") String hostName, 
        @WebParam(name = "port") String port, 
        @WebParam(name = "requiresresponse") boolean requiresResponse) {
    log.info("jmsServiceInitialise " + queueName + ": started");
    // etc
    return returnValue;
}
WSDL文件没有提到任何参数,但方法就在那里。该方法可以作为web服务调用,但字符串参数值均为null

我最初在Eclipse中遇到这个问题,但后来在命令行窗口JAX-WSRI 2.2.4-b01中使用wsgen复制了这个问题,并得到了相同的结果

我错过了什么

谢谢。

在@WebMethod注释之后,将@WebResult注释添加到方法中 和 使@WebMethodoperationName=jmsServiceInitialise代替操作