Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) SOAP Request to fseservicetest.sanita.finanze.it with Basic AuthenticationDemonstrates sending a SOAP request to fseservicetest.sanita.finanze.it with Basic Authentication.
Use ChilkatAx-win32.pkg Procedure Test Handle hoHttp Handle hoXml Boolean iSuccess String sSoapEnvelope String sDomain String sPath Variant vReq Handle hoReq Variant vResp Handle hoResp Handle hoXmlResp String sTemp1 Boolean bTemp1 // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End Get Create (RefClass(cComChilkatXml)) To hoXml If (Not(IsComObjectCreated(hoXml))) Begin Send CreateComObject of hoXml End Move False To iSuccess // Create the SOAP envelope... Set ComTag Of hoXml To "soapenv:Envelope" Get ComAddAttribute Of hoXml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/" To iSuccess Get ComAddAttribute Of hoXml "xmlns:stat" "http://statoconsensirichiesta.xsd.fse.ini.finanze.it" To iSuccess Get ComAddAttribute Of hoXml "xmlns:tip" "http://tipodatistatoconsensi.xsd.fse.ini.finanze.it" To iSuccess Send ComUpdateChildContent To hoXml "soapenv:Header" "" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoUtente" "XXXXXXAAABBBCCC" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:pinCode" "..." Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoOrganizzazione" "999" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:StrutturaUtente" "123456789" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:RuoloUtente" "ZZZ" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:ContestoOperativo" "" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoGenitoreTutore" "" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:PresaInCarico" "true" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:TipoAttivita" "READ" Send ComUpdateChildContent To hoXml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoConsenso" "ABCDEFGHIJKLM" Get ComGetXml Of hoXml To sSoapEnvelope Move "fseservicetest.sanita.finanze.it" To sDomain Move "/FseInsServicesWeb/services/fseStatoConsensi" To sPath Get Create (RefClass(cComChilkatHttpRequest)) To hoReq If (Not(IsComObjectCreated(hoReq))) Begin Send CreateComObject of hoReq End Set ComHttpVerb Of hoReq To "POST" Set ComSendCharset Of hoReq To False Send ComAddHeader To hoReq "Content-Type" "application/soap+xml; charset=utf-8" Set ComPath Of hoReq To sPath Get ComLoadBodyFromString Of hoReq sSoapEnvelope "utf-8" To iSuccess // User name and Password for Basic Authentication Set ComLogin Of hoHttp To "XXXXXXAAABBBCCC" Set ComPassword Of hoHttp To "MYPASSWORD" Get pvComObject of hoReq to vReq Get ComSynchronousRequest Of hoHttp sDomain 443 True vReq To vResp If (IsComObject(vResp)) Begin Get Create (RefClass(cComChilkatHttpResponse)) To hoResp Set pvComObject Of hoResp To vResp End Get ComLastMethodSuccess Of hoHttp To bTemp1 If (bTemp1 = False) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatXml)) To hoXmlResp If (Not(IsComObjectCreated(hoXmlResp))) Begin Send CreateComObject of hoXmlResp End Get ComBodyStr Of hoResp To sTemp1 Get ComLoadXml Of hoXmlResp sTemp1 To iSuccess Get ComGetXml Of hoXmlResp To sTemp1 Showln sTemp1 Send Destroy of hoResp End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.