Delphi 6 UPDATE 2 meaning

zhaozj2021-02-08  228

Delphi 6.02 preemptive research - Four of BizSnap / SOAP / WebService

- The meaning of patch 2 #

Borland released the second patch of C Builder 6 and Delphi 6. This is a very important patch for Delphi 6, not only fixes some problems in Delphi 6, but also highly enhanced the function of Delphi 6, especially in SOAP / Web Service development. The above picture shows the new new web service page, compared to the patch (see "Delphi 6) - BizSnap / SOAP / WebService - an example of Hello World!, Etc.), in addition to the icon all (Now with C Builder 6), it also adds a: SOAP Server Interface Wizard, this is a wizard of a new SOAP server interface. In the previous introduction, new SOAP server interface needs to write a lot of code. With this wizard, you can save a lot. Because there is a SOAP Server Interface Wizard, you will automatically ask if a server interface is generated when newing a Web Service app is now created, as shown above. In addition to the development of multi-layer application development with SOAP, it is to create a new interface. The wizard dialog of the new service interface is shown below. Simultaneous examples of "Delphi 6 preemptive - BizSnap / SOAP / WebService - an example of a Hello World!" PAS and SOAPHELLOIMPL.PAS, the interface definition and interface implementation units for this interface.

The following SoapHelloIntf.pas unit content: {Invokable interface ISoapHello} unit SoapHelloIntf; interfaceuses InvokeRegistry, Types, XSBuiltIns; type {Invokable interfaces must derive from IInvokable} ISoapHello = interface (IInvokable) [ '{3A9E6BD6-F128-40AD-B9F1- FB254C463CCC} '] {Methods of Invokable interface must not use the default} {calling convention; stdcall is recommended} end; implementationinitialization {Invokable interfaces must be registered} InvRegistry.RegisterInterface (TypeInfo (ISoapHello));. end is less SoapHelloImpl.pas content unit: {Invokable implementation File for TSoapHello which implements ISoapHello} unit SoapHelloImpl; interfaceuses InvokeRegistry, Types, XSBuiltIns, SoapHelloIntf; type {TSoapHello} TSoapHello = class (TInvokableClass, ISoapHello) public end; implementationinitialization {Invokable classes must be registered} InvRegistry .Registerinvokableclass (tsoaphello); END. Then, only need to add the definition and implementation of the required interface method in these two units, you can complete a server interface, which is more convenient than it. This is just a change in the surface. In the first example of this chapter, if you enter http://localhost/soap/soaptest.dll, you can't see anything, you must enter http://localhost/soap/soaptest.dll/ WSDL can see the WSDL list of all interfaces. But after the Delphi 6 patch 2 recompiled this example, you can see http: //localhost/soap/soaptest.dll displays a beautiful page, which is similar to SOAP development with Visual Studio.net. The http: //localhost/soap/soaptest.dll/wsdl page is also different from the original.

However, this is not the most important change, see http://localhost/soap/isoaptest.dll/wsdl/isoaphello page, with some small changes in front of WSDL, and this is the most important This improvement finally lets the Web Service application developed by Delphi 6 can be called by the client program developed by Visual Studio.net! Below is the new WSDL file: <

转载请注明原文地址:https://www.9cbs.com/read-2662.html

New Post(0)