public WebServiceMessageSender build() { ClientHttpRequestFactory requestFactory = (this.requestFactorySupplier != null) ? this.requestFactorySupplier.get() : new ClientHttpRequestFactorySupplier().get(); if (this.connectTimeout != null) { new TimeoutRequestFactoryCustomizer(this.connectTimeout, "setConnectTimeout") .customize(requestFactory); } if (this.readTimeout != null) { new TimeoutRequestFactoryCustomizer(this.readTimeout, "setReadTimeout") .customize(requestFactory); } return new ClientHttpRequestMessageSender(requestFactory); }
@Override protected long getLastModified(HttpServletRequest httpServletRequest) { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { return wsdlDefinitionHandlerAdapter.getLastModified(httpServletRequest, definition); } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { return xsdSchemaHandlerAdapter.getLastModified(httpServletRequest, schema); } return messageReceiverHandlerAdapter.getLastModified(httpServletRequest, messageReceiver); }
@Override protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { wsdlDefinitionHandlerAdapter.handle(httpServletRequest, httpServletResponse, definition); return; } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { xsdSchemaHandlerAdapter.handle(httpServletRequest, httpServletResponse, schema); return; } messageReceiverHandlerAdapter.handle(httpServletRequest, httpServletResponse, messageReceiver); }
/** * Initialize the strategy objects that this servlet uses. * <p>May be overridden in subclasses in order to initialize further strategy objects. */ protected void initStrategies(ApplicationContext context) { initMessageReceiverHandlerAdapter(context); initWsdlDefinitionHandlerAdapter(context); initXsdSchemaHandlerAdapter(context); initMessageReceiver(context); initWsdlDefinitions(context); initXsdSchemas(context); }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { HttpPost httpPost = new HttpPost(uri); if (isAcceptGzipEncoding()) { httpPost.addHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } HttpContext httpContext = createContext(uri); return new HttpComponentsConnection(getHttpClient(), httpPost, httpContext); }
@Bean public WsdlDefinitionHandlerAdapter wsdlDefinitionHandlerAdapter() { WsdlDefinitionHandlerAdapter wsdlDefinitionHandlerAdapter = new WsdlDefinitionHandlerAdapter(); wsdlDefinitionHandlerAdapter.setTransformLocations(true); return wsdlDefinitionHandlerAdapter; }
@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
/** * This implementation calls {@link #initStrategies}. */ @Override protected void onRefresh(ApplicationContext context) { initStrategies(context); }
@Override public boolean supports(URI uri) { return delegate.supports(uri); } }
/** * Initialize the strategy objects that this servlet uses. * <p>May be overridden in subclasses in order to initialize further strategy objects. */ protected void initStrategies(ApplicationContext context) { initMessageReceiverHandlerAdapter(context); initWsdlDefinitionHandlerAdapter(context); initXsdSchemaHandlerAdapter(context); initMessageReceiver(context); initWsdlDefinitions(context); initXsdSchemas(context); }
@Override protected long getLastModified(HttpServletRequest httpServletRequest) { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { return wsdlDefinitionHandlerAdapter.getLastModified(httpServletRequest, definition); } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { return xsdSchemaHandlerAdapter.getLastModified(httpServletRequest, schema); } return messageReceiverHandlerAdapter.getLastModified(httpServletRequest, messageReceiver); }
@Override protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { wsdlDefinitionHandlerAdapter.handle(httpServletRequest, httpServletResponse, definition); return; } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { xsdSchemaHandlerAdapter.handle(httpServletRequest, httpServletResponse, schema); return; } messageReceiverHandlerAdapter.handle(httpServletRequest, httpServletResponse, messageReceiver); }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { HttpPost httpPost = new HttpPost(uri); if (isAcceptGzipEncoding()) { httpPost.addHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } HttpContext httpContext = createContext(uri); return new HttpComponentsConnection(getHttpClient(), httpPost, httpContext); }
/** * This implementation calls {@link #initStrategies}. */ @Override protected void onRefresh(ApplicationContext context) { initStrategies(context); }
@Override protected void initFrameworkServlet() throws ServletException, BeansException { initMessageReceiverHandlerAdapter(); initWsdlDefinitionHandlerAdapter(); initXsdSchemaHandlerAdapter(); initMessageReceiver(); initWsdlDefinitions(); initXsdSchemas(); }
@Override protected long getLastModified(HttpServletRequest httpServletRequest) { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { return wsdlDefinitionHandlerAdapter.getLastModified(httpServletRequest, definition); } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { return xsdSchemaHandlerAdapter.getLastModified(httpServletRequest, schema); } return messageReceiverHandlerAdapter.getLastModified(httpServletRequest, messageReceiver); }
@Override protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { wsdlDefinitionHandlerAdapter.handle(httpServletRequest, httpServletResponse, definition); return; } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { xsdSchemaHandlerAdapter.handle(httpServletRequest, httpServletResponse, schema); return; } messageReceiverHandlerAdapter.handle(httpServletRequest, httpServletResponse, messageReceiver); }
/** * This implementation calls {@link #initStrategies}. */ @Override protected void onRefresh(ApplicationContext context) { initStrategies(context); }
@Override protected long getLastModified(HttpServletRequest httpServletRequest) { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { return wsdlDefinitionHandlerAdapter.getLastModified(httpServletRequest, definition); } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { return xsdSchemaHandlerAdapter.getLastModified(httpServletRequest, schema); } return messageReceiverHandlerAdapter.getLastModified(httpServletRequest, messageReceiver); }
@Override protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { WsdlDefinition definition = getWsdlDefinition(httpServletRequest); if (definition != null) { wsdlDefinitionHandlerAdapter.handle(httpServletRequest, httpServletResponse, definition); return; } XsdSchema schema = getXsdSchema(httpServletRequest); if (schema != null) { xsdSchemaHandlerAdapter.handle(httpServletRequest, httpServletResponse, schema); return; } messageReceiverHandlerAdapter.handle(httpServletRequest, httpServletResponse, messageReceiver); }