用友EAI二次开发
2010-11-17 20:45
246 查看
首先确定http:// + sHttpServer + /U8EAI/import.asp可以访问,如:
http://localhost:8080/U8EAI/import.asp
打印如下信息
为了测试方便,新建C/S架构的项目,在一个界面拖入两个Button控件,名称缺省,分别写上如下代码:
http://localhost:8080/U8EAI/import.asp
打印如下信息
<?xml version="1.0" encoding="utf-8" ?> <ufinterface roottag="return" docid="" proc=""> <item key="" succeed="1" dsc="XML" /> </ufinterface> |
void Button1Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); sb.Append("<ufinterface sender=/"001/" receiver=/"u8/" roottag=/"department/" docid=/"/" proc=/"Query/" codeexchanged=/"n/">") .Append("<department importfile=/"/" exportfile=/"/" code=/"011/" bincrementout=/"n/">") .Append("<field display=/"部门编码/" name=/"cDepCode/" operation=/"=/" value=/"1/" logic=/"/" /> ") .Append("</department>") .Append("</ufinterface>"); XmlDocument dom = new XmlDocument(); dom.LoadXml(sb.ToString()); MSXML2.XMLHTTPClass xmlHttp = new MSXML2.XMLHTTPClass(); xmlHttp.open("POST", "http://localhost:8080/U8EAI/import.asp", false, null, null); xmlHttp.send(dom.OuterXml); String responseXml = xmlHttp.responseText; MessageBox.Show( responseXml ); System.Runtime.InteropServices.Marshal.FinalReleaseComObject(xmlHttp); //COM释放 } |
void Button2Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); sb.Append("<ufinterface sender=/"001/" receiver=/"u8/" roottag=/"department/" docid=/"/" proc=/"Query/" codeexchanged=/"n/">") .Append("<department>") .Append("</department>") .Append("</ufinterface>"); XmlDocument dom = new XmlDocument(); dom.LoadXml(sb.ToString()); MSXML2.XMLHTTPClass xmlHttp = new MSXML2.XMLHTTPClass(); xmlHttp.open("POST", "http://localhost:8080/U8EAI/import.asp", false, null, null); xmlHttp.send(dom.OuterXml); String responseXml = xmlHttp.responseText; MessageBox.Show( responseXml ); System.Runtime.InteropServices.Marshal.FinalReleaseComObject(xmlHttp); //COM释放 } |
相关文章推荐
- 用友二次开发,用友EAI案例分析
- U850EAI二次开发说明,用友EAI二次开发说明下载
- 用友二次开发
- 关于二次开发用友项目的一点体会
- U8界面按钮二次开发手册,用友界面二次开发手册.pdf下载
- 正式做用友二次开发
- U8二次开发规范,用友二次开发规范.pdf下载
- 用友nc65 uap开发刷新按钮二次开发
- 用友二次开发 用友控件 Js宿主脚本 调用用友T6 登录 参照 控件示例
- 在用友 做二次开发 对技术有提升吗?
- 推荐一个开源基于JavaScript和Openlayers开发的webgis二次开发控件,并赠送电子和卫星影像地图
- 基于Visio的二次开发
- TFS二次开发-基线文件管理器(1)-设计
- kettle 二次开发技巧
- ecshop二次开发之百度地图
- 二次开发的基本要求
- 五、Sketchup用ruby进行二次开发--创建图形(面及pushpull、followMe方法的应用)
- ecshop二次开发--单点登录
- 我的ECshop二次开发从零开始
- C# AutoCAD 二次开发相关问题 "被呼叫方拒绝接收呼叫"