You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ClientHttpRequestMessageSender and setting 'setBufferRequestBody' to false: HttpWebServiceMessageSenderBuilder httpWebServiceMessageSenderBuilder = new HttpWebServiceMessageSenderBuilder();HttpWebServiceMessageSenderBuilder httpWebServiceMessageSenderBuilder = new HttpWebServiceMessageSenderBuilder(); httpWebServiceMessageSenderBuilder.requestFactory(() -> { HttpComponentsClientHttpRequestFactory httpComponentsClientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory( configureHttpClient(HttpClients.custom(), endpointConfiguration, messageContextHolder)); httpComponentsClientHttpRequestFactory.setBufferRequestBody(false); return httpComponentsClientHttpRequestFactory; });
There is an exception thrown: UnsupportedOperationException("getBody not supported");Which is caused by ClientHttpRequestConnection#getRequestOutputStream calling: AbstractClientHttpRequest#getBody -> HttpComponentsStreamingClientHttpRequest#getBodyInternal
When using HttpComponentsMessageSender instead, it seems hardcoded to use an mem buffer for the actual attachment: @Override protected void onSendAfterWrite(WebServiceMessage message) throws IOException { httpPost.setEntity(new ByteArrayEntity(requestBuffer.toByteArray()));
The text was updated successfully, but these errors were encountered:
Using ClientHttpRequestMessageSender and setting 'setBufferRequestBody' to false:
HttpWebServiceMessageSenderBuilder httpWebServiceMessageSenderBuilder = new HttpWebServiceMessageSenderBuilder();HttpWebServiceMessageSenderBuilder httpWebServiceMessageSenderBuilder = new HttpWebServiceMessageSenderBuilder(); httpWebServiceMessageSenderBuilder.requestFactory(() -> { HttpComponentsClientHttpRequestFactory httpComponentsClientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory( configureHttpClient(HttpClients.custom(), endpointConfiguration, messageContextHolder)); httpComponentsClientHttpRequestFactory.setBufferRequestBody(false); return httpComponentsClientHttpRequestFactory; });
There is an exception thrown: UnsupportedOperationException("getBody not supported");Which is caused by ClientHttpRequestConnection#getRequestOutputStream calling: AbstractClientHttpRequest#getBody -> HttpComponentsStreamingClientHttpRequest#getBodyInternal
When using HttpComponentsMessageSender instead, it seems hardcoded to use an mem buffer for the actual attachment:
@Override protected void onSendAfterWrite(WebServiceMessage message) throws IOException { httpPost.setEntity(new ByteArrayEntity(requestBuffer.toByteArray()));
The text was updated successfully, but these errors were encountered: