sending xml via post, https request with certifica - WeOnlyDo Discussion board

sending xml via post, https request with certifica (General questions)

by genzel, Monday, February 09, 2009, 14:41 (5765 days ago)

Hello,
is there a example available for our requirement.
If this is possible, we will buy the wodHttpDLX component.

We're reading the cert container with the function below.
Function get_certbyCN(iStoreNbr As Integer, strCommonName As String) As Certificate
' T.Genzel 2009
' Store 10 = Andere Personen (other persons)
Dim Location As CertLocation
Dim cert As Certificate

Dim i As Integer
Dim j As Integer


Set Location = New CertLocation
j = Location(0).Item(iStoreNbr).Count

For i = 0 To j - 1
Set cert = Location(0).Item(iStoreNbr).Item(i)
If (strCommonName = cert.CommonName) Then
Set get_certbyCN = cert
Exit Function
End If
Next i
get_certbyCN = cert
End Function


function http(data)
Set cert = get_certbyCN(10, customerdomain )


whttp.URL = https://www.customerdomain.com/request/

whttp.Timeout = 10
whttp.port = 443

whttp.Login = Cust
whttp.Password = CustomerPwd

Set whttp.Certificate = cert


whttp.Post https://www.customerdomain.com/request
Debug.Print whttp.State
Debug.Print whttp.Response.StatusCode
Debug.Print whttp.Response.Status
Debug.Print whttp.LastError & / & whttp.LastErrorText


end function

Two problems:
1.) got an error on loading cert
2.) sending is not possible

We need to send a XML via https method post with cert and login information.

Maybe there is a example from weonlydo

[:smile:]

Thanks for help.

Best reagards,
Torsten


Complete thread: