/** * @return the info describing the Web Service. */ public WsTransactionConfiguration getWsTransactionConfiguration() { return clientFactory.getWsTransactionConfiguration(); }
/** * @return static configuration parameters of the Web Service which * server endpoints of this transaction. */ public ConfigType getWsTransactionConfiguration() { return interactionId.getWsTransactionConfiguration(); } }
@Override protected void configureInterceptors(Client client) { super.configureInterceptors(client); // install auditing-related interceptors if the user has not switched auditing off if (auditStrategy != null) { if (wsTransactionConfiguration.isAuditRequestPayload()) { installPayloadInterceptors(client); } client.getOutInterceptors().add(new AuditOutRequestInterceptor<>( auditStrategy, auditContext, correlator, getWsTransactionConfiguration())); AuditResponseInterceptor<AuditDatasetType> auditInterceptor = new AuditResponseInterceptor<>(auditStrategy, auditContext, false, correlator, false); client.getInInterceptors().add(auditInterceptor); client.getInFaultInterceptors().add(auditInterceptor); } } }
@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); } } }
@Override public JaxWsServiceFactory<WsAuditDataset> getJaxWsServiceFactory() { return new JaxWsRequestServiceFactory<>( getComponent().getWsTransactionConfiguration(), getServiceAddress(), null, getAuditContext(), getCustomInterceptors(), getRejectionHandlingStrategy()); }
@Override public JaxWsClientFactory<WsAuditDataset> getJaxWsClientFactory() { return new JaxWsRequestClientFactory<>( getComponent().getWsTransactionConfiguration(), getServiceUrl(), null, getAuditContext(), getCustomInterceptors(), getFeatures(), getProperties(), null, getSecurityInformation()); }
/** * Creates and configures a server factory. * Use the server factory to create a server instance that can be used * to start and stop the service. * @param serviceImplClass * the type of the service implementation. * @return the server factory. */ public ServerFactoryBean createServerFactory(Class<?> serviceImplClass) { try { return createServerFactory(serviceImplClass.newInstance()); } catch (InstantiationException | IllegalAccessException e) { throw new IllegalStateException(e); } }
public ServerFactoryBean createServerFactory(Object serviceImpl) { ServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); configureService(svrFactory, serviceImpl); configureBinding(svrFactory); configureInterceptors(svrFactory); svrFactory.setStart(false); return svrFactory; }
/** * @return <code>true</code> if WS-Addressing enabled. */ @ManagedAttribute(description = "Addressing Enabled") public boolean isAddressing() { return getComponent().getWsTransactionConfiguration().isAddressing(); }
/** * @return <code>true</code> if SOAP With Attachments Output enabled. */ @ManagedAttribute(description = "SOAP With Attachments Output Enabled") public boolean isSwaOutSupport() { return getComponent().getWsTransactionConfiguration().isSwaOutSupport(); }
@Override public AuditStrategy<AuditDatasetType> getClientAuditStrategy() { return getWsTransactionConfiguration().getClientAuditStrategy(); }
@Override public AuditStrategy<AuditDatasetType> getServerAuditStrategy() { return getWsTransactionConfiguration().getServerAuditStrategy(); }
private void maybeUpdateSslContext(TLSClientParameters tlsClientParameters, boolean useDefaultSocketFactory) { if (getSslContext() == null) { if (useDefaultSocketFactory) { tlsClientParameters.setUseHttpsURLConnectionDefaultSslSocketFactory(true); } } else { tlsClientParameters.setSSLSocketFactory(getSslContext().getSocketFactory()); } } }
public static void copyInterceptorsFromProvider( InterceptorProvider source, InterceptorProvider target) { if (source != null) { copyInterceptorsFromList(source.getInInterceptors(), target.getInInterceptors()); copyInterceptorsFromList(source.getInFaultInterceptors(), target.getInFaultInterceptors()); copyInterceptorsFromList(source.getOutInterceptors(), target.getOutInterceptors()); copyInterceptorsFromList(source.getOutFaultInterceptors(), target.getOutFaultInterceptors()); } }
private void configureBinding(ServerFactoryBean svrFactory) { SoapBindingConfiguration bindingConfig = new SoapBindingConfiguration(); bindingConfig.setBindingName(wsTransactionConfiguration.getBindingName()); svrFactory.setBindingConfig(bindingConfig); }
@Override public JaxWsServiceFactory<AuditDatasetType> getJaxWsServiceFactory() { return new JaxWsAsyncResponseServiceFactory<>( getComponent().getWsTransactionConfiguration(), getServiceAddress(), isAudit() ? getComponent().getServerAuditStrategy() : null, getAuditContext(), getCustomInterceptors(), getCorrelator()); }
@Override public JaxWsServiceFactory<AuditDatasetType> getJaxWsServiceFactory() { return new JaxWsRequestServiceFactory<>( getComponent().getWsTransactionConfiguration(), getServiceAddress(), isAudit() ? getServerAuditStrategy() : null, getAuditContext(), getCustomInterceptors(), getRejectionHandlingStrategy()); }
@Override public JaxWsClientFactory<AuditDatasetType> getJaxWsClientFactory() { return new JaxWsRequestClientFactory<>( getComponent().getWsTransactionConfiguration(), getServiceUrl(), isAudit() ? getClientAuditStrategy() : null, getAuditContext(), getCustomInterceptors(), getFeatures(), getProperties(), getCorrelator(), getSecurityInformation()); }
@Override public JaxWsServiceFactory<AuditDatasetType> getJaxWsServiceFactory() { return new JaxWsRequestServiceFactory<>( getComponent().getWsTransactionConfiguration(), getServiceAddress(), isAudit() ? getComponent().getServerAuditStrategy() : null, getAuditContext(), getCustomInterceptors(), getRejectionHandlingStrategy()); } }
@Override public JaxWsClientFactory<AuditDatasetType> getJaxWsClientFactory() { return new JaxWsRequestClientFactory<>( getComponent().getWsTransactionConfiguration(), getServiceUrl(), isAudit() ? getClientAuditStrategy() : null, getAuditContext(), getCustomInterceptors(), getFeatures(), getProperties(), getCorrelator(), getSecurityInformation()); }