[
https://issues.apache.org/jira/browse/CXF-8923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno updated CXF-8923:
-----------------------
Priority: Major (was: Minor)
> HTTP/2 - Downgrade protocol with server that doesn't aceept HTTP/2 under HTTP
> -----------------------------------------------------------------------------
>
> Key: CXF-8923
> URL: https://issues.apache.org/jira/browse/CXF-8923
> Project: CXF
> Issue Type: Bug
> Affects Versions: 4.0.1
> Environment: * Client: Quarkus 3.1.0.Final (Quarkus CFX 2.1.0 -
> Apache CXF 4.0.1)
> * Server: SAP NetWeaver 7.5
> Reporter: Bruno
> Priority: Major
> Attachments: image-2023-09-01-12-01-31-850.png,
> image-2023-09-01-12-06-40-208.png
>
>
> h1. Problem
> When trying to consume a SOAP service with a server that doesn't accept
> HTTP/2 under HTTP, the Apache-CXF agent doesn't downgrade the protocol to
> resend the request with HTTP 1.1.
> h1. Context
> I'm trying to consume a SOAP service. The service is exposed via HTTP. The
> problem is that when consuming this service I get the following error:
> {code:java}
> Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '403:
> (POST
> http://productionServer/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_I4D_FI_100&receiverParty=&receiverService=&interface=SI_SAP_MaestroProveedores_sync_out&interfaceNamespace=http://imm.gub.uy/SAP/MaestroProveedores)
> 403' when communicating with
> http://productionServer/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_I4D_FI_100&receiverParty=&receiverService=&interface=SI_SAP_MaestroProveedores_sync_out&interfaceNamespace=http://imm.gub.uy/SAP/MaestroProveedores
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1653)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1660)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1602)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1396)
> at
> org.apache.cxf.ext.logging.LoggingOutputStream.postClose(LoggingOutputStream.java:53)
> at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:228)
> at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
> ... 39 more
> {code}
> Further beyond the error, I used wireshark to access the request and
> response. The thing is that Apache is using HTTP/2 and the server doesn't
> accept this protocol, so it denys the request as we can see in this image:
> !image-2023-09-01-12-01-31-850.png|width=543,height=367!
> When I change the client to use HTTP 1.1, it works correctly:
> {code:java}
> Client client = ClientProxy.getClient(myService);
> HTTPConduit http = (HTTPConduit) client.getConduit();
> http.getClient().setVersion("1.1");
> {code}
> !image-2023-09-01-12-06-40-208.png|width=650,height=402!
> So, shouldn't it work just out of the box (the client negotating with the
> server) without changing the version to HTTP 1.1?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)