代码简单示例
global without sharing class InvIntegrationToOBSWebService {
webservice static ReturnResult bulkCreateProduct(List<InvProduct> invProductList) {
.....
}
global class InvProduct{
webservice String name; // 产品名称
webservice String delivery; // 交货周期
webservice String family; // 产品系列
webservice String productFamilyCode; // 产品系列代码
webservice String productCode; // 产品代码
webservice String quantityUnitOfMeasure; // 计量单位
webservice String category1; // 类型1
webservice String category2; // 类型2
webservice String category3; // 类型3
webservice Integer MOQ; // 最小订购量
webservice Integer MPQ; // 最小包装量
webservice String description; // 产品描述
webservice Boolean isActive; // 状态
}
}
下载企业级wsdl文件
下载Apex Class的wsdl文件
将文件另存到本地
使用SOAPUI测试
先导入企业级的wsdl文件
找到login接口,输入用户名密码
点击左上角的绿色三角箭头
将sessionId记录在本地,开始测试开发的接口
导入ApexClass的wsdl
携带SessionId以及请求的参数即可进行测试