[ https://issues.apache.org/jira/browse/CXF-9132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
cantos song updated CXF-9132: ----------------------------- Attachment: image-2025-04-29-17-49-16-376.png image-2025-04-29-17-49-06-378.png 438528865-8f282ba8-c4de-4451-b2ca-a8f76c79b643.png Description: [https://github.com/apache/cxf/pull/1777/files] When I used version 4.0.4 without any issues, all subsequent versions had problems. If the address is modified, it will be released multiple times. !image-2025-04-29-17-49-16-376.png! !image-2025-04-29-17-49-06-378.png! import jakarta.jws.WebMethod; import jakarta.jws.WebParam; import jakarta.jws.WebResult; import org.apache.commons.lang3.RandomUtils; import org.apache.cxf.binding.soap.SoapMessage; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.phase.AbstractPhaseInterceptor; import org.apache.cxf.phase.Phase; import java.util.ArrayList; import java.util.List; public class TestCxf { public static void main(String[] args) throws InterruptedException { HTNGOutboundWebService byAddress = getByAddress(); int i = 0; while (i <= 300) { Thread.ofVirtual().start(new Runnable() { @Override public void run() { try { byAddress.ratePlanSubmitRequest(""); } catch (Exception e) { if (!e.getCause().toString().contains("HTTP response")) { e.printStackTrace(); } } } } ); i++; } Thread.sleep(100000); } public static class HTNGHeaderOutInterceptor1 extends AbstractPhaseInterceptor<SoapMessage> { static List<String> address = new ArrayList(); public HTNGHeaderOutInterceptor1() { super(Phase.PREPARE_SEND); address.add("https://www.baidu.com"); address.add("https://www.tencent.com"); } @Override public void handleMessage(SoapMessage message) throws Fault { int i1 = RandomUtils.secure().randomInt(0, 2); message.put(org.apache.cxf.message.Message.ENDPOINT_ADDRESS, address.get(i1)); } } public static HTNGOutboundWebService getByAddress() { JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean(); jaxWsProxyFactoryBean.setServiceClass(HTNGOutboundWebService.class); jaxWsProxyFactoryBean.getOutInterceptors().add(new HTNGHeaderOutInterceptor1()); HTNGOutboundWebService soap = (HTNGOutboundWebService) jaxWsProxyFactoryBean.create(); return soap; } public interface HTNGOutboundWebService { @WebMethod(operationName = "RatePlan_SubmitRequest", action = "http://htng.org/PWSWG/2010/12/RatePlan_SubmitRequest") @WebResult(name = "OTA_HotelRatePlanNotifRS", targetNamespace = "http://www.opentravel.org/OTA/2003/05", partName = "OTA_HotelRatePlanNotifRS") public void ratePlanSubmitRequest( @WebParam(partName = "OTA_HotelRatePlanNotifRQ", name = "OTA_HotelRatePlanNotifRQ", targetNamespace = "http://www.opentravel.org/OTA/2003/05") String aa ); } } was: [https://github.com/apache/cxf/pull/1777/files] When I used version 4.0.4 without any issues, all subsequent versions had problems. If the address is modified, it will be released multiple times. [!https://private-user-images.githubusercontent.com/15994261/438528865-8f282ba8-c4de-4451-b2ca-a8f76c79b643.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDU5MDUwODcsIm5iZiI6MTc0NTkwNDc4NywicGF0aCI6Ii8xNTk5NDI2MS80Mzg1Mjg4NjUtOGYyODJiYTgtYzRkZS00NDUxLWIyY2EtYThmNzZjNzliNjQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA0MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNDI5VDA1MzMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiZTNlMzY5NjU5ZmU3M2U5OGZmMWViNDIzNTg1N2VmYWUwYTM5MzMwNDM0MDEwMjEzNGVlZDA3ZWI2OWYzMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.of98VPy7r6f4fZ7Ki3ePQokPK5XtB3LHGmGRVLXrlOw!|https://private-user-images.githubusercontent.com/15994261/438528865-8f282ba8-c4de-4451-b2ca-a8f76c79b643.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDU5MDUwODcsIm5iZiI6MTc0NTkwNDc4NywicGF0aCI6Ii8xNTk5NDI2MS80Mzg1Mjg4NjUtOGYyODJiYTgtYzRkZS00NDUxLWIyY2EtYThmNzZjNzliNjQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA0MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNDI5VDA1MzMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiZTNlMzY5NjU5ZmU3M2U5OGZmMWViNDIzNTg1N2VmYWUwYTM5MzMwNDM0MDEwMjEzNGVlZDA3ZWI2OWYzMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.of98VPy7r6f4fZ7Ki3ePQokPK5XtB3LHGmGRVLXrlOw] [!https://private-user-images.githubusercontent.com/15994261/438528287-eb11518a-b8de-4d8b-a492-e18f091e42d2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDU5MDUwODcsIm5iZiI6MTc0NTkwNDc4NywicGF0aCI6Ii8xNTk5NDI2MS80Mzg1MjgyODctZWIxMTUxOGEtYjhkZS00ZDhiLWE0OTItZTE4ZjA5MWU0MmQ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lnbmVkSGVhZGVycz1ob3N0In0.JZxzLZ_9RViaD8-nG538Qcc4JL3Er-oyUkyy8WF2P-I] import jakarta.jws.WebMethod; import jakarta.jws.WebParam; import jakarta.jws.WebResult; import org.apache.commons.lang3.RandomUtils; import org.apache.cxf.binding.soap.SoapMessage; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.phase.AbstractPhaseInterceptor; import org.apache.cxf.phase.Phase; import java.util.ArrayList; import java.util.List; public class TestCxf { public static void main(String[] args) throws InterruptedException { HTNGOutboundWebService byAddress = getByAddress(); int i = 0; while (i <= 300) { Thread.ofVirtual().start(new Runnable() { @Override public void run() { try { byAddress.ratePlanSubmitRequest(""); } catch (Exception e) { if (!e.getCause().toString().contains("HTTP response")) { e.printStackTrace(); } } } } ); i++; } Thread.sleep(100000); } public static class HTNGHeaderOutInterceptor1 extends AbstractPhaseInterceptor<SoapMessage> { static List<String> address = new ArrayList(); public HTNGHeaderOutInterceptor1() { super(Phase.PREPARE_SEND); address.add("https://www.baidu.com"); address.add("https://www.tencent.com"); } @Override public void handleMessage(SoapMessage message) throws Fault { int i1 = RandomUtils.secure().randomInt(0, 2); message.put(org.apache.cxf.message.Message.ENDPOINT_ADDRESS, address.get(i1)); } } public static HTNGOutboundWebService getByAddress() { JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean(); jaxWsProxyFactoryBean.setServiceClass(HTNGOutboundWebService.class); jaxWsProxyFactoryBean.getOutInterceptors().add(new HTNGHeaderOutInterceptor1()); HTNGOutboundWebService soap = (HTNGOutboundWebService) jaxWsProxyFactoryBean.create(); return soap; } public interface HTNGOutboundWebService { @WebMethod(operationName = "RatePlan_SubmitRequest", action = "http://htng.org/PWSWG/2010/12/RatePlan_SubmitRequest") @WebResult(name = "OTA_HotelRatePlanNotifRS", targetNamespace = "http://www.opentravel.org/OTA/2003/05", partName = "OTA_HotelRatePlanNotifRS") public void ratePlanSubmitRequest( @WebParam(partName = "OTA_HotelRatePlanNotifRQ", name = "OTA_HotelRatePlanNotifRQ", targetNamespace = "http://www.opentravel.org/OTA/2003/05") String aa ); } } > HttpClientHTTPConduit RefCount Multiple release > ------------------------------------------------ > > Key: CXF-9132 > URL: https://issues.apache.org/jira/browse/CXF-9132 > Project: CXF > Issue Type: Bug > Components: Transports > Affects Versions: 4.1.0, 4.0.5, 4.0.6, 4.0.7, 4.1.1, 4.1.2, 4.0.8 > Environment: JDK 21 > CXF 4.0.5/4.0.6/4.0.7/4.1.0/4.1.1 > Reporter: cantos song > Priority: Blocker > Attachments: 438528865-8f282ba8-c4de-4451-b2ca-a8f76c79b643.png, > TestCxf.java, image-2025-04-29-17-49-06-378.png, > image-2025-04-29-17-49-16-376.png > > > [https://github.com/apache/cxf/pull/1777/files] > When I used version 4.0.4 without any issues, all subsequent versions had > problems. > If the address is modified, it will be released multiple times. > > !image-2025-04-29-17-49-16-376.png! > !image-2025-04-29-17-49-06-378.png! > import jakarta.jws.WebMethod; > import jakarta.jws.WebParam; > import jakarta.jws.WebResult; > import org.apache.commons.lang3.RandomUtils; > import org.apache.cxf.binding.soap.SoapMessage; > import org.apache.cxf.interceptor.Fault; > import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; > import org.apache.cxf.phase.AbstractPhaseInterceptor; > import org.apache.cxf.phase.Phase; > import java.util.ArrayList; > import java.util.List; > public class TestCxf { > public static void main(String[] args) throws InterruptedException { > HTNGOutboundWebService byAddress = getByAddress(); > int i = 0; > while (i <= 300) { > Thread.ofVirtual().start(new Runnable() { > @Override > public void run() { > try > { byAddress.ratePlanSubmitRequest(""); } > catch (Exception e) { > if (!e.getCause().toString().contains("HTTP response")) > { e.printStackTrace(); } > } > } > } ); > i++; > } > Thread.sleep(100000); > } > public static class HTNGHeaderOutInterceptor1 extends > AbstractPhaseInterceptor<SoapMessage> { > static List<String> address = new ArrayList(); > public HTNGHeaderOutInterceptor1() > { super(Phase.PREPARE_SEND); address.add("https://www.baidu.com"); > address.add("https://www.tencent.com"); } > @Override > public void handleMessage(SoapMessage message) throws Fault > { int i1 = RandomUtils.secure().randomInt(0, 2); > message.put(org.apache.cxf.message.Message.ENDPOINT_ADDRESS, > address.get(i1)); } > } > public static HTNGOutboundWebService getByAddress() > { JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean(); > jaxWsProxyFactoryBean.setServiceClass(HTNGOutboundWebService.class); > jaxWsProxyFactoryBean.getOutInterceptors().add(new > HTNGHeaderOutInterceptor1()); HTNGOutboundWebService soap = > (HTNGOutboundWebService) jaxWsProxyFactoryBean.create(); return soap; } > public interface HTNGOutboundWebService > { @WebMethod(operationName = "RatePlan_SubmitRequest", action = > "http://htng.org/PWSWG/2010/12/RatePlan_SubmitRequest") @WebResult(name = > "OTA_HotelRatePlanNotifRS", targetNamespace = > "http://www.opentravel.org/OTA/2003/05", partName = > "OTA_HotelRatePlanNotifRS") public void ratePlanSubmitRequest( > @WebParam(partName = "OTA_HotelRatePlanNotifRQ", name = > "OTA_HotelRatePlanNotifRQ", targetNamespace = > "http://www.opentravel.org/OTA/2003/05") String aa ); } > } > -- This message was sent by Atlassian Jira (v8.20.10#820010)