@Override protected void configureInterceptors(ServerFactoryBean svrFactory) { svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); svrFactory.getInInterceptors().add(new InNamespaceMergeInterceptor()); svrFactory.getInInterceptors().add(new InPayloadInjectorInterceptor(0)); svrFactory.setDataBinding(new PlainXmlDataBinding()); super.configureInterceptors(svrFactory); } }
@Override protected void configureInterceptors(ServerFactoryBean svrFactory) { super.configureInterceptors(svrFactory); svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); svrFactory.getInInterceptors().add(new InNamespaceMergeInterceptor()); svrFactory.getInInterceptors().add(new InPayloadInjectorInterceptor(0)); svrFactory.setDataBinding(new PlainXmlDataBinding()); }
@Override protected void configureInterceptors(ServerFactoryBean svrFactory) { super.configureInterceptors(svrFactory); // install auditing-related interceptors if the user has not switched auditing off if (auditStrategy != null) { if (wsTransactionConfiguration.isAuditRequestPayload()) { svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); } AuditResponseInterceptor<AuditDatasetType> auditInterceptor = new AuditResponseInterceptor<>(auditStrategy, auditContext,false, correlator, true); svrFactory.getInInterceptors().add(auditInterceptor); svrFactory.getInFaultInterceptors().add(auditInterceptor); } } }
/** * Called to configure any interceptors of the service. * @param svrFactory * the server factory. */ protected void configureInterceptors(ServerFactoryBean svrFactory) { svrFactory.getInInterceptors().add(new Cxf3791WorkaroundInterceptor()); InterceptorUtils.copyInterceptorsFromProvider(customInterceptors, svrFactory); if (rejectionHandlingStrategy != null) { svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(HTTP)); RejectionHandlerInterceptor rejectionHandlerInterceptor = new RejectionHandlerInterceptor(rejectionHandlingStrategy); svrFactory.getOutInterceptors().add(rejectionHandlerInterceptor); svrFactory.getOutFaultInterceptors().add(rejectionHandlerInterceptor); } }
protected void addProxyInterceptors(ServerFactoryBean sfb) { sfb.getOutInterceptors().add(new OutputPayloadInterceptor()); sfb.getInInterceptors().add(new CopyAttachmentInInterceptor()); sfb.getOutInterceptors().add(new CopyAttachmentOutInterceptor()); if (isProxyEnvelope()) { sfb.getInInterceptors().add(new ReversibleStaxInInterceptor()); sfb.getInInterceptors().add(new ResetStaxInterceptor()); } /* Even if the payload is body, if validation is enabled, then we need to use a ReversibleXMLStreamReader to * avoid the message from being consumed during schema validation. */ else if(isValidationEnabled()) { sfb.getInInterceptors().add(new ReversibleValidatingInterceptor()); sfb.getInInterceptors().add(new ResetStaxInterceptor()); } }
protected void configureInterceptors(ServerFactoryBean svrFactory) { super.configureInterceptors(svrFactory); // install auditing-related interceptors if the user has not switched auditing off if (auditStrategy != null) { if (wsTransactionConfiguration.isAuditRequestPayload()) { svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); } svrFactory.getInInterceptors().add(new AuditInRequestInterceptor<>( auditStrategy, auditContext, wsTransactionConfiguration)); AuditResponseInterceptor<AuditDatasetType> auditInterceptor = new AuditResponseInterceptor<>(auditStrategy, auditContext, true, null, false); svrFactory.getOutInterceptors().add(auditInterceptor); svrFactory.getOutFaultInterceptors().add(auditInterceptor); } }
private void setSecurityConfig(ServerFactoryBean sfb) { if(wsSecurity != null) { if(wsSecurity.getCustomValidator() != null && !wsSecurity.getCustomValidator().isEmpty()) { for(Map.Entry<String, Object> entry : wsSecurity.getCustomValidator().entrySet()) { properties.put(entry.getKey(), entry.getValue()); } } if(wsSecurity.getSecurityManager() != null) { properties.put(SecurityConstants.USERNAME_TOKEN_VALIDATOR, wsSecurity.getSecurityManager()); } if(wsSecurity.getConfigProperties() != null && !wsSecurity.getConfigProperties().isEmpty()) { sfb.getInInterceptors().add(new WSS4JInInterceptor(wsSecurity.getConfigProperties())); // CXF changed the way it validates SAML subject confirmation from 2.5.x to 2.7.x // see https://issues.apache.org/jira/browse/CXF-4655 // In order to keep backwards compatibility we use the previous approach String actionProperty = (String) wsSecurity.getConfigProperties().get(WSHandlerConstants.ACTION); if (!StringUtils.isEmpty(actionProperty) && actionProperty.contains(WSHandlerConstants.SAML_TOKEN_UNSIGNED)) { properties.put("ws-security.validate.saml.subject.conf", false); } } } }
if (isLoggingStoreEnable()) { svrFactory.getFeatures().add(getStoreLoggingFeatureBean()); svrFactory.getInInterceptors().add(new CollectObjectSerializerInterceptor(getObjectSeializer(svrFactory))); svrFactory.getInInterceptors().add(new CollectOpenLServiceInterceptor(service)); svrFactory.getInInterceptors().add(new CollectPublisherTypeInterceptor(getPublisherType())); svrFactory.getInInterceptors().add(new CollectOperationResourceInfoInterceptor()); svrFactory.getInFaultInterceptors().add(new CollectObjectSerializerInterceptor(getObjectSeializer(svrFactory))); svrFactory.getInFaultInterceptors().add(new CollectOpenLServiceInterceptor(service));
if (isLoggingStoreEnable()) { svrFactory.getFeatures().add(getStoreLoggingFeatureBean()); svrFactory.getInInterceptors().add(new CollectObjectSerializerInterceptor(getObjectSeializer(svrFactory))); svrFactory.getInInterceptors().add(new CollectOpenLServiceInterceptor(service)); svrFactory.getInInterceptors().add(new CollectPublisherTypeInterceptor(getPublisherType())); svrFactory.getInInterceptors().add(new CollectOperationResourceInfoInterceptor()); svrFactory.getInFaultInterceptors().add(new CollectObjectSerializerInterceptor(getObjectSeializer(svrFactory))); svrFactory.getInFaultInterceptors().add(new CollectOpenLServiceInterceptor(service));
soapServiceDefinition.getServiceNameSpaceURI(), serviceDefinition.getServiceName()); properties.put(WSHandlerConstants.PW_CALLBACK_REF, authenticationHandler); svrFactory.getInInterceptors().add(new WSS4JInInterceptor(properties)); svrFactory.getInInterceptors().add(new SAAJInInterceptor()); } else { svrFactory.getInInterceptors().add(new CXFWSS4JInInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getOutInterceptors().add(new CXFWSS4JOutInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getInFaultInterceptors().add(new CXFWSS4JInInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getInInterceptors().add(new LoggingInInterceptor()); svrFactory.getInInterceptors().add(new ImmutableCollectionsInInterceptor());
sfb.getInInterceptors().addAll(inInterceptors); sfb.getInInterceptors().add(new MuleHeadersInInterceptor()); sfb.getInFaultInterceptors().add(new MuleHeadersInInterceptor()); sfb.getOutInterceptors().add(new MuleHeadersOutInterceptor());