-
Notifications
You must be signed in to change notification settings - Fork 317
Open
Labels
for: team-attentionAn issue we'd like other members of the team to reviewAn issue we'd like other members of the team to reviewstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
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()));
}
Metadata
Metadata
Assignees
Labels
for: team-attentionAn issue we'd like other members of the team to reviewAn issue we'd like other members of the team to reviewstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged