My client is using org.springframework.ws:spring-ws-core:4.0.11
, which internally relies on Jakarta XML Web Services (JAX-WS).
I need to generate a client proxy for a web service that supports both SOAP 1.1 and 1.2 protocols. The proxy is generated via the wsimport
Maven plugin from the WSDL. However, the auto-generated client is defaulting to SOAP 1.1, and I need it to use SOAP 1.2.
Current Implementation:
var service = new TargetWebService(); // Auto-generated from WSDL
var port = service.getPort(TargetWebServiceSoap.class);
BindingProvider bp = (BindingProvider) port;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, properties.url());
Internally, the binding is set to use SOAP 1.1, but I can’t find a way to change it to SOAP 1.2 or modify how the Binding is created.
Question:
How can I configure the client to use SOAP 1.2 instead of SOAP 1.1?
What I Have Tried:
- I have explored changing the binding properties, but I can’t find documentation on how to explicitly switch the SOAP version.
- The generated classes don’t seem to provide any straightforward methods to configure the SOAP version.
Desired Outcome:
I need to force my client to use protocol version 1.2.
2