/** * 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 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); } }
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()); } }
} else { svrFactory.getInInterceptors().add(new CXFWSS4JInInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getOutInterceptors().add(new CXFWSS4JOutInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getInFaultInterceptors().add(new CXFWSS4JInInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getOutFaultInterceptors().add(new CXFWSS4JOutInterceptor(soapServiceDefinition.getBusSecurity())); svrFactory.getInInterceptors().add(new ImmutableCollectionsInInterceptor()); svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
sfb.getOutInterceptors().addAll(outInterceptors); sfb.getOutInterceptors().add(new MuleHeadersOutInterceptor()); sfb.getOutFaultInterceptors().add(new MuleHeadersOutInterceptor());