import org.datacontract.schemas._2004._07.contracts.*;
import com.microsoft.schemas._2003._10.serialization.*;
import org.tempuri.*;
public class test {
/**
* @param args
*/
public static void main(String[] args) {
//使用ObjectFactory帮助生成实体类对象
org.datacontract.schemas._2004._07.contracts.ObjectFactory factory=new org.datacontract.schemas._2004._07.contracts.ObjectFactory();
Employee emp=factory.createEmployee();
//设置属性,同样使用ObjectFactory帮助设置,因为这里的类型有别与基础类型
emp.setId(factory.createEmployeeId("dev001"));
emp.setName(factory.createEmployeeName("James White"));
emp.setDepartment(factory.createEmployeeDepartment("Development"));
//调用的方法略显古怪,需要注意
EmployeeManagement empManagement=new EmployeeManagement();
IEmployeeManagement iempManagement=empManagement.getBasicHttpBindingIEmployeeManagement();
SalaryDetail salaryDetail=iempManagement.getSalaryOfLastMonth(emp);
//输出结果
System.out.println("Employee ID:"+salaryDetail.getId().getValue());
System.out.println("Salary Date:"+salaryDetail.getDate().getMonth());
System.out.println("Salary:"+salaryDetail.getSalary().toString());
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有