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
(PowerBuilder) SOAP Request to fseservicetest.sanita.finanze.it with Basic AuthenticationDemonstrates sending a SOAP request to fseservicetest.sanita.finanze.it with Basic Authentication.
integer li_rc oleobject loo_Http oleobject loo_Xml integer li_Success string ls_SoapEnvelope string ls_Domain string ls_Path oleobject loo_Req oleobject loo_Resp oleobject loo_XmlResp // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Http = create oleobject // Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0 li_rc = loo_Http.ConnectToNewObject("Chilkat.Http") if li_rc < 0 then destroy loo_Http MessageBox("Error","Connecting to COM object failed") return end if loo_Xml = create oleobject // Use "Chilkat_9_5_0.Xml" for versions of Chilkat < 10.0.0 li_rc = loo_Xml.ConnectToNewObject("Chilkat.Xml") li_Success = 0 // Create the SOAP envelope... loo_Xml.Tag = "soapenv:Envelope" loo_Xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/") loo_Xml.AddAttribute("xmlns:stat","http://statoconsensirichiesta.xsd.fse.ini.finanze.it") loo_Xml.AddAttribute("xmlns:tip","http://tipodatistatoconsensi.xsd.fse.ini.finanze.it") loo_Xml.UpdateChildContent("soapenv:Header","") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoUtente","XXXXXXAAABBBCCC") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:pinCode","...") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoOrganizzazione","999") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:StrutturaUtente","123456789") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:RuoloUtente","ZZZ") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:ContestoOperativo","") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoGenitoreTutore","") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:PresaInCarico","true") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:TipoAttivita","READ") loo_Xml.UpdateChildContent("soapenv:Body|stat:StatoConsensiRichiesta|stat:IdentificativoAssistitoConsenso","ABCDEFGHIJKLM") ls_SoapEnvelope = loo_Xml.GetXml() ls_Domain = "fseservicetest.sanita.finanze.it" ls_Path = "/FseInsServicesWeb/services/fseStatoConsensi" loo_Req = create oleobject // Use "Chilkat_9_5_0.HttpRequest" for versions of Chilkat < 10.0.0 li_rc = loo_Req.ConnectToNewObject("Chilkat.HttpRequest") loo_Req.HttpVerb = "POST" loo_Req.SendCharset = 0 loo_Req.AddHeader("Content-Type","application/soap+xml; charset=utf-8") loo_Req.Path = ls_Path li_Success = loo_Req.LoadBodyFromString(ls_SoapEnvelope,"utf-8") // User name and Password for Basic Authentication loo_Http.Login = "XXXXXXAAABBBCCC" loo_Http.Password = "MYPASSWORD" loo_Resp = loo_Http.SynchronousRequest(ls_Domain,443,1,loo_Req) if loo_Http.LastMethodSuccess = 0 then Write-Debug loo_Http.LastErrorText destroy loo_Http destroy loo_Xml destroy loo_Req return end if loo_XmlResp = create oleobject // Use "Chilkat_9_5_0.Xml" for versions of Chilkat < 10.0.0 li_rc = loo_XmlResp.ConnectToNewObject("Chilkat.Xml") li_Success = loo_XmlResp.LoadXml(loo_Resp.BodyStr) Write-Debug loo_XmlResp.GetXml() destroy loo_Resp destroy loo_Http destroy loo_Xml destroy loo_Req destroy loo_XmlResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.