Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.js

Visual Basic 6.0 Examples

Async
Certificates
ECC
Email Object
Encryption
FTP
HTML-to-XML/Text
Gzip
HTTP
IMAP
JSON
MHT / HTML Email
PEM
PFX/P12
Java KeyStore (JKS)
POP3
RSA Encryption
MIME
REST
SCP
SMTP
Socket/SSL/TLS
SSH Key
SSH
SFTP
Stream
Tar Archive
XML
XMP
Zip

More Examples...
Google APIs
Google Cloud Storage
Azure Cloud Storage
Amazon S3 (new)
Google Drive
ASN.1
PRNG
Amazon S3
Bounced Email
CSV
Diffie-Hellman
DKIM / DomainKey
DSA
NTLM
QuickBooks

 

 

 

 

 

 

 

(Visual Basic 6.0) HTTP SOAP 1.1 Request and Response using POST

Demonstrates a working SOAP 1.1 request and response using POST with a live server. You may try running this example with the URLs and data provided. See http://wsf.cdyne.com/WeatherWS/Weather.asmx?op=GetCityWeatherByZIP for details.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Dim http As New ChilkatHttp

Dim success As Long

'  Any string unlocks the component for the 1st 30-days.
success = http.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
    Text1.Text = Text1.Text & http.LastErrorText & vbCrLf
    Exit Sub
End If

Dim soapXml As New ChilkatXml

soapXml.Tag = "soap:Envelope"
success = soapXml.AddAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")
success = soapXml.AddAttribute("xmlns:xsd","http://www.w3.org/2001/XMLSchema")
success = soapXml.AddAttribute("xmlns:soap","http://schemas.xmlsoap.org/soap/envelope/")

soapXml.NewChild2 "soap:Body",""
success = soapXml.GetChild2(0)
soapXml.NewChild2 "GetCityWeatherByZIP",""
success = soapXml.GetChild2(0)
success = soapXml.AddAttribute("xmlns","http://ws.cdyne.com/WeatherWS/")
soapXml.NewChild2 "ZIP","60187"
soapXml.GetRoot2 

Text1.Text = Text1.Text & soapXml.GetXml() & vbCrLf

Dim req As New ChilkatHttpRequest
req.HttpVerb = "POST"
req.SendCharset = 0
req.AddHeader "Content-Type","text/xml; charset=utf-8"
req.AddHeader "SOAPAction","http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"
req.Path = "/WeatherWS/Weather.asmx"
success = req.LoadBodyFromString(soapXml.GetXml(),"utf-8")

http.FollowRedirects = 1

Dim resp As ChilkatHttpResponse
Set resp = http.SynchronousRequest("wsf.cdyne.com",80,0,req)
If (resp Is Nothing ) Then
    Text1.Text = Text1.Text & http.LastErrorText & vbCrLf
Else
    Dim xmlResponse As New ChilkatXml
    success = xmlResponse.LoadXml(resp.BodyStr)
    Text1.Text = Text1.Text & xmlResponse.GetXml() & vbCrLf

End If


 

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