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
(Tcl) SOAP Request to fseservicetest.sanita.finanze.it with Basic AuthenticationDemonstrates sending a SOAP request to fseservicetest.sanita.finanze.it with Basic Authentication.
load ./chilkat.dll # This example requires the Chilkat API to have been previously unlocked. # See Global Unlock Sample for sample code. set http [new_CkHttp] set xml [new_CkXml] set success 0 # Create the SOAP envelope... CkXml_put_Tag $xml "soapenv:Envelope" CkXml_AddAttribute $xml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/" CkXml_AddAttribute $xml "xmlns:stat" "http://statoconsensirichiesta.xsd.fse.ini.finanze.it" CkXml_AddAttribute $xml "xmlns:tip" "http://tipodatistatoconsensi.xsd.fse.ini.finanze.it" CkXml_UpdateChildContent $xml "soapenv:Header" "" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoUtente" "XXXXXXAAABBBCCC" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:pinCode" "..." CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoOrganizzazione" "999" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:StrutturaUtente" "123456789" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:RuoloUtente" "ZZZ" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:ContestoOperativo" "" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoGenitoreTutore" "" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:PresaInCarico" "true" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:TipoAttivita" "READ" CkXml_UpdateChildContent $xml "soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoConsenso" "ABCDEFGHIJKLM" set soapEnvelope [CkXml_getXml $xml] set domain "fseservicetest.sanita.finanze.it" set path "/FseInsServicesWeb/services/fseStatoConsensi" set req [new_CkHttpRequest] CkHttpRequest_put_HttpVerb $req "POST" CkHttpRequest_put_SendCharset $req 0 CkHttpRequest_AddHeader $req "Content-Type" "application/soap+xml; charset=utf-8" CkHttpRequest_put_Path $req $path set success [CkHttpRequest_LoadBodyFromString $req $soapEnvelope "utf-8"] # User name and Password for Basic Authentication CkHttp_put_Login $http "XXXXXXAAABBBCCC" CkHttp_put_Password $http "MYPASSWORD" # resp is a CkHttpResponse set resp [CkHttp_SynchronousRequest $http $domain 443 1 $req] if {[CkHttp_get_LastMethodSuccess $http] == 0} then { puts [CkHttp_lastErrorText $http] delete_CkHttp $http delete_CkXml $xml delete_CkHttpRequest $req exit } set xmlResp [new_CkXml] set success [CkXml_LoadXml $xmlResp [CkHttpResponse_bodyStr $resp]] puts [CkXml_getXml $xmlResp] delete_CkHttpResponse $resp delete_CkHttp $http delete_CkXml $xml delete_CkHttpRequest $req delete_CkXml $xmlResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.