glassfish
  1. glassfish
  2. GLASSFISH-574

Web Service Endpoint Specification Needs Improvement

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 9.0pe
    • Fix Version/s: not determined
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      574

      Description

      See also this related issue: 482

      The specification of web service endpoint in Glassfish needs to be rationalized
      and professionalized. First of all, the default endpoint URL assigned to a web
      service varies depending on whether you deploy it as an EJB endpoint or a
      serlvet endpoint. There should be no difference. The default URL for a WAR
      deployment is:

      http://<hostname[:port]>/<web module>/<simple name of the Service Class>

      Whereas, when using a EJB-JAR, it is:

      http://<hostname[:port]>/<simple name of the Service Class> + "Service"/<simple
      name of the Service Class>

      In the WAR case, the module name is part of the URL, and in the EJB-JAR case, it
      is not. I believe that the default behavior in both cases should look like the
      EJB-JAR case. The file name of the web module should be irrelevant to deployment.

      Secondly, the hostname selected by GlassFish is something of a mystery and is
      outside the deployer's control. See this thread fron the SDN forum:
      http://forum.java.sun.com/thread.jspa?threadID=725485&tstart=0

      There needs to be a mechanism by which the deployer can specify the hostname
      that gets used in the WSDL (other then providing the entire WSDL file). This is
      a real showstopper problem if you need to publish a WSDL that works outside a
      firewall and GlassFish is using an internal hostname that can't be resolved on
      the WWW.

      Thirdly, there needs to be a better way to specify a custom context-root for the
      EJB-JAR deployment scenario. When deploying a WAR, you can use the asadmin
      deploy command with the --contextroot flag. However, this isn't applicable in
      the EJB-JAR case. For the EJB-JAR, it seems that the only way to do it is to
      provide a sun-ejb-jar.xml deployment descriptor with an endpoint-address-uri set
      to the context-root desired. In this case, I think that the --context-root flag
      should also work for the EJB-JAR case, and the value provided by the deployer
      should be inserted into the internally generated sun-ejb-jar.xml by GlassFish at
      deploy time.

        Activity

        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Hide
        vijaysr added a comment -

        Reassigning to Mike

        Show
        vijaysr added a comment - Reassigning to Mike
        Hide
        khookguy added a comment -

        Regarding module name, I agree that it is fine as the default context-root for
        avoiding name collisions. However, I believe that there needs to be a
        consistent means (across servlet and EJB endpoints) that allows the deployer to
        specify a context-root. For many Web Services applications, it is desirable to
        be able to specify the endpoint address of the service to have a URL that
        conforms to naming standards (or is just easy to read) that have nothing to do
        with the fact that it is deployed on a Java EE 5 container.

        Show
        khookguy added a comment - Regarding module name, I agree that it is fine as the default context-root for avoiding name collisions. However, I believe that there needs to be a consistent means (across servlet and EJB endpoints) that allows the deployer to specify a context-root. For many Web Services applications, it is desirable to be able to specify the endpoint address of the service to have a URL that conforms to naming standards (or is just easy to read) that have nothing to do with the fact that it is deployed on a Java EE 5 container.
        Hide
        tomo_ikeda added a comment -

        About first point, I don't think that Web Module is irrelevant.
        End Point Address should include the Web Module name.
        Because, if there are two or more Service Implementation Beans with the same
        name in different Web Modules, End Point Addresses conflict.
        For EJB model, module name may be irrelevant.
        But as long as we conform to the servlet specification of Java EE, the Web
        Module name should be a part of the http URL address.
        The most important thing is to avoid name collisions.
        So, I think that the default End Point Address should be :
        http://<hostname[:port]>/<Web Module name>/<fully qualified name of the Service
        Class>
        FYI, default Service Class name is Service Implementation Bean name + "Service".

        Show
        tomo_ikeda added a comment - About first point, I don't think that Web Module is irrelevant. End Point Address should include the Web Module name. Because, if there are two or more Service Implementation Beans with the same name in different Web Modules, End Point Addresses conflict. For EJB model, module name may be irrelevant. But as long as we conform to the servlet specification of Java EE, the Web Module name should be a part of the http URL address. The most important thing is to avoid name collisions. So, I think that the default End Point Address should be : http://<hostname [:port] >/<Web Module name>/<fully qualified name of the Service Class> FYI, default Service Class name is Service Implementation Bean name + "Service".
        Hide
        khookguy added a comment -

        Correction:

        The default URL for a WAR deployment is:

        http://<hostname[:port]>/<web module>/<simple name of the Service Class>
        + "Service"

        Show
        khookguy added a comment - Correction: The default URL for a WAR deployment is: http://<hostname [:port] >/<web module>/<simple name of the Service Class> + "Service"

          People

          • Assignee:
            mikeg
            Reporter:
            khookguy
          • Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: