private String key(STSClientConfig stsClientConfig) { return key(stsClientConfig.getServiceName(), stsClientConfig.getPortName(), stsClientConfig.getEndPointAddress()); }
@Override public String getKey() { return STSClientConfig.computeSTSClientConfigKey(ModuleUtils.getCurrentModuleId(), config.getServiceName(), config.getPortName(), config.getEndPointAddress(), config.getUsername()); } });
@Override public String getKey() { return STSClientConfig.computeSTSClientConfigKey(ModuleUtils.getCurrentModuleId(), config.getServiceName(), config.getPortName(), config.getEndPointAddress(), config.getUsername()); } });
/** * <p> * Constructor that creates the {@link Dispatch} for use. * </p> * <p> * If you need to customize the ws properties, it is suggested to preconstruct a {@link Dispatch} * object and use the default no-arg constructor followed by a {@linkplain #setDispatch(Dispatch)} call * </p> * @param config */ public STSClient(STSClientConfig config) { QName service = new QName(targetNS, config.getServiceName()); QName portName = new QName(targetNS, config.getPortName()); isBatch = config.isBatch(); wsaIssuerAddress = config.getWsaIssuer(); wspAppliesTo = config.getWspAppliesTo(); Service jaxwsService = Service.create(service); jaxwsService.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, config.getEndPointAddress()); Dispatch<Source> dispatch = jaxwsService.createDispatch(portName, Source.class, Mode.PAYLOAD); Map<String, Object> reqContext = dispatch.getRequestContext(); String username = config.getUsername(); if (username != null) { // add the username and password to the request context. reqContext.put(BindingProvider.USERNAME_PROPERTY, config.getUsername()); reqContext.put(BindingProvider.PASSWORD_PROPERTY, config.getPassword()); } setDispatch(dispatch); }
/** * <p> * Constructor that creates the {@link Dispatch} for use. * </p> * <p> * If you need to customize the ws properties, it is suggested to preconstruct a {@link Dispatch} * object and use the default no-arg constructor followed by a {@linkplain #setDispatch(Dispatch)} call * </p> * @param config */ public STSClient(STSClientConfig config) { QName service = new QName(targetNS, config.getServiceName()); QName portName = new QName(targetNS, config.getPortName()); isBatch = config.isBatch(); wsaIssuerAddress = config.getWsaIssuer(); wspAppliesTo = config.getWspAppliesTo(); Service jaxwsService = Service.create(service); jaxwsService.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, config.getEndPointAddress()); Dispatch<Source> dispatch = jaxwsService.createDispatch(portName, Source.class, Mode.PAYLOAD); Map<String, Object> reqContext = dispatch.getRequestContext(); String username = config.getUsername(); if (username != null) { // add the username and password to the request context. reqContext.put(BindingProvider.USERNAME_PROPERTY, config.getUsername()); reqContext.put(BindingProvider.PASSWORD_PROPERTY, config.getPassword()); } setDispatch(dispatch); }
QName service = new QName(targetNS, config.getServiceName()); QName portName = new QName(targetNS, config.getPortName());
this.serviceName = config.getServiceName(); this.portName = config.getPortName(); this.endPointAddress = config.getEndPointAddress();
this.serviceName = config.getServiceName(); this.portName = config.getPortName(); this.endPointAddress = config.getEndPointAddress();