You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/03/30 18:58:41 UTC

[jira] [Updated] (CXF-6651) POST request to Exchange Web Services failing with largish data via NTLM

     [ https://issues.apache.org/jira/browse/CXF-6651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-6651:
-----------------------------
    Component/s: Transports

> POST request to Exchange Web Services failing with largish data via NTLM
> ------------------------------------------------------------------------
>
>                 Key: CXF-6651
>                 URL: https://issues.apache.org/jira/browse/CXF-6651
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Louis Orenstein
>         Attachments: failed159k attachment via ntlm.log, failed159k attachment via ntlm.pcapng, successful 159k attachment via basic auth.log, successful 159k attachment via basic auth.pcapng, successful 48k attachment via ntlm.log, successful 48k attachment via ntlm.pcapng
>
>
> As documented here ( http://cxf.547215.n5.nabble.com/CXF-IOUtils-truncating-POST-request-content-td5761619.html ), I'm seeing issues when attempting to send largish POST requests to Exchange Web Services when using NTLM authentication using CXF version 3.1.3 .
> When the server only has Basic authentication enabled I can get POST requests larger than 256k to succeed but only if I provide my own IOUtils class that removes these lines from the copy method defined on line 180:
> {code}
> if (avail > 262144) {
> 	avail = 262144;
> }
> {code}
> Here is the code I'm using to configure the SOAP client:
> {code}
>         ExchangeWebService exchangeWebService = new ExchangeWebService();
>         ExchangeServicePortType exchangeConn = exchangeWebService.getExchangeWebPort();
>         ((BindingProvider)exchangeConn).getRequestContext().put(AsyncHTTPConduit.USE_ASYNC, Boolean.TRUE);
>         ((BindingProvider)exchangeConn).getRequestContext().put(Credentials.class.getName(),
>                 new NTCredentials(finalUsername, password, null, finalDomain));
>         ((BindingProvider) exchangeConn).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlURL);
>         Client client = ClientProxy.getClient(exchangeConn);
>         Bus bus = client.getBus();
>         bus.setExtension(new AsyncHTTPConduitFactory(bus) {
>             @Override
>             protected void adaptClientBuilder(HttpAsyncClientBuilder httpAsyncClientBuilder) {
>                 httpAsyncClientBuilder.setTargetAuthenticationStrategy(new TargetAuthenticationStrategy() {
>                     @Override
>                     protected boolean isCachable(AuthScheme authScheme) {
>                         return false;
>                     }
>                 });
>             }
>             @Override
>             public HTTPConduit createConduit(HTTPTransportFactory f, Bus bus, EndpointInfo localInfo, EndpointReferenceType target) throws IOException {
>                 HTTPConduit newConduit = super.createConduit(f, bus, localInfo, target);
>                 HTTPClientPolicy clientPolicy = newConduit.getClient();
>                 if (clientPolicy == null) {
>                     clientPolicy = new HTTPClientPolicy();
>                 }
>                 clientPolicy.setAutoRedirect(true);
>                 clientPolicy.setAllowChunking(false);
>                 clientPolicy.setConnectionTimeout(connTimeout.orElse(EXCHANGE_CONNECT_TIMEOUT));
>                 clientPolicy.setReceiveTimeout(reqTimeout.orElse(EXCHANGE_REQUEST_TIMEOUT));
>                 newConduit.setClient(clientPolicy);
>                 return newConduit;
>             }
>         }, HTTPConduitFactory.class);
> {code}
> I'll be attaching wireshark network captures from the Exchange Web Services server along with debug logging from the client.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)