glassfish
  1. glassfish
  2. GLASSFISH-8615

service-name-pattern does not work in handlers.xml

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: v2.1
    • Fix Version/s: None
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      8,615
    • Status Whiteboard:
      Hide

      v3_exclude, v2.1.1_exclude

      Show
      v3_exclude, v2.1.1_exclude

      Description

      I have created a simple WS Handler and installed using handlers.xml. Everything
      works fine, until I've tried to restrict a handler chain to a specific service,
      when the namespace information is lost. Here is the content of handlers.xml:

      <handler-chains>
      <handler-chain name="defaultChain">
      <service-name-pattern xmlns:ns1="http://test/">
      ns1:*Service
      </service-name-pattern>
      <handler>
      <handler-name>WSSecurityHandler</handler-name>
      <handler-class>test.WSSecurityHandler</handler-class>
      </handler>
      </handler-chain>
      </handler-chains>

      And here is the Webservices.xml I got from GF admin console after deployment:
      (notice: <service-name-pattern>

      {null}*Service</service-name-pattern>)


      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <webservices xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
      <webservice-description>
      <display-name>TestService</display-name>
      <webservice-description-name>TestService</webservice-description-name>
      <port-component>
      <port-component-name>TestBean</port-component-name>
      <wsdl-service xmlns:ns1="http://test/">ns1:TestService</wsdl-service>
      <wsdl-port xmlns:ns1="http://test/">ns1:TestPort</wsdl-port>
      <service-endpoint-interface>test.TestBean</service-endpoint-interface>
      <service-impl-bean>
      <ejb-link>TestBean</ejb-link>
      </service-impl-bean>
      <handler-chains>
      <handler-chain>
      <service-name-pattern>{null}

      *
      </service-name-pattern>
      <handler>
      <handler-name>WSSecurityHandler</handler-name>
      <handler-class>test.WSSecurityHandler</handler-class>
      </handler>
      </handler-chain>
      </handler-chains>
      </port-component>
      </webservice-description>
      </webservices>

      I've tested the same test case on the previous version of Glassfish and it works
      fine.

        Activity

        Hide
        razvan_petrescu added a comment -

        Found something - it works if the handlers.xml file contains this:
        <service-name-pattern xmlns:ns1="http://test/">ns1:*Service</service-name-pattern>

        instead of

        <service-name-pattern xmlns:ns1="http://test/">
        ns1:*Service
        </service-name-pattern>

        Should these newlines matter in an XML file ???

        Show
        razvan_petrescu added a comment - Found something - it works if the handlers.xml file contains this: <service-name-pattern xmlns:ns1="http://test/">ns1:*Service</service-name-pattern> instead of <service-name-pattern xmlns:ns1="http://test/"> ns1:*Service </service-name-pattern> Should these newlines matter in an XML file ???
        Hide
        razvan_petrescu added a comment -

        Glassfish V3 is miles away of being production ready (with all the stuff already
        present in 2.1) so it should be fixed in the following releases of V2 branch.

        Show
        razvan_petrescu added a comment - Glassfish V3 is miles away of being production ready (with all the stuff already present in 2.1) so it should be fixed in the following releases of V2 branch.
        Hide
        razvan_petrescu added a comment -

        Changed user, because I got no feedback in a month on a sensitive issue

        Show
        razvan_petrescu added a comment - Changed user, because I got no feedback in a month on a sensitive issue
        Hide
        kumara added a comment -

        Changing version from 9.1.1 to v2.1 to reflect new name/version.

        Show
        kumara added a comment - Changing version from 9.1.1 to v2.1 to reflect new name/version.
        Hide
        Bhakti Mehta added a comment -

        Added keyword

        Show
        Bhakti Mehta added a comment - Added keyword
        Hide
        Ed Bratt added a comment -

        Will not fix in v2.1.1

        Show
        Ed Bratt added a comment - Will not fix in v2.1.1

          People

          • Assignee:
            Bhakti Mehta
            Reporter:
            razvan_petrescu
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: