Announcement Announcement Module
No announcement yet.
Passing Certs to WebServiceTemplate Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing Certs to WebServiceTemplate

    I need to contact a https url and fetch a response from it using webserviceTemplate.How do i pass the client side certificate because if i dont provide the cert i wont be able to contact the https site and fetch the response

  • #2
    I'm certainly not an expert, but since you want HTTPS security used, that means it has nothing to do with SOAP, only with its trasport protocol, namely HTTP(S). You achieve it the same way you would establish any kind of HTTPS communication - by configuring your HTTP client used.

    In case of Spring-WS lirbary, that means investigating "messageSender" property of your WebServceiTemplate class, and if you use essageSender, then you set your own HttpClient instance inside it which should be preconfigured to work with HTTPS with client cert. Take a look at Commons HttpClient site for info. AFAIR, you shloud have some AuthSSLProtocolSocketFactory found in some contrib library there.



    • #3
      Resolving AuthSSLProtocolSocketFactory

      The only way I've found to get access to this class is to get the source from Apache's repository. There was someone that posted a jar in a Maven repository, but it was unclear what their versioning meant.

      Have you found the "contrib" packages in more finished form?



      • #4

        I also downloaded the source. It's not problem as far as I remember.. It was only few files.