webservice系统学习笔记3-分析wsdl文件的组成
详细分析前面章节的服务的wsdl文件
1、http://localhost:8888/ws01?wsdl
2、http://localhost:8888/ws01?xsd=1
在接口服务中添加复杂类型的参数或复杂类型的返回值后的wsdl文件是怎么描述的呢?
IMyService.java中添加方法:
@WebResult(name="user") public User getUserByUsername(@WebParam(name="username")String username);
User.java
public class User { private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public User(String username, String password) { super(); this.username = username; this.password = password; } public User() { super(); } }
http://localhost:8888/ws01?wsdl中对消息的描述是这样的:
http://localhost:8888/ws01?xsd=1中对变量的定义: