Service service = getServiceFactory().getService(); if (needWrapperClassInterceptor(service.getServiceInfos().get(0))) { List<Interceptor<? extends Message>> in = super.getInInterceptors(); List<Interceptor<? extends Message>> out = super.getOutInterceptors(); in.add(new WrapperClassInInterceptor());
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; }
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();
Service service = getServiceFactory().getService(); if (needWrapperClassInterceptor(service.getServiceInfos().get(0))) { List<Interceptor<? extends Message>> in = super.getInInterceptors(); List<Interceptor<? extends Message>> out = super.getOutInterceptors(); in.add(new WrapperClassInInterceptor());
clientFactory.getInInterceptors().add(new LoggingInInterceptor()); clientFactory.getInFaultInterceptors().add(new LoggingInInterceptor()); CXFWSS4JInInterceptor inSecurityInterceptor = new CXFWSS4JInInterceptor(getServiceConfiguration().getBusSecurity()); clientFactory.getInInterceptors().add(inSecurityInterceptor); clientFactory.getInFaultInterceptors().add(inSecurityInterceptor); clientFactory.getInInterceptors().add(new ImmutableCollectionsInInterceptor());
if (getInInterceptors() != null) { c.getInInterceptors().addAll(getInInterceptors());
if (getInInterceptors() != null) { c.getInInterceptors().addAll(getInInterceptors());