In my legacy project I had to upgrade camel dependency org.apache.camel.springboot::camel-spring-boot-bom from version 3.7.4 to 3.17.0 and org.apache.cxf::cxf-bom from version 3.4.2 to 3.5.5.
With the versions 3.7.4 for camel and 3.4.2 for cxf I got the QName with following few lines:
import javax.xml.namespace.QName;
import org.apache.camel.Exchange;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.message.Message;
import org.apache.camel.component.cxf.common.message.CxfConstants;
final Map<String, Object> messageHeaders = exchange.getIn().getHeaders();
SoapMessage soapMessage = (SoapMessage) messageHeaders.get(CxfConstants.CAMEL_CXF_MESSAGE);
QName serviceName = QName.valueOf(soapMessage.get(Message.WSDL_SERVICE).toString());
with the newer versions camel 3.17.0 and cxf 3.5.5 I had to rewrite it to following
final Map<String, Object> jaxwsContextProperties = (Map<String, Object>) exchange.getProperties().get(CxfConstants.JAXWS_CONTEXT);
QName serviceName = (QName) jaxwsContextProperties.get(Message.WSDL_SERVICE);
I couldn't find those changes or related ones in any release notes. Every hint where on the way this got changed is very much appreciated! Thanks a lot!