An EGL Interface part includes one or more function
prototypes, each of which identifies an operation that is available
in a service.
As shown in the following example, a function
prototype has an ending semicolon (;) and includes a function name,
parameter list, and (optionally) a return type:
Interface WeatherForecast
Function GetWeatherByZipCode(zipcode string in) returns(myRecordPart);
end
In relation to a SOAP service, the function prototypes can include
parameters that have the modifiers IN, INOUT, or OUT.
To create an Interface part from a WSDL file:
- Bring the WSDL file for the web service into your EGL Source folder;
for example, into a subfolder named wsdl
- In the Project Explorer view, right-click the WSDL file and click Create
EGL Client Interface. The first New EGL Interface page
is displayed.
- Select the web service from which you want to create Interface
parts. If you want to create a SOAP service binding for the web service,
click Create SOAP service bindings.
- Click Next to display the second New EGL
Interface page.
- For the WSDL file portType entry that
is related to the selected web service, complete these steps:
- 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, set 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.
- If you indicated that you do not want to create SOAP service bindings,
click Finish. Otherwise, click Next to
display the "New EGL SOAP service binding" page.
- Ensure that the Source folder field identifies
the location of the EGL deployment descriptor.
- In the EGL deployment descriptor file name field,
select the name of the EGL deployment descriptor to which you are
adding service bindings.
- To update service-binding details that are already in that file,
select Update all existing bindings.
- In the table of WSDL file port entries, select an entry that references
the WSDL file portType entries from which you want to create Interface
parts.
- In the Binding name column, either accept the default value, which
is the name of a portType entry in the WSDL file, or type another
name.
You specify the name when you declare a service-access variable
and set the @BindService property, bindingKey field.
- Click Finish.
When you create an Interface part by following the preceding steps,
note any comments that were written into the file that holds the Interface
part. Those comments represent a complex property that might be useful
when you specify details about accessing the service. You specify
those details in one of two cases:
- When you create a service-access variable that is based on the
Interface part
- When you create a service binding in the EGL deployment descriptor,
if you did not do so in the preceding steps
Creating parts is helpful when names that are copied from the WSDL
file are not valid in EGL. You might also want to create a part when
you want to use an EGL package name that is not derived from the WSDL
file. For details, see “@xml.”