javaspringsslhttpinvoker

Using Spring HttpInvoker over SSL from command line


I have a command line spring application that uses a remote webservice via Spring's HttpInvoker. The connection URL is configured in a property file:

  <bean id="httpFooBarServiceProxy"
    class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    <property name="serviceUrl" value="${serverURI}/
FooBarService-httpinvoker.rpc" />
    <property name="serviceInterface">
      <value>foo.bar.service.Interface</value>
    </property>
    <property name="httpInvokerRequestExecutor">
      <bean
        class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor" />
    </property>
  </bean>

All OK, but now our partner would like to use it over HTTPS to reach the service running on his Weblogic 10.3 server.

As far as I know the application can remain unchanged, he only has to import the certificate (?) into a keystore (?) and change the protocol in the url in the property file. Can you confirm this?


Solution

  • Yes, since you are already using CommonsHttpInvokerRequestExecutor which has support for https.