Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

PowerBuilder Examples

Web API Categories

ASN.1
AWS KMS
AWS Misc
Amazon EC2
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Key Vault
Azure Service Bus
Azure Table Service
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Code Signing
Compression
DKIM / DomainKey
DNS
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
EBICS
ECC
Ed25519
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
GMail SMTP/IMAP/POP
Geolocation
Google APIs
Google Calendar
Google Cloud SQL
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text
HTTP

HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
MS Storage Providers
Microsoft Graph
Misc
NTLM
OAuth1
OAuth2
OIDC
Office365
OneDrive
OpenSSL
Outlook
Outlook Calendar
Outlook Contact
PDF Signatures
PEM
PFX/P12
PKCS11
POP3
PRNG
REST
REST Misc
RSA
SCP
SCard
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
ScMinidriver
SharePoint
SharePoint Online
Signing in the Cloud
Socket/SSL/TLS
Spider
Stream
Tar Archive
ULID/UUID
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(PowerBuilder) SOAP Request to fseservicetest.sanita.finanze.it with Smart Card Authentication (TS-CNS Italian Card)

Demonstrates sending a SOAP request to fseservicetest.sanita.finanze.it with Smart Card (TS-CNS Italian Card).

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

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_Cert
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
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if
loo_Xml = create oleobject
li_rc = loo_Xml.ConnectToNewObject("Chilkat_9_5_0.Xml")

li_Success = 0

// --------------------------------------------------------------------------------
// Also see Chilkat's Online WSDL Code Generator
// to generate code and SOAP Request and Response XML for each operation in a WSDL.
// --------------------------------------------------------------------------------

// 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
li_rc = loo_Req.ConnectToNewObject("Chilkat_9_5_0.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")

// Load the default certificate from the smartcard currently in the reader.
// (This assumes only one reader with one smartcard containing one certificate.
// If the situation is more complex, you can do it with Chilkat, but it requires
// using the Chilkat certificate store object to get the desired certificate
// from the desired smart card.)
// 
// Note: This is for Windows-only.
loo_Cert = create oleobject
li_rc = loo_Cert.ConnectToNewObject("Chilkat_9_5_0.Cert")

li_Success = loo_Cert.LoadFromSmartcard("")
if li_Success = 0 then
    Write-Debug loo_Cert.LastErrorText
    destroy loo_Http
    destroy loo_Xml
    destroy loo_Req
    destroy loo_Cert
    return
end if

// Tell the Chilkat HTTP object to use the certificate for client authentication.
li_Success = loo_Http.SetSslClientCert(loo_Cert)
if li_Success = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_Xml
    destroy loo_Req
    destroy loo_Cert
    return
end if

loo_Http.TlsVersion = "TLS 1.1"

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
    destroy loo_Cert
    return
end if

loo_XmlResp = create oleobject
li_rc = loo_XmlResp.ConnectToNewObject("Chilkat_9_5_0.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_Cert
destroy loo_XmlResp

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.