EGL Reference Guide for iSeries
An EGL Web service is a set of operations with these
characteristics:
- Is invoked by a program interface over the Internet
- Is implemented by one or more EGL-generated programs
For a description of the components of a Web service and the uses of a Web
service definition file, see EGL Web service.
Before you can create an EGL Web service, you must have access to one or
more EGL files (extension .egl) that each contains a program.
Any program may be incomplete, but the parameters must be fully
specified.
To create an EGL Web service, do as follows:
- Click File > New > Other; and at the New screen, click
Web Services, then Web Service, then Next
- Work through the pages of the EGL Web service wizard:
For background information, review material on Web services, including
these help topics:
- The Server Tools
- Tools for Web services development
- Universal Test Client
Do as follows at the Web Services page:
- In the list box for Web service type, select EGL Web Service
- If you want to test the Web service in the WebSphere Test Environment,
select the check box for Start Web service in Web project
- If you intend to publish the Web service to a Universal Description,
Discovery, and Integration (UDDI) directory, select the check box for
Launch the Web Services Explorer
- To generate a Java proxy for client-side access of the EGL Web service,
select the check box for Generate a proxy; you need the proxy to
test the Web service in the WebSphere Test Environment.
- If you want to test the proxy, you also need to select the check box for
Test the generated proxy
- If you want to avoid confirmation messages when writing to existing files,
select the check box for Overwrite files without warning
- If you want to avoid manual setup of file-system folders, select the check
box for Create folders when necessary
- If you want to avoid confirmation messages when checking files out of a
repository, select the check box for Check out files without warning
- Click Next
Do as follows at the Service Deployment Configuration page:
- Use the default values in this situation--
- You intend to use the IBM SOAP run time
- You are creating the EGL Web service for use in the test environment of
WebSphere Application Server Version 5.1
If you are not using the defaults, click on the Edit button in the
Server-Side Deployment Selection box. Select values for the run-time
protocol and for the web application server.
- In the Service Web project field, specify the Web project where you want
to store the Web service Java bean. Select a service project
EAR.
- If you selected Generate a proxy on the Web services page, and
you are not using the defaults, click on the Edit button in the
Client-Side Environment Selection box. Select values for the run-time
protocol and for the web application server. Select a client type,
client project, and project EAR.
- Click Next.
Do as follows at the EGL Web Service page:
- Click the radio button that indicates one of two alternatives:
- You are creating a new EGL Web service without using a Web service
definition file as the basis of your work; or
- You are using a Web service definition file, either to create a Web
service from scratch or to update a bean and proxy. An update is
necessary, for example, if you change the parameters of an EGL program used in
the Web service.
- Specify the name of the package that will contain the EGL Web service Java
bean. If you do not name the package, the Wizard uses the default
package, with these results:
- The Java bean will include no package statement.
- In the Web project, the Java bean source file will reside directly in the
Java Source directory; and the Java bean class file will reside directly
in the WEB-INF/classes directory.
- Click Next.
Your tasks at the EGL Web Service Definition page vary as follows:
- If you are using a Web service definition file, select the file from a
pulldown list and click Next.
- Alternatively, if you are creating a new EGL Web service without using a
Web service definition file, your tasks are these--
- Specify the name of the Web service. The Web service name cannot
include a currency symbol or hyphen and cannot be the same as an operation
name; for other details, see Naming conventions.
- Select the check box next to each EGL program that you want to use in the
Web service.
- If you want to create an EGL Web service definition file, select the check
box toward the bottom of the page, then identify a folder for the file:
- Type the path (relative to the workspace); or
- Click the Browse button and, when a list is displayed, expand
folders as needed and double-click a folder name.
The file name is the Web service name plus the extension
.eglwsd.
- Click Next.
At the Web Service Mapping page, you map the previously selected EGL
programs to Web service operations. For each entry in the list at the
top of the page, do as follows:
- Click the program name.
- Either type an operation name into the Operation Name text box or
accept the displayed value. You are required to specify an operation
name explicitly if the program name is invalid as an operation name; for
details, see Naming conventions.
- In the Operation Input Parameters area, select the check box for each EGL
program parameter that you want to expose as an input parameter for the Web
service operation.
- In the Operation Output Parameters area, select the check box for each EGL
program parameter that you want to expose as an output parameter for the Web
service operation.
- Click Next.
Do as follows at the Web Service Java Bean Selection page:
- Enter the name of the Java bean to be used to create the Web
service. Click the Browse classes button to view the bean
class of the selected Java bean. Click Browse files to select
a Java bean from the project.
- Check the box if you want to use an existing service endpoint interface
(SEI), then enter the location of the service endpoint interface, browse the
file system to locate it, or select from the classes included with WebSphere
Studio.
- Click Next.
Do as follows at the Web Service Java Bean Identity page:
- In the Web Service URI text box, type the Uniform Resource
Identifier (URI) that provides Internet access to your Web service.
The default base http://tempuri.org/ comes from the WSDL
specification of the World Wide Web consortium. You can use that base
when testing the Web service in the WebSphere Test Environment. When
you deploy the Web service, however, the URI should start with your
organization's Web address or with another unique namespace.
- Select the check box for Use static methods; you do not need
the Web service Java bean to be instantiated at run time.
When you select Use static methods, the value in the
Scope text box has no effect.
- If you wish to deploy the Web service with Secure Digital Signature
security in the WebSphere Application Server, select the check box for Use
secure SOAP. For details on security, see SOAP
Security Extensions: Digital Signature
(www.w3.org/TR/2001/NOTE-SOAP-dsig-20010206).
The first Web service in a project determines whether a secure SOAP runtime
is in use for any Web services in the project. Secure and non-secure
Web services cannot coexist, but you can change the security status for the
project in this way:
- Open the project file web.xml in the Web Deployment Descriptor
editor or in an XML or text editor
- Remove the <servlet> elements for rpcrouter and messagerouter:
<servlet>
<servlet-name>rpcrouter</servlet-name>
.
.
.
</servlet>
<servlet>
<servlet-name>messagerouter</servlet-name>
.
.
.
</servlet>
- Re-run the EGL Web services wizard and choose a different setting for
Use secure SOAP
Also, if you are using the wizard to create a proxy, be aware that when you
select or clear the check box for the security status of the Web service, the
wizard assigns the same default value for the security status of the
proxy. The two security statuses should be the same.
- In the Web Service URI text box, type (or accept the existing
value for) the path of the ISD file, which is the service-specific deployment
descriptor used by the SOAP run time. The path is relative to the
workspace, and the default is appropriate in most cases.
- In each of the WSDL-related text boxes, type (or accept the existing value
for) the path of the document or folder specified. The path is relative
to the workspace, and the default is appropriate in most cases.
- If the defaults on subsequent pages in the wizard are appropriate (as is
true in most cases), click Finish. If you wish to explore
those pages, click Next as necessary, then click
Finish.
Related concepts
EGL Web service
Application testing and publishingJava wrapper
Linkage options part
SOAP Security Extensions: Digital Signature
(www.w3.org/TR/2001/NOTE-SOAP-dsig-20010206)
Tools for Web services development
Web services overview
Related tasks
Adding a build descriptor part
Adding a linkage options part
Creating an EGL Web service definition file
Related reference
Java wrapper classes
linkage
Naming conventions
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.