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

DataFlex 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
Cloud Signature CSC
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
Secrets
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
uncategorized

 

 

 

(DataFlex) SOAP Request to fseservicetest.sanita.finanze.it with Basic Authentication

Demonstrates sending a SOAP request to fseservicetest.sanita.finanze.it with Basic Authentication.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

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.