webservice接口:
在两个项目中都有webservice接口,实现与第三方的erp或crm系统进行数据交互,两个项目接口的区别是一个需要头文件的账号密码验证,另一个不需要。
一、本地导入.wsdl文件,生成本地类;
package com.wxbusiness.utils;
import com.wxbusiness.webservice.customer.CustomerDTO;
import com.wxbusiness.webservice.customer.CustomerResult;
import com.wxbusiness.webservice.customer.CustomerService_PortType;
import com.wxbusiness.webservice.customer.CustomerService_Service;
import com.wxbusiness.webservice.customer.CustomerService_ServiceLocator;
/**
* WebService接口
*/
public class WebService {
/**
* 功能模块初始化
*/
/**
* 初始化数据 crm模块
*/
public static CustomerService_PortType customerCp(){
//crm模块
CustomerService_ServiceLocator css = new CustomerService_ServiceLocator();
css.setCustomerSoapServiceImplPortEndpointAddress("http://"+IP+"/crm/customerservice");
CustomerService_Service cs = css;
//接口集
CustomerService_PortType cp;
try {
cp = cs.getCustomerSoapServiceImplPort();
return cp;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 具体方法
*/
public s