WebSphere Application Server supports directly accessing an enterprise
bean as a Web service, as an alternative to using HTTP or Java Message Service
(JMS) to transport requests between the server and the client. The EJB module
that is used as a Web service contains a Web Services Description Language
(WSDL) file that contains EJB bindings.
About this task
Note: The Feature Pack for Web Services does
not support JMS transports or EJBs. This release only supports JavaBeans endpoints
within the Web container for JAX-WS Web services applications. To develop
Web services based on EJBs, you must use the JAX-RPC programming model. Also,
JAX-WS applications cannot use JMS as a transport for Web service
requests; you must use HTTP as the transport instead. You can use the default
messaging provider, which uses JMS, within a JAX-WS application, as long as
you do not use the provider for Web service requests.
Configuring a
service endpoint is necessary to connect Web service clients to any Web services
among the components being assembled or to any external Web services.
You
can specify Web address endpoints of the enterprise bean for Web services
that are accessed directly by EJB bindings using the Provide JMS and EJB endpoint
Web address information panel in the administrative console.
If you
have modules that are configured for using direct EJB access, the modules
are listed on the Provide JMS and EJB endpoint Web address information panel
in the administrative console. The EJB endpoint is only available in the WSDL
that is found in the application_name_ExtendedWSDLfiles.zip file.
You
can specify a fragment of the endpoint Web address for the Web services in
each module.
To configure the Web address endpoints of the enterprise bean
with the administrative console:
Procedure
- Open the administrative console.
- Click Applications > Enterprise Applications > application_instance > Provide
JMS and EJB endpoint URL information.
- Locate the list of EJB modules.
- Select the application module.
- Type the Web address fragment in the URL fragment field.
Enter a Web address fragment that is a suffix to the initial Web
address part that is obtained by examining the Web service deployment information.
See the example following this task for more information.
The value
that you enter is used to define the location attribute of the port generic:address
element within the WSDL file that is published using the application_name_ExtendedWSDLFiles.zip file
name link on the Publish WSDL zip files panel. The zip file names are listed
as links on the panel.
- Click OK.
- Click Save.
Results
You have configured endpoints of the enterprise bean for Web services
that are accessed directly by EJB bindings.
Example
The following example illustrates a Web address fragment to enter
in the URL fragment field.
The following Web address information can
be obtained from the deployment descriptor of an enterprise bean:
wsejb:/com.acme.sample.MyStockQuoteHome?jndiName=ejb/MyStockQuoteHome
Enter
the following Web address fragment in the URL fragment field:
jndiProviderURL=corbaloc:iiop:myhost.mycompany.com:2089
The
results are shown in the following example:
wsejb:/com.acme.sample.MyStockQuoteHome?jndiName=ejb/MyStockQuoteHome&jndiProviderURL=
corbaloc:iiop:myhost.mycompany.com:2089