Using the deployment descriptor with services

When you write a service or service client in EGL, you must create an EGL deployment descriptor to accompany it. The deployment descriptor file contains both the information describing how your logic parts call services, and information describing how your EGL services are wrapped with a Web service and exposed to external applications.

When used with Java™ generation, the generating EGL deployment descriptor files result in a runtime binding file (using the naming convention ddname-bind.xml). When used with COBOL generation, a binding program is generated instead. This topic includes information about the EGL deployment descriptor editor, the different types of information included in the EGL deployment descriptor, and what happens when you generate the EGL deployment descriptor.

Overview

An EGL service application consists of four possible elements (as described in the topic "Elements of a service application" in the EGL Programmer's Guide):
  • Service part
  • Interface part
  • EGL deployment descriptor
  • WSDL file
EGL does not create these parts and files automatically. The deployment descriptor associated must be created explicitly and added to the deploymentDescriptor build descriptor option. For instructions on creating a deployment descriptor, see the topic "Creating a deployment descriptor file" in the EGL Programmer's Guide.

After you create the EGL deployment descriptor for your service application, you can add binding information to it with the EGL Deployment Descriptor Editor.

The remainder of this topic deals with the EGL Deployment Descriptor Editor. However, in the sections that describe the information contained in the deployment descriptor file, there are samples which show the actual XML code that matches the selections you make in the graphical editor. You can see this XML in your own deployment descriptor file by opening it in a text editor.

Overview of the EGL Deployment Descriptor Editor

When the EGL Deployment Descriptor Editor opens, you see the following pages:
  • Overview
  • Service Client Bindings
  • Web Service Deployment
The following sections will give you more detailed information about the actions you can perform on each page of the editor.

Overview page

The Overview page is where you enter the alias for your EGL deployment descriptor, if you must designate one. You also have the choice of either copying settings from another deployment descriptor file, or including another deployment descriptor file in the file you are creating.

Clicking Copy from another EGL deployment descriptor opens the Copy from another egldd file window. Here, you can enter the name of another EGL deployment descriptor file, or click the Browse button to navigate to it. When you choose a file, the window displays a list of settings in the window for you to choose from.

Below the Copy from another EGL deployment descriptor link is a section labeled Includes and a table labeled EGL Deployment Descriptor (egldd) File Location. You can click the Add button to open the Include Another EGL Deployment Descriptor File window.

The difference between including another deployment descriptor file and copying one is that when you include one EGL deployment descriptor in another, if the original deployment descriptor is changed and generated, the new file is updated automatically. When you copy information from another deployment descriptor into your new file, if the original is changed, you will have to update your new file manually.

Service Client Bindings page

A binding is information that describes the location of the service that a client is using, and indicates a protocol for communicating with the service. Go to the Service Client Bindings page of the EGL Deployment Descriptor Editor to add this binding information.

To add a new service client binding, see the topic "Adding service client binding information for an EGL service" in the EGL Programmer's Guide.

After you add a binding to the list, you can change the protocol used in the binding or the attribute values for that protocol. You can also click Shared Protocols at the bottom of the page and define a communications protocol that will be used by more than one service binding. When you have a shared protocol defined, that sharable protocol will be added to list of available protocol choices on the page. The choices on this page depend on the type of service and the protocol used to access the service; see Deployment descriptor options for service clients for more information.

The following example shows a sample EGL deployment descriptor, including two bindings to Web services, one binding to an EGL service, and a shared protocol being used to contact the EGL service:
<deployment>
  <bindings>
    <webBinding interface="sample.ConvertTemperature" name="ConvertTemperature"
       uri="" wsdlLocation="ConvertTemperature.wsdl" wsdlPort="ConvertTemperature"
       wsdlService="ConvertTemperatureService"/>
    <webBinding interface="sample.ConvertTemperature"
       name="ConvertTemperatureWithSharedProtocol" uri="" 
       wsdlLocation="ConvertTemperature.wsdl" wsdlPort="ConvertTemperature" 
       wsdlService="ConvertTemperatureService"/>
    <eglBinding alias="" name="myEGLBinding" serviceName="services.myEGLService">
      <egl:protocol.ref ref="mySharedProtocol"/>
    </eglBinding>
  </bindings>
  <protocols>
    <egl:protocol.cicsssl name="mySharedProtocol" conversionTable="conversionTable"
     location="location"/>
  </protocols>
</deployment>

Web Service Deployment page

EGL logic parts can call an EGL service even if that service is on a remote system. However, if you want to make your EGL services available to non-EGL programs and services, you must generate the service as a Web service. The Web Service Deployment page shows the Service parts that you are deploying as Web services. To add a new Web service deployment to your EGL deployment descriptor file, see the topic "Adding Web service deployment information to the deployment descriptor" in the EGL Programmer's Guide. That topic describes the different fields on the page and what values to enter. For a description of each field and which apply to which type of service, see Deployment descriptor options for services.

The following example shows the actual XML code for including a Web service in your EGL deployment descriptor. The example includes the XML from the previous example:
<deployment>
  <bindings>
    <webBinding interface="sample.ConvertTemperature" name="ConvertTemperature"
       uri="" wsdlLocation="ConvertTemperature.wsdl" wsdlPort="ConvertTemperature"
       wsdlService="ConvertTemperatureService"/>
    <webBinding interface="sample.ConvertTemperature"
       name="ConvertTemperatureWithSharedProtocol" uri="" 
       wsdlLocation="ConvertTemperature.wsdl" wsdlPort="ConvertTemperature" 
       wsdlService="ConvertTemperatureService"/>
    <eglBinding alias="" name="myEGLBinding" serviceName="services.myEGLService">
      <egl:protocol.ref ref="mySharedProtocol"/>
    </eglBinding>
  </bindings>
  <protocols>
    <egl:protocol.cicsssl name="mySharedProtocol" conversionTable="conversionTable"
     location="location"/>
  </protocols>
  <webservices>
    <webservice enableGeneration="true" implementation="services.calculatorService"
     location="myLocation" style="document-wrapped"/>
  </webservices>
</deployment>

Feedback