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)