https://linen.dev logo
#help
Title
# help
e

Erik Johansson

02/16/2024, 12:57 PM
Hi! Im trying to use wiremock to mock a soap web service. It should receive some binary data and send som binary data back. According to wireshark, wiremock seems to respond with: 101 Switching protocols and a header Upgrade: h2c. I have not defined this mapping myself. The client application is running on quarkus, java 17, and uses camel-cxf to call the web service. I see this exception in the log: Exhausted after delivery attempt: 1 caught: java.io.IOException: Can't get stream 1: java.io.EOFException: EOF reached while reading: java.io.IOException: Can't get stream 1: java.io.EOFException: EOF reached while reading The client code works When running against the real web service. It also seems to work (with wiremock) when downgrading the version of quarkus to an earlier version that does not use the jakarta packages. Any help appreciated!
t

Tom

02/16/2024, 3:03 PM
It looks like your client is negotiating an HTTP/2 upgrade but something’s not working about it. You could try disabling HTTP/2 in WireMock so that it won’t attempt protocol changes like this.
e

Erik Johansson

02/19/2024, 8:17 AM
How do I do that?
t

Tom

02/19/2024, 9:50 AM
Apologies, I’d (mis)remembered adding a config flag for the HTTP/2 connector, but it seems I didn’t. If you’re starting WireMock from Java you could copy/paste the Jetty HTTP server impl and remove the HTTP/2 connector lines. Another (probably simpler) thing to try is to see if there’s a config option in the Camel client that does one of a) fixing the protocol at HTTP/1.1 or b) disables ALPN.
e

Erik Johansson

02/19/2024, 11:24 AM
Ok, thanks for your response.
61 Views