1.界面布局(.face)
组件id:
证件类型>>下拉框:idtype
证件号>>文本组件:idno
名字>>文本组件:name
提交>>普通按钮:btn_submit
退出>>普通按钮:btn_exit
客户号>>数值组件:num_guestid
实现效果:输入数据通过报文发送给服务器,返回客户号
2.java代码:
package lzccb.trades.Tfgc;
import java.net.URLEncoder;
import com.siro.ef.*;
import com.siro.ef.util.*;
import com.siro.efs2.util.*;
import com.siro.efs2.event.*;
import com.siro.easybus.engine.util.*;
public class Tfgc extends ComponentAdvisorImpl {
public Canvas root;
public FormFieldComboBox idtype;
public FormLabel label_5;
public FormLabel label_6;
public FormFieldTextArea idno;
public ButtonButton btn_exit;
public ButtonButton btn_submit;
public FormFieldNumber num_guestid;
public FormLabel label_7;
public FormLabel label_8;
public FormFieldTextArea name;
public void init() throws Exception{
}
public void btn_submit_click(ButtonClickEvent e) throws Exception{
context=updatePageObjectToContext();
try
{
ProcessUtil.getInstance().executeProcess("lzccb/easybus/workflow/soap-fg.flow", context);
}
catch(Exception e1)
{
e1.printStackTrace();
throw new Exception("与核心通讯失败");
}
setComponentValue("num_guestid",context.get("getCifnoResult"));
}
public void btn_exit_click(ButtonClickEvent e) throws Exception{
destroy();
}
}
1.报文配置
请求报文:
Header,Body,getCifno字段默认设置为空字符串
响应报文:
4.适配器
5.公共流程文件(.flow)
报文拼装组件:报文配置文件>getCifnoRequest.packet
Http客户端组件:服务地址url>"http://172.18.65.70:7789/"
报文解析组件:报文配置文件>getCifnoResponse.packet
接着在资源目录下对下拉框的内容进行设置后,基本就结束了
然后进行测试:
1.运行 efs--WEB-INF--run.bat
2.运行client 的 efc.exe
开发工具:EasyFace智能前端系统(北京兴融公司)