A SOAP service binding gives details necessary to access
a SOAP service.
Prerequisites
In your workspace, you must
have the following files:
- A Web Services Description Language (WSDL) file that gives details
on the service being accessed. For details about the purpose of this
file, see “Architectural styles in web services.”
- A deployment descriptor. For details about creating the file,
see “Creating an EGL deployment descriptor.”
Adding the SOAP service binding
- Open the EGL Deployment Descriptor editor by double-clicking the
EGL deployment descriptor.
- Click Service Bindings. The Service
Bindings Configuration tab is displayed.
- Click Add. The Add a Service
Binding page is displayed.
- Click SOAP service binding and then click Next.
The Add a REST Service Binding page is displayed.
- If the WSDL file is not in your project but is elsewhere in your
workspace, select Choose WSDL file from workspace and copy
it to the current project:
- If that check box is selected, click Browse and
search your workspace for the file.
- If that check box is clear, click Browse and
search in the EGL source folders of your project and in the EGL source
folders of any project in the EGL build path of your project.
- Under Interface Options, select a way to create or provide an
Interface part:
- To create the part, click Generate EGL Interface from
WSDL file.
The part creation is helpful when names that
are copied from the WSDL file are not valid in EGL or when you want
to use an EGL package name that is not derived from the WSDL file.
For details, see “@xml.”
- To use an existing part, click Use existing EGL interface,
click Browse, and select that part. The purpose
is convenience: when you work on the service binding in the EGL deployment
descriptor editor, you can quickly access the part.
The Interface
part can be a Service part that you will use when creating a service-access
variable, as if the Service part were an Interface part.
- For the SOAP service binding name, either accept the default value,
which is the name of a portType entry in the WSDL file, or type a
different name.
You specify the name when you declare a service-access
variable and set the @BindService property, bindingKey field.
- In the WSDL URI field, accept the default
value, which is the service-location detail that is specified in the
WSDL file, or type a different value. The service-location detail
in the WSDL file is in the soap:address element, in the location attribute.
You
might type the service-location detail in the WSDL URI field
to cause runtime access of a test version of the service.
- If you selected Use existing EGL interface,
click Finish. Otherwise, click Next to
display the first New EGL Interface page.
- Select the web service (that is, the WSDL file port entry) from
which you want to create Interface parts.
- Click Next to display the second New
EGL Interface page.
- Do as following for the portType entry related to the selected
web service:
- Accept or update the name of the new Interface part.
- Select or clear check boxes to specify which operations in the
portType entry will be represented in the new Interface part.
- In the Source folder, Package,
and EGL source file name fields, specify the
location and name of the file that will contain the new Interface
parts.
- If you want to reference the Interface parts in a Rich UI application,
select Create the interface and data to be compatible with
Rich UI applications.
- If you want to overwrite the same-named EGL files, select Overwrite
existing files.
- Click Finish. The Service Bindings
Configuration tab is available again.
In the future,
you can update the service binding that you just defined:
- Open the Service Bindings Configuration tab.
- Select the binding.
- Edit the displayed information.
The tab includes the
enableGenerate check
box. The purpose of that check box is as follows:
- For requesters being generated to COBOL, this option specifies
whether to generate the web service access layer when you generate
the deployment descriptor. You must generate the web service access
layer at least once so that EGL will create the code necessary to
access the service. After you have generated the web service access
layer, you do not need to generate it again unless you change the
information in the service binding. Generating the web service access
layer can be time consuming, so you might want to clear this check
box to save time.
- For requesters being generated to Java™,
this option specifies whether to add binding information to the binding
file in the generated output. This information is required, so you
must select this option for requesters being generated to Java.
- If required, specify the User ID and Password needed to invoke the SOAP service. These credentials will be placed as plaintext in the generated SOAP request header.
For details about a shortcut used to create a SOAP service
binding, see “Creating an Interface part to access a SOAP service.”