Hi Jörg,
I found that in general, endpoints with same URL but different SOAP version 
work. But I found two problems:

  1.  Stopping a route that registered  a specific endpoint URL (i.e. for SOAP 
1.1) will shutdown all endpoints of that URL (also SOAP 1.2 endpoint registered 
by different route)
  2.  There are some features (i.e. 
CounterRepository<https://github.com/apache/cxf/blob/master/rt/management/src/main/java/org/apache/cxf/management/counters/CounterRepository.java>)
 which seem to have problems with using sameURL/differentSOAP version. I found 
they throw NullPointerException and return HTTP200 with an empty body.
I created a reproducer for both problems:
https://github.com/mash-sap/CXFEndpointsAndSOAPVersions
Best regards,
Manuel

On 2022/05/13 07:04:08 "Kessler, Joerg" wrote:
> 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
>

Reply via email to