DELPHI6抢先研究:WebService/SOAP版的Hello world

Delphi6异形窗体设计大师课程 本文还有配套的精品资源,点击获取 简介:Delphi6是一个受开发者欢迎的集成开发环境,它允许通过自定义窗体边缘和形状来创建异形窗体。本教程将介绍如何使用API函数和GDI/GDI+技术,通过Delphi的TForm类属性和事件处理程序,设计出具有独特形状和视觉效果的窗体界面,例如透明或半透明效果,以及圆角等非传统形状。掌握这些技术有助于提高Delphi6开发者的技能水平,... 阅读详情

 

SOAP 技术号称 Microsoft 之梦,也是 Borland 给 Delphi 6 定下的最大卖点, 可惜一直没能弄明白,虽然在6月14日的 DELPHI 6 上海发布会上见识过(见 《 Delphi 6 上海发布会》 ),但因为以前从未接触过,直到 DELPHI 6 即将推出前看了她的 New Feature 才知道有 SOAP 一说, 而且在6月14日之前还一直不知道所谓的 SOAP 是个什么东东, DELPHI 6 的帮助又太不详细,仅有的那两个 DEMO 又太过复杂, 而且还不是基于 HTTP 的,只好自己研究,最近这两天,总算有大突破,所以来此与大家分享:
鉴于DELPHI6自带的DEMO太复杂,我在这里写一个简单的HelloWorld,用Windows98+PWS实现:
服务端:
1.New¦WebServices¦SoapServerApplication,选ISAPI(如果你想试试 DELPHI6 新增的 Web App Debbuger,也可以选它,关于它我想另外再说);
2.SaveAll, Unit1命名为:MainWM,Project1命名为:SoapTest;
3.在MainWM中的Uses中加入:InvokeRegistry
4.自定义一个接口,及其对应类的实现:
  ISoapHello = Interface ( IInvokable )
  ['{6DF34980-6FFC-11D5-9E62-0050BABD8FE1}']  //  这个GUID你自己用 Ctrl+Shift+G 产生
    Function GetHello( aID : Integer ) : WideString; StdCall;
  End;

  TSoapHello = Class ( TInvokableClass, ISoapHello )
  Protected
    Function GetHello( aID : Integer ) : WideString; StdCall;
  End;
5.实现GetHello函数:
Function TSoapHello.GetHello( aID : Integer ) : WideString;
Begin
  If ( aID = 1 ) Then
    Result := 'Hello world!'
  Else
    Result := 'Error ID!';
End;
6.注册接口和类:
Initialization
  InvRegistry.RegisterInterface( TypeInfo( ISoapHello ) );
  InvRegistry.RegisterInvokableClass( TSoapHello );
7.编译之即可产生:SoapTest.dll

启动PWS,设置虚拟目录soap为soaptest.dll所在的目录,权限为执行
打开IE,输入URL为:http://localhost/soap/soaptest.dll/wsdl
即可看到一个表格,显示了此SOAP服务(即所谓的Web Service)所提供的WSDL
其中应该有我们自定义的接口:ISoapHello
点其链接将返回一个XML文档

客户端:
1.New¦Application
2.SaveAll,Unit1命名为ClnMain,Project1命名为SoapClient
3.New¦WebServices¦WebServicesImporter,在URL中输入:http://localhost/soap/soaptest.dll/wsdl/isoaphello,如果上面用IE看没错的话,这时确定后将产生一个单元,其中有我们在服务端定义的接口
4.SaveAll,Unit1命名为SoapIntf,再在ClnMain中Uses加入SoapIntf
5.在Form1上放上Edit, Label, Button, HTTPRIO(在Web Services页中的第一个)四个控件,设置HTTPRIO1.URL为:http://localhost/delphi6/soap/soaptest.dll/soap
6.双击Button1输入下面的程序:
Var
  p : ISoapHello;
begin
  p := HTTPRIO1 As ISoapHello;
  Label1.Caption := p.GetHello( StrToInt( Edit1.Text ) );
end;
7.编译运行,在Edit1中输入"1"按Button1,Label1将显示"Hello world!"
输入其它数字将显示"Error ID!"

SOAP so easy.
^_^

我主页上此文带图片http://mental.top263.net/mentals/tech/delphi/d6_soap1.htm

老古董delphi6企业版update2补丁包 老古董delphi6的程序,编译必备升级包,不好找了,传一份上来。 立即下载

相关推荐

Delphi编写soap服务器与客户端程序

Delphi编写soap服务器与客户端程序

【SOAP-WebService系列】SOAP学习笔记

SOAP(Simple Object Access Protocol,即简单对象访问协议) ,是一个轻量级协议,用于在分散的分布式环境中使用XML在对等体之间交换结构化和类型化的信息。或者更简单地说:SOAP是一个基于XML的通信协议(SOAP被认为是第二代XML协议,第一代具有代表性的技术叫XML-RPC)。

一个老码农 2891

Delphi/Kylix SOAP/WEB SERVICE程序设计配书代码

Delphi/Kylix SOAP/WEB SERVICE程序设计配书代码

delphi6安装手册

②点击菜单栏Component→Intall Packages→点击Add 將控件包projects中的文件夹Bpl中的文件全部选中打开。→点击Greyed items..下的省略号小图标→分别选中KinComlib、KinComRxlib、KinLib三个文件夹,点击Add添加。选择:set up→语言及开发工具→DELPHI6→双击图标install.exe 先后安装Delphi6和TeamSource。①将控件包下的四个文件夹复制到delphi安装路径下的delphi6文件夹中。

男神的专栏 2079

实战Delphi6.Kylix2.SOAP.Web Service程序设计篇李维著.zip

实战Delphi6.Kylix2.SOAP.Web Service程序设计篇李维著.zip

delphi 6/Kylik2 soap/Web Service程序设计篇下册+代码,非常好的教程。

delphi 6/Kylik2 soap/Web Service程序设计篇下册+代码,非常好的教程。

用Delphi编写Web Service(实例)

1. File->New->Other,在打开的对话框中,选择Web Services/SOAP Server Application。2. 在这里选择ISAPI DLL。3. 问咱Create Interface for SOAP module,当然是yes啦,然后输入个名称XXX,等下会生成XXXIntf.pas和XXXImple.pas这两个文件,分别对应接口和类的实现。在这里,对外

Sono simpatico... 1万+

Delphi 经典珍藏只 Delphi 6.0安装盘

Delphi 经典珍藏只 Delphi 6.0安装盘

039_《Delphi6.Kylix2.SOAP.Web Service程序设计篇》

本书是专门讨论Delphi 6中SOAP/Web Service新技术的使用书籍。主要内容包括:SOAP/Web Service技术介绍、SOAP功能规范、各种SOAP/Web Service应用技术和架构的讨论、结合数据库的SOAP/Web Service应用系统的开发等等。 本书内容深入浅出,实用性强,是一本SOAP/Web Service技术的完整指南。本书所附光盘包括书中的所有示例代码。本书中文简体字版由李维通过北京宝兰-英博思信息技术有限公司授权机械工业出版社在中国大陆境内独家出版发行,未经出版者

敦格 3572

手把手教你用CODESYS将旧笔记本改造成软PLC(含证书配置避坑指南)

本文提供了一份详尽的指南,教你如何利用CODESYS平台将闲置旧笔记本改造为一台功能完整的软PLC。内容涵盖从硬件评估、系统实时性优化、软件安装与驱动配置,到关键的证书授权管理避坑指南,旨在帮助自动化工程师和爱好者低成本搭建稳定可靠的学习与开发平台。

weixin_29190573的博客 290

调用D3D11硬解码和渲染VideoProcessor版本

在https://blog.csdn.net/robothn/article/details/78781321一文中使用shader来显示FFMPEG硬解码后的YUV420P,本文调用D3D11的videoprocessor来进行图像空间变换和尺寸变换,取得了较好的效果。 1.初始化D3D11设备、videodevice等数据结构 FFMPEG调用D3D11硬解码,获取其对应的device,videodevice。。。 FFMPEG使用av_hwdevice_find_type_by_name调用D3d11

zlyadvocate的博客 9307

delphi2010 开发及调试WebService 实例

delphi2010 开发及调试WebService 实例   基于Delphi的WebService编写   Delphi编写soap服务器与客户端程序   Delphi XE5通过WebService开发Web服务端和手机客户端   2017/03/02 -------------------------------------------------------------...

weixin_34194379的博客 563

Windows上使用Docker Desktop部署ClickHouse的完整指南

数据库的容器化部署已成为本地开发和测试的主流实践,尤其对于列式数据库这类对运行环境有严格要求的系统而言,容器技术能有效屏蔽底层差异。Docker Desktop 基于 WSL2 后端,在 Windows 上提供了接近原生的 Linux 运行环境,使得 ClickHouse 这类官方不支持 Windows 原生安装的分析型数据库,也能以标准方式快速启动。容器化带来的不仅是环境的轻量化隔离,更关键的是数据持久化与版本管理能力——通过挂载宿主机目录,即使容器被删除,业务数据依然安全留存,从而让本地环境与生产服务器

weixin_30983353的博客 245

Delphi入门教程

一、第一章Delphi6介绍 1.1概述 Delphi是基于Pascal语言的RAD快速应用程序开发工具(Rapid Application Development),为Windows系统下的可视化集成开发工具,它提供强大的VCL(Visual Component Library,可视化组件库) 特点: 1.强大的可视化编程环境 由3个部分组成:编辑器、调试器、和窗体设计器 ...

weixin_30340745的博客 1万+

ChatUI vs Ant Design X 技术选型对比

维度ChatUI优势轻量级、易上手、完美兼容 Ant Design全能型框架、企业级扩展性、深度模型集成局限性功能单一、缺乏高级交互支持学习曲线陡峭、包体积较大最佳实践单独聊天窗口集成整体智能助手系统开发通过对比可见,ChatUI 适合快速实现基础对话功能,而Ant Design X 更适合构建复杂的 AI 驱动应用。实际选择时需结合项目规模、团队技术栈和对交互复杂度的需求综合评估。

四楼没电梯的专栏 2272

手把手教你为FPGA项目集成HyperRAM IP核:从AXI接口封装到上板调试全流程

本文详细介绍了如何为FPGA项目集成HyperRAM IP核,涵盖从AXI接口封装到上板调试的全流程。通过对比DDR3L、PSRAM和HyperRAM的性能指标,突出HyperRAM在低功耗和小封装尺寸方面的优势,并提供硬件连接、AXI4-Lite接口设计、状态机优化及调试技巧等实用内容,帮助开发者高效完成FPGA项目中的内存扩展。

weixin_32103009的博客 289

DELPHI 6 抢先研究-- BizSnap/SOAP/WebService 之三 -- 用 SOAP 实现三层数据库应用

DELPHI 6 抢先研究-- BizSnap/SOAP/WebService 之三 -- 用 SOAP 实现三层数据库应用     在前面的例子(见 《DELPHI 6 抢先研究 -- BizSnap/SOAP/WebService 之一 -- 一个 Hello world! 的例子》 和《DELPHI 6 抢先研究-- BizSnap/SOAP/WebServi

猛禽的编程艺术 6095

Kali实战:LAMPSecurity CTF5靶场渗透全流程(附详细漏洞利用步骤)

本文详细解析了Kali Linux在LAMPSecurity CTF5靶场渗透中的全流程,包括靶场环境搭建、Web应用漏洞挖掘、横向移动与权限提升等关键步骤。通过实战案例演示了如何利用NanoCMS漏洞获取系统权限,并提供了详细的防御措施与加固建议,帮助安全人员提升渗透测试技能。

weixin_29230901的博客 213

DELPHI 6 抢先研究-- BizSnap/SOAP/WebService 之二

DELPHI 6 抢先研究-- BizSnap/SOAP/WebService 之二 -- 通过 SOAP 传递自定义类型数据     在前一个例子(见 《DELPHI 6 抢先研究 -- BizSnap/SOAP/WebService 之一 -- 一个 Hello world! 的例子》)中我们看到,通过 SOAP 可以很方便地进行远程对象调用,虽然那个例子用的对

猛禽的编程艺术 5179

bcftools学习笔记(一)

欢迎关注"生信修炼手册"!本篇主要介绍index, view, query, sort, reheader这五个命令。1. indexindex命令用于对VCF文件建立索...

庐州月光的博客 6017

K8s(十二):监控与报警(163邮箱+钉钉)-Prometheus + Grafana + Alertmanager(超详细)

🔴 K8s(十二):监控与报警(163邮箱+钉钉)-Prometheus + Grafana + Alertmanager(超详细)

✨ 欢迎来到【Seal ^_^ 的CSDN博客】!✨ 3万+

用Delphi开发Web Services数据库程序 (转)

用Delphi开发Web Services数据库程序 (转)[@more@]第一步:编写服务器的应用程序 首先在Delphi的ide中选择”File|New|Other…”,然后在webservices页面中选择SOAp ...

cuiji1279的博客 370

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Backbone笔记之二(Model/Collection)

ModelView的部分基本上就是这样了,现在开始来谈Model。Model其实就是一条数据记录。只不过它不是一般的静态数据记录,它不但可以不限定数据结构,还可以自动与后端交互,甚至还可以绑定事件以实现相应View的自动更新。最简单的Model就是这样:var Foo = Backbone.Model.extend({}); // 或是初始化默认数据 var Foo = Backbone.Mode

猛禽的编程艺术 2万+

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

下一篇: DELPHI 6 抢先研究-- BizSnap/SOAP/WebService 之二
猛禽
猛禽 领域专家: 操作系统技术领域 领域专家: 操作系统技术领域
博客等级 码龄26年 1003粉丝 263原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值