if (needWrapperClassInterceptor(service.getServiceInfos().get(0))) { List<Interceptor<? extends Message>> in = super.getInInterceptors(); List<Interceptor<? extends Message>> out = super.getOutInterceptors(); in.add(new WrapperClassInInterceptor()); in.add(new HolderInInterceptor());
ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); factory.setServiceClass(AWSECommerceServicePortType.class); factory.setAddress("https://soap.amazon.com/onca/soap?Service=AWSECommerceService"); factory.getInInterceptors().add(new LoggingInInterceptor()); factory.getOutInterceptors().add(new LoggingOutInterceptor()); AWSECommerceServicePortType ss = (AWSECommerceServicePortType) factory.create();
if (needWrapperClassInterceptor(service.getServiceInfos().get(0))) { List<Interceptor<? extends Message>> in = super.getInInterceptors(); List<Interceptor<? extends Message>> out = super.getOutInterceptors(); in.add(new WrapperClassInInterceptor()); in.add(new HolderInInterceptor());
protected ServiceRegistry initializeRemoteServiceRegistry() { String registryBootstrapUrl = ConfigContext.getCurrentContextConfig().getProperty(KSBConstants.Config.REGISTRY_SERVICE_URL); if (StringUtils.isBlank(registryBootstrapUrl)) { throw new RiceRuntimeException("Failed to load registry bootstrap service from url: " + registryBootstrapUrl); } ClientProxyFactoryBean clientFactory = new JaxWsProxyFactoryBean(); clientFactory.setServiceClass(ServiceRegistry.class); clientFactory.setBus(cxfBus); clientFactory.setAddress(registryBootstrapUrl); boolean registrySecurity = ConfigContext.getCurrentContextConfig().getBooleanProperty(SERVICE_REGISTRY_SECURITY_CONFIG, true); // Set security interceptors clientFactory.getOutInterceptors().add(new CXFWSS4JOutInterceptor(registrySecurity)); clientFactory.getInInterceptors().add(new CXFWSS4JInInterceptor(registrySecurity)); //Set transformation interceptors clientFactory.getInInterceptors().add(new ImmutableCollectionsInInterceptor()); Object service = clientFactory.create(); if (!(service instanceof ServiceRegistry)) { throw new RiceRuntimeException("Endpoint to service registry at URL '" + registryBootstrapUrl + "' was not an instance of ServiceRegistry, instead was: " + service); } return (ServiceRegistry)service; }
clientFactory.getOutInterceptors().add(new LoggingOutInterceptor()); clientFactory.getOutFaultInterceptors().add(new LoggingOutInterceptor()); CXFWSS4JOutInterceptor outSecurityInterceptor = new CXFWSS4JOutInterceptor(getServiceConfiguration().getBusSecurity()); clientFactory.getOutInterceptors().add(outSecurityInterceptor); clientFactory.getOutFaultInterceptors().add(outSecurityInterceptor); if (getCredentialsSource() != null) { clientFactory.getOutInterceptors().add(new CredentialsOutHandler(getCredentialsSource(), getServiceConfiguration())); credentials.getPassword())); WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); clientFactory.getOutInterceptors().add(wssOut); clientFactory.getOutFaultInterceptors().add(wssOut);
c.getInInterceptors().addAll(getInInterceptors()); if (getOutInterceptors() != null) { c.getOutInterceptors().addAll(getOutInterceptors());
c.getInInterceptors().addAll(getInInterceptors()); if (getOutInterceptors() != null) { c.getOutInterceptors().addAll(getOutInterceptors());