Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2117

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • 2.1.5, 2.2.1
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              opalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: