Trying to move from java8 to java17. Same request was being used in java8 too. But in java8 response , not seeing namespace - "xmlns:SOAP-ENV" , also <SOAP-ENV:Header></SOAP-ENV:Header>.
So I need to remove --> namespace - "xmlns:SOAP-ENV" , also <SOAP-ENV:Header></SOAP-ENV:Header>
Using jars : jakarta.xml.ws : jakarta.xml.ws-api : 4.0.0
Also using wsdl (not xslt)
Using class - SoapMsgHandler implements SOAPHandler<SOAPMessageContext>
Request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
//has data here
</soapenv:Body>
</soapenv:Envelope>
Current Response :
<?xml version="1.0" ?>
<S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header></SOAP-ENV:Header>
<S:Body>
//has data here
</S:Body>
</S:Envelope>
Expected Response:
<?xml version="1.0" ?>
<S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
// has data here
</S:Body>
</S:Envelope>
handler-chain.xml :
<handler-chains xmlns="https://jakarta.ee/xml/ns/jakartaee">
<handler-chain>
<handler>
<handler-class>com.xyz.SoapMsgHandler</handler-class>
</handler>
</handler-chain>
</handler-chains>