java webservice应用总结
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>LetterFeedback</name>
<serviceClass>com.megait.xzxk.webservice.IXzxkService</serviceClass>
<implementationClass>com.cicro.project.shfgw.ws.service.impl.LetterFeedbackService</implementationClass>
<style>wrapped</style>
<use>literal</use>
<scope>application</scope>
</service>
private static final Log log = LogFactory.getLog(LetterFeedbackService.class);
// 领导信箱: model_id = 1
// pur_id与tbmail.type映射
public static final Map<Integer, Integer> PURID2TYPE_MAPPING = new HashMap<Integer, Integer>();
static {
PURID2TYPE_MAPPING.put(10, 347);
PURID2TYPE_MAPPING.put(12, 352);
PURID2TYPE_MAPPING.put(2, 375);
PURID2TYPE_MAPPING.put(4, 0);
}
@Override
public List<StandardInfo> createObjList() throws AhDataException {
if (log.isInfoEnabled()) {
log.info("Letter Feedback Service Create start...");
}
List<StandardInfo> list = new ArrayList<StandardInfo>();
List<XSqBean> sqList = XSqManager.extractSqList();
StandardInfo info = null;
Tbmail tbmail = null;
Integer tbmailType = null;
if (sqList != null && !sqList.isEmpty()) {
for (SQBean sq : sqList) {
if (log.isInfoEnabled()) {
log.info("sq_id: " + sq.getSq_id());
}
tbmailType = PURID2TYPE_MAPPING.get(sq.getPur_id());
tbmail = new Tbmail();
tbmail.setId(sq.getSq_id());
tbmail.setName(sq.getSq_realname());
tbmail.setMail(sq.getSq_email());
tbmail.setAdr(sq.getSq_address());
tbmail.setTel(sq.getSq_phone());
tbmail.setFax("");
tbmail.setOther("");
tbmail.setType(tbmailType != null ? tbmailType.intValue() : 0);
tbmail.setTitle(sq.getSq_title2());
tbmail.setContent(sq.getSq_content2());
tbmail.setHf("");
tbmail.setHf1("");
tbmail.setHfqk("");
try {
tbmail.setDatetime(DateUtil.getDate(sq.getSq_dtime()));
} catch (ParseException e) {
if (log.isErrorEnabled()) {
log.error(e.toString());
}
}
tbmail.setLb("");
info = new StandardInfo();
info.setObjectInfo(encodeTbmail(tbmail));
info.setTitle(tbmail.getTitle());
info.setBusinesstype("上海发改委来信反馈");
info.setDetail(tbmail.getContent());
info.setBusinessresult("");
list.add(info);
XSqManager.updateSqExtracted(sq.getSq_id());
}
}
if (log.isInfoEnabled()) {
log.info("Create StandardInfo Size: " + list.size());
log.info("Letter Feedback Service Create End.");
}
return list;
}
public static void main(String[] args) throws Exception {
Service serviceModel = new ObjectServiceFactory().create(IXzxkService.class);
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
// String serviceUrl =
// "http://192.168.137.4:1104/services/LetterFeedback";
//String serviceUrl = "http://www.shfgw.gov.cn/services/ConsProject";
String serviceUrl = "http://www.shdrc.gov.cn/services/LetterFeedback";
IXzxkService xzxkService = (IXzxkService) factory.create(serviceModel, serviceUrl);
/* StandardInfo info = new StandardInfo();
WebXmSjjh xmSjjh = new WebXmSjjh();
xmSjjh.setXmbm("aaaaaaaa");
xmSjjh.setXmmc("bbbbbb");
xmSjjh.setXmfr("cccc");
xmSjjh.setJsnr("dddd");
xmSjjh.setJsgm("中国一哥");
xmSjjh.setPfsj(new Date());
xmSjjh.setSpwh("是不是");
xmSjjh.setXmlb("项目建议书");
xmSjjh.setSpwj("yyyyy");
xmSjjh.setSqh("ab活期");
xmSjjh.setXmlx("7");
info.setObjectInfo(encodeWebXmSjjh(xmSjjh));
List<StandardInfo> list = new ArrayList<StandardInfo>();
list.add(info);
*/
// xzxkService.deliverObjList(list);
List<StandardInfo> list= xzxkService.createObjList();
System.out.println(list.size());
}
java webservice应用总结相关推荐
- Java WebService 接口的简单生成和调用
Java WebService 接口的简单生成和调用 1.打开eclipse创建普通的java项目,写一个类 如下: package com.jspweb.ws;import javax.jws.W ...
- java webservice用户验证_使用java webservice的.net4.0 web app需要Usernametoken身份验证
我是使用.net 4.0 VS2010的新手.我需要使用java web服务并发送usernametoken自定义身份验证来访问服务,这是我很容易在VS2005中使用WSE2.0,那么在net 4.0 ...
- Java webservice 将晦涩难懂的参数名修改为容易理解的名称
Java webservice 接口方法默认的参数名让访问者摸不着头脑,如果需要修改参数名,需要在与接口类同包下建一个 接口类名.aegis.xml的文件 <?xml version=&q ...
- c#调用带有安全认证的java webservice
最近使用c#调用另外一个同事写的java webservice耽误了很多时间,网上资料不太完整,走了很多弯路,希望对大家有帮助. 基本思路是 1.拼装soap使用http post ,主要将验证身份信 ...
- java webservice实例教程
原文:java webservice实例教程 源代码下载地址:http://www.zuidaima.com/share/1590350954564608.htm 最近在学习web services, ...
- 孔浩老师 java 微信_孔浩老师JAVA WebService教程
课程目录:01_webservice快速实例 02_wsimport的使用 03_wsdl和soap讲解(介入了tcpmon工具) 04_SOA的分析(纯属扯淡) 05_dtd讲解 06_schema ...
- java webservice 依赖_java开发webservice的几种方式
webservice的应用已经越来越广泛了,下面介绍几种在Java体系中开发webservice的方式,相当于做个记录. 1.Axis2 Axis是apache下一个开源的webservice开发组件 ...
- 从零开始学习 webservice第一集,java webservice简单实例入门教程
现在从零开始学习webservice 概念自己百度搜,总之,webservice就相当于一个接口,就像你走进了一家售货店,你不需要知道这家店怎么卖给你东西,你拿着钱去,说我要一包玉溪,人家就会给你返回 ...
- java webservice接口开发_搭建Soap webservice api接口测试案例系统
Eclipse下创建WebService项目,主要目的是作为Postman.soapUI等工具进行soap webservice 接口测试的案例. 本文基于Axis2框架,在eclipse环境下搭建w ...
最新文章
- 商汤等提出:统一多目标跟踪框架
- 详解|清华大学100页PPT:工业机器人技术详解
- 【kernel 中内存分配那点事】
- alive workers 数量为0的解决方案
- 64位Ubuntu kylin 16.04下使用DNW下载uboot到tiny4412的EMMC
- 1839行政领导学 (2)
- Python 第三方模块之 NumPy - 科学计算
- python中的content方法_content最新:python计算Content-MD5并获取文件的Content-MD5值方式_爱安网 LoveAn.com...
- 通过HP Loadrunner VuGen来录制安卓的应用
- 猎洞高手轻松变身Gsuite 超级管理员接管他人的 Gsuite 账户
- Vue:使用vue-json-excel导出数据到excel
- 易语言解析html实例,易语言总使用正则表达式实例解析
- Python的优点和缺点
- Building dependency tree… Done Package aptitude is not available, but is referred to by another pac
- js字符串根据某个特殊字符截取字符串
- 费率与利率的差别_费率是什么(利率和费率有啥区别?)
- 熬夜整理,五万字长文总结 C/C++ 知识点
- win11怎样修改开机音乐 windows11修改开机音乐的步骤教程
- 人体的神经系统结构图,身体的神经系统图片
- 支持向量机SVM(二)