You can define an EJB web service to use with WebSphere®. If you add more services after you define the EJB web services, you repeat the
procedure again.
Procedure
- In the <INSTALL_DIR>/repository/eardata/platform/webservices folder,
locate the namedwebservices.xml.sample file. Rename (or copy) it to
namedwebservices.xml. This is the file you will edit.
- In namedwebservices.xml, specify each API
you want to expose as a web service in an Api/Name attribute.
- Property
- Description
- ServiceName
- The name of the service that you configured using
the Service Definition Framework (SDF).
- ExposedName
- The name that is used in the Web Services Description
Language (WSDL) file. This is the name that is used to call the web
service programmatically. When specifying a service name for ExposedName,
choose a literal that does not match any of the standard application
API names.
The exposed name must start with a lower
case letter.
- Set the properties necessary for your application
server in sandbox.cfg:
- Parameter
- Description
- WAS_DIR
- Set the value to specify the <WAS_HOME> directory.
(You may need to create the property.)
Required if
building EJB Web services.
For WebSphere only
- WEBSERVICES_BUILDS
- Takes a comma-separated list that can include YIFWebService
and SIXBeanXapiJaxWS. Defaults to YIFWebService.
Required
for EJB and JAX-WS Web services, on all application servers.
- Save the file, navigate to the bin directory,
and run the setupfiles command:
Note: If
you receive a "permission denied" error when performing this step,
grant the build user write permission to the subdirectory referenced
in the error message.
- For UNIX/Linux: <INSTALL_DIR>/bin/setupfiles.sh
- For Windows: <INSTALL_DIR>\bin\setupfiles.cmd
- Create the EAR. The Web services defined
in the file will be built when you create the application EAR.
- Later, if you want to add more APIs and services
as EJB Web services, repeat these steps.