Delphi calls WebService (. NET C # Edition)

Source: Internet
Author: User

1 usesxmlintf, xmldoc;2 3  4 5Xml toxtr File Conversion6 7  8 9 1, file-->Open Opens the XML file you want to parseTen 2, select the point you want to analyze on the left, double-click the conversion list in the middle One 3, create-->Datapacket from XML A 4, Create andTest Transformation - 5、file-->save-->transformation get a. xtr file - 6, open the. xtr file, and the first line finds "><selecteach dest=" Datapacket\rowdata\row "from=" \envelope\body\......> the put ' soap: ', ' diffgr: ' Delete, save - 7, xmltransformprovider->transformread->Transformationfile point to A. xtr file - 8, set the ProviderName property of the ClientDataSet1 -  +===== Client ============================================================== -  + must first A  at Cemai. Getcemaisoap; -  -============= -  - procedureTmainfrm.button1click (sender:tobject); - begin inedit1.text:=Xtrpath; -HttpRIO1.HTTPWebNode.Agent: ='Borland SOAP 1.2'  ; toHttpRIO1.HTTPWebNode.UseUTF8InHeader: =True; +HttpRIO1.Converter.Options: = HttpRIO1.Converter.Options +[Soutf8inheader, Soutf8encodexml]; -HttpRIO1.Converter.Options: =[Sosendmultirefobj, Sotryallschema, Sorootrefnodestobody, Soutf8inheader, Socachemimeresponse, SoUTF8EncodeXML] ; theHttpRio1.Converter.Encoding: ='Utf-8' ; *Httprio1.url: =Defurl; $(HTTPRIO1 ascemaisoap). GetDataSet (key,ssql);Panax Notoginseng End; -  the========================= +  A procedureTmainfrm.httprio1afterexecute (Constmethodname:string; the soapresponse:tstream); + var - xmldoc:ixmldocument; $ begin $Soapresponse.position: =0; -Clientdataset1.active: =FALSE; -Soapresponse.position: =0; the  -XmlDoc: =newxmldocument;WuyiXmldoc.encoding: ='UTF8'; theSoapresponse.position: =0; - Xmldoc.loadfromstream (soapresponse); WuXmldoc.savetofile ('C:\max.xml');//Save the XML file to the root directory -  AboutXMLTransformProvider1.TransformRead.SourceXmlDocument: =xmldoc.getdomdocument; $XMLTransformProvider1.TransformRead.TransformationFile: =Edit1.text; - Clientdataset1.open; -Clientdataset1.active: =TRUE; -  A End; +  the===== Service unit, automatically generate ================================= -  $ Service Unit, must add a sentence at the initialization place.  the  the initialization theInvregistry.registerinvokeoptions (TypeInfo (Cemaisoap), iodocument);

Delphi calls WebService (. NET C # Edition)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.