如何为基于Spring的JAX WS服务创建WADL文档?

时间:2016-09-26 07:16:41

标签: web-services rest jax-ws wadl

我创建了一个基于 Spring Restful API 的Web服务。 请建议如何为此服务创建 WADL文档

我通过eclipse访问Web服务:

的http://本地主机:8080 / SampleSpringService / mcxService / getMCX

服务名称:mcxService, 功能名称:getMCX

作为Web服务调用的Java文件代码:

@RestController
@RequestMapping(value = "/mcxService")
@PropertySource(value = "classpath:FileProperty.properties") 
public class MCXController {


@Autowired
private MessageSource messageSource;

@Value("${jsonFile.path}")
private String jsonFilePath;

@RequestMapping(value = "/getMCX", method = RequestMethod.GET, produces = "application/json")


public String getMCXData(HttpServletRequest request) throws JsonParseException, JsonMappingException, IOException {

    System.out.println(messageSource.getMessage("jsonFile.path", null, null));

    // read Form data to String

    String data = request.getParameter("firstname");
    System.out.println("data = " + data);
    if(data == null){return "Data is NULL !!!!" ;} 
    saveUserList(data);

    return "Data (" + data + ") is saved to File : D:/test.txt" ;

}

0 个答案:

没有答案