Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending headers to a Web Service
Message
De
28/08/2012 09:36:31
 
 
À
28/08/2012 08:52:11
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01551683
Message ID:
01551692
Vues:
48
>One particular one Web Service I need to send data to requires us to send a header. This is a X509 certificate. For some kind of reason, we cannot send it using something like this:
>
>
>                    ' Adjust the URL
>                    loTheWebService.Url = Trim(lcURL)
>
>                    ' Create the certificate
>                    loX509Certificate = New X509Certificate(Convert.FromBase64String("TheCertificateHere"))
>
>                    ' Add the certificate
>                    loTheWebService.ClientCertificates.Add(loX509Certificate)
>
>                    ' Call the method
>                    lcXML = loTheWebService.TheMethod(lcXml)
>
>
>The reason is that they do not want to rely on the server to validate the certificate. They want to validate it at the code level. So, they are asking us to send it as part of the headers. When using high level, it is possible to add a header? If not, that would mean I would have to switch to a low level SOAP approach.

I *think* it is just a case of deriving from the SoapHeader class, adding a property for the certificate and then adding the header to the SoapMessage.Headers collection. But if the web service requires this then they should specify the exact required format for the header.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform