我爱Aspx >> Asp.Net >> 在运行时使用 UDDI (微软)现在,我们可以开始对应用程序本身进行编码。首先需要创建一个文本框、一个标签、一个按钮和两个日期时间选择器。然后建立一些全局变量: //应用程序的一些变量 private string InquiryURL = null; private string bindingKey = null; private string accessPoint = null; private BindingTemplate bt; private double salesFigure = 0;
窗体被实例化以后,我们需要初始化以下变量: public Form1() { // //Windows 窗体设计器支持所必需 // InitializeComponent(); //从配置文件导入变量 InquiryURL = ConfigurationSettings.AppSettings["UDDI_URL"]; bindingKey = ConfigurationSettings.AppSettings["bindingKey"]; bool InitCache = RefreshCacheFromUDDI(); if ( InitCache == true ) accessPoint = bt.AccessPoint.Text; }
RefreshCacheFromUDDI() 函数用于查询 UDDI 服务器以查找入口点。使用 UDDI SDK 执行 UDDI API 调用 (GetBindingDetail),将 bindingKey 作为参数传递。 private bool RefreshCacheFromUDDI() { //使用 UDDI SDK,设置 UDDI 入口点 Inquire.Url = InquiryURL; //创建 get_bindingDetail UDDI API 消息 GetBindingDetail gbd = new GetBindingDetail(); //添加 bindingKey gbd.BindingKeys.Add( bindingKey ); try { BindingDetail bd = gbd.Send(); //如果成功,则使用返回集合中的第一个模板 //更新 bindingTemplate 对象 bt = bd.BindingTemplates[0]; return true; } catch (Exception err) { textBox1.Text += err.Message; return false; } }
Ҷƪл˵?
使用 UDDI 的 Web 服务描述和发现..[05-28]
使用 UDDI 的 Web 服务描述和发现..[05-28]
微软基于Web计算的框架结构分析(..[05-28]
微软的文章:what are xml web se..[05-28]
微软SQL Server 2000 Reporting ..[05-28]
利用微软WebService技术实现远程..[05-28]
不使用VS.NET集成开发环境,调用..[05-28]
关于论坛上那个SQL微软面试题。我..[05-22]
微软推预览版SQL Server 2005[05-22]
微软要增强SQL 2005安全功能[05-22]
实战Web服务[05-28]
WSDL文件详解(转贴)中[05-28]
WSDL文件详解(转贴)上[05-28]
Web Service描述语言 WSDL 详解(..[05-28]
Web Service描述语言 WSDL 详解(..[05-28]
Web Service——下一代的WWW[转..[05-28]
WEB服务有待实践的检验[转][05-28]
使用 UDDI 的 Web 服务描述和发现..[05-28]
使用 UDDI 的 Web 服务描述和发现..[05-28]
Microsoft SOAP Toolkit 2.0介绍..[05-28]