java - Setting SSL for JAX-WS Client -


i need implement jax-ws client (for websphere application server 7), request server using ssl. question is, how set ssl certificate ws request dynamically? want use way, presented here http://www-01.ibm.com/support/knowledgecenter/ssaw57_7.0.0/com.ibm.websphere.nd.doc/info/ae/ae/tjw_security_https.html means use setting ssl configuration alias referencing configuration. looks easily, example jax-rpc , know, if possible kind of configuration if use jax-ws. possible jax-ws? thanks

bindingprovider bindingprovider = (bindingprovider) importisdn;         bindingprovider.getbinding().gethandlerchain().add(new handler() {             public boolean handlemessage(messagecontext context) {                 context.put("ssl.configname", wsclient.getsslconfigname());                 return true;             }              public boolean handlefault(messagecontext context) {                 return false;             }              public void close(messagecontext context) {              }         }); 

if using jax-ws, check if can use policy sets instead of doing in code.

create policy based on wshttps default, in create binding , specify ssl configs used (you can select ssl configuration alias there). attach policy jax-ws client via admin console.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -