Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you can programatically load a keystore based using a KeyStore.Builder:</p> <p><a href="http://java.sun.com/j2se/1.5.0/docs/api/java/security/KeyStore.Builder.html#newInstance%28java.lang.String,%20java.security.Provider,%20java.io.File,%20java.security.KeyStore.ProtectionParameter%29" rel="nofollow noreferrer">http://java.sun.com/j2se/1.5.0/docs/api/java/security/KeyStore.Builder.html#newInstance%28java.lang.String,%20java.security.Provider,%20java.io.File,%20java.security.KeyStore.ProtectionParameter%29</a></p> <p>So maybe have a class that has a webservice template or extends it, then set the file path of the keystore on it in your spring config and make it an inizialing bean (@PostConstruct in Spring 3?) which then loads the keystore.</p> <pre><code>File f = new File(keyStorePath); KeyStore.Builder builder = KeyStore.Builder.newInstance("type",provider,file,protection); KeyStore keystore = builder.getKeyStore(); </code></pre> <p>Ok - to actually use it with your webservicetemplate i think it must be based around the keystore callback as documented here: <a href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/security.html#d0e4462" rel="nofollow noreferrer">http://static.springsource.org/spring-ws/sites/1.5/reference/html/security.html#d0e4462</a></p> <p>Or maybe by using the spring org.springframework.ws.transport.http.HttpsUrlConnectionMessageSender which you can set keystoremanager on. Then that can be used by your webservicetemplate.</p> <p>A bit like this:</p> <pre><code>&lt;bean id="template" class="org.springframework.ws.client.core.WebServiceTemplate"&gt; &lt;property name="messageSender"&gt; &lt;bean class="org.springframework.ws.transport.http.HttpsUrlConnectionMessageSender"&gt; &lt;property name=""&gt;&lt;/property&gt; &lt;/bean&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>HTH</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload