You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Kessler, Joerg" <jo...@sap.com.INVALID> on 2022/05/13 07:04:08 UTC

no error when deploying two CXF endpoints using the same path/address

We use CXF in Apache Camel to process SOAP messages. We have some old Camel routes that use SOAP 1.1 in the CXF sender component. The new ones use SOAP 1.2. It turned out that it is possible  to use the same address in the endpoint if the SOAP versions are different. Looking in the CXF code it seems that  the class SoapBindingFactory   in method addListener(Destination d, Endpoint e)    only throws an error if the SOAP versions are matching:
if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                    && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                    && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                        .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                    && Boolean.FALSE.equals(o)) {

                    throw new RuntimeException("Soap "
                                               + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                                   .getSoapVersion().getVersion()
                                               + " endpoint already registered on address "
                                               + e.getEndpointInfo().getAddress());
                }
We are a little bit behind in the CXF version (3.2.11) but I think the code is the same in the master branch. Does it mean that this should work or is it a bug?

Best Regards,

Jörg

RE: no error when deploying two CXF endpoints using the same path/address

Posted by "Kessler, Joerg" <jo...@sap.com.INVALID>.
Could someone from the experts please comment on this problem? We have at least one case where this is not working.

-----Original Message-----
From: Kessler, Joerg <jo...@sap.com.INVALID> 
Sent: Freitag, 13. Mai 2022 09:04
To: users@cxf.apache.org
Subject: no error when deploying two CXF endpoints using the same path/address

[You don't often get email from joerg.kessler@sap.com.invalid. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification.]

We use CXF in Apache Camel to process SOAP messages. We have some old Camel routes that use SOAP 1.1 in the CXF sender component. The new ones use SOAP 1.2. It turned out that it is possible  to use the same address in the endpoint if the SOAP versions are different. Looking in the CXF code it seems that  the class SoapBindingFactory   in method addListener(Destination d, Endpoint e)    only throws an error if the SOAP versions are matching:
if (b instanceof org.apache.cxf.binding.soap.SoapBinding
                    && b2 instanceof org.apache.cxf.binding.soap.SoapBinding
                    && ((org.apache.cxf.binding.soap.SoapBinding)b).getSoapVersion()
                        .equals(((org.apache.cxf.binding.soap.SoapBinding)b2).getSoapVersion())
                    && Boolean.FALSE.equals(o)) {

                    throw new RuntimeException("Soap "
                                               + ((org.apache.cxf.binding.soap.SoapBinding)b)
                                                   .getSoapVersion().getVersion()
                                               + " endpoint already registered on address "
                                               + e.getEndpointInfo().getAddress());
                }
We are a little bit behind in the CXF version (3.2.11) but I think the code is the same in the master branch. Does it mean that this should work or is it a bug?

Best Regards,

Jörg