我必须与第三方Web服务集成,他们在VB.NET中向我们发送一个示例。我不知道我怎么能在Delphi中做同样的事情。我的值为" URL_WS"," CERTIFICADO_WS"和" CONFIG_STRING"
VB.NET例子:
Dim ServiceEndpoint = New EndpointAddress(New Uri(URL_WS),
EndpointIdentity.CreateDnsIdentity(CERTIFICADO_WS)
Dim Binding = New WSHttpBinding()
Binding.Security.Mode = SecurityMode.Message
Binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName
Dim result = New Integracao.IintegracaoClient(Binding, ServiceEndpoint)
result.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
Security.X509CertificateValidationMode.None
result.ClientCredentials.UserName.UserName = CONFIG_STRING
result.ClientCredentials.UserName.Password = ""