[ 
https://issues.apache.org/jira/browse/CXF-9135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955743#comment-17955743
 ] 

Vadim Beilin commented on CXF-9135:
-----------------------------------

attaching the tests as Maven project.

> Second async javax call fails with allowChunking=false
> ------------------------------------------------------
>
>                 Key: CXF-9135
>                 URL: https://issues.apache.org/jira/browse/CXF-9135
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 4.1.1, 4.1.2
>         Environment: Java 17
>            Reporter: Vadim Beilin
>            Assignee: Freeman Yue Fang
>            Priority: Major
>         Attachments: ShowBug.java, ShowBug2.java, cxf-httpclient-bug.zip
>
>
> The second call to an asynchronous web method is failing when using the JDK 
> HttpClient-based conduit and allowChunking set to false.
>  
> Logs show that the while the first request has correct conetnt-length, the 
> second request has Transfer-encoding: chunked, and the body is not sent at 
> all. Here are 3 requests received by the server (WSDL and two web methods):
> {noformat}
> ID: 1
> Address: http://localhost:12345/Service?wsdl
> Http-Method: GET
> Content-Type: 
> Headers: {Accept=[*/*], connection=[Upgrade, HTTP2-Settings], 
> Content-Length=[0], Content-Type=[null], Host=[localhost:12345], 
> HTTP2-Settings=[AAEAAEAAAAIAAAABAAMAAABkAAQBAAAAAAUAAEAA], Upgrade=[h2c], 
> User-Agent=[Apache-CXF/4.1.1]}
> {noformat}
> {noformat}
> ID: 2
> Address: http://localhost:12345/Service
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml; charset=UTF-8
> Headers: {Accept=[*/*], connection=[Upgrade, HTTP2-Settings], 
> Content-Length=[152], content-type=[text/xml; charset=UTF-8], 
> Host=[localhost:12345], 
> HTTP2-Settings=[AAEAAEAAAAIAAAABAAMAAABkAAQBAAAAAAUAAEAA], SOAPAction=[""], 
> Upgrade=[h2c], User-Agent=[Apache-CXF/4.1.1]}
> Payload: <soap:Envelope 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><respond 
> xmlns="http://test";>blah</respond></soap:Body></soap:Envelope>
> {noformat}
> {noformat}
> ID: 3
> Address: http://localhost:12345/Service
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml; charset=UTF-8
> Headers: {Accept=[*/*], connection=[Upgrade, HTTP2-Settings], 
> content-type=[text/xml; charset=UTF-8], Host=[localhost:12345], 
> HTTP2-Settings=[AAEAAEAAAAIAAAABAAMAAABkAAQBAAAAAAUAAEAA], SOAPAction=[""], 
> transfer-encoding=[chunked], Upgrade=[h2c], User-Agent=[Apache-CXF/4.1.1]}
> {noformat}
> I'm attaching a test class that demonstrates the issue.
> For the failure to happen, we need 
> * to use the new default HttpClient-based conduit (URLConnection-based 
> conduit works)
>  * {{allowChunking}} to be set to false (not set or set to true works)
>  * an asyncronous service method to be used (synchronous method works)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to