method AnnotationHandlerChainBuilder.patternMatches() causes CXF portability 
issues with other JAX-WS stacks
------------------------------------------------------------------------------------------------------------

                 Key: CXF-2117
                 URL: https://issues.apache.org/jira/browse/CXF-2117
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.4
            Reporter: Richard Opalka
             Fix For: 2.1.5, 2.2.1


If I have config like this:

<handler-chains xmlns="http://java.sun.com/xml/ns/javaee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler";
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
javaee_web_services_1_2.xsd">

  <handler-chain>
    <port-name-pattern>ns1:SOAPEndpoint*</port-name-pattern>
                <handler>
                        <handler-name> PortClientHandler </handler-name>
                        <handler-class> 
org.jboss.test.ws.jaxws.samples.logicalhandler.PortHandler </handler-class>
                </handler>
    </handler-chain>
  
</handler-chains>

the port-name-pattern matches e.g. SOAPEndpointDocPort on JBoss, Glassfish, 
Websphere but not on Geronimo.
The relevant piece of code is:

 private boolean patternMatches(Element el, QName comp) {
   ...
        if (localPart.contains("*")) {
            //wildcard pattern matching
            return Pattern.matches(localPart, comp.getLocalPart()); // 
PROBLEMATIC PART HERE
        } else if (!localPart.equals(comp.getLocalPart())) {
            return false;
        }
        return true;
    }

The problem is:

Pattern.matches("SOAPEndpoint*", "SOAPEndpointDocPort") returns false // CXF 
expects. SOAPEndpoint.* as wildcard which is not portable cross different APP 
servers

Consider fix that will match it, please.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to