Sun GlassFish Enterprise Server 2.1 Developer's Guide

Using Application Server Descriptors

To determine whether a web service endpoint is enabled in the JBI runtime environment, you can set a jbi-enabled attribute in the Enterprise Server. This attribute is set to false (disabled) by default. To enable an endpoint for JBI, set the attribute to true using the asadmin set command. For example, if an endpoint is bundled as a WAR file named my-ws.war with an endpoint named simple, use the following command:


asadmin set --user adminuser server.applications.web-module.my-ws.web-service-endpoint.simple.jbi-enabled=true

Determining whether requests from a web service consumer are routed through the Java EE Service Engine is unnecessary and deprecated, but supported for backward compatibility. You can set a stub-property named jbi-enabled in the consumer's sun-web.xml or sun-ejb-jar.xml file. This property is set to true (enabled) by default. Here is an example of the sun-web.xml file:

<sun-web-app>
  <service-ref>
    <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
    <port-info>
      <wsdl-port>
        <namespaceURI>http://example.web.service/Calculator</namespaceURI>
        <localpart>CalculatorPort</localpart>
      </wsdl-port>
      <service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
      <stub-property name="jbi-enabled" value="true"/>
    </port-info>
  </service-ref>
</sun-web-app>

For more information about the sun-web.xml and sun-ejb-jar.xml deployment descriptor files, see the Sun GlassFish Enterprise Server 2.1 Application Deployment Guide.