Creating an Interface part to access a SOAP service

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:
  1. Bring the WSDL file for the web service into your EGL Source folder; for example, into a subfolder named wsdl
  2. In the Project Explorer view, right-click the WSDL file and click Create EGL Client Interface. The first New EGL Interface page is displayed.
  3. 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.
  4. Click Next to display the second New EGL Interface page.
  5. For the WSDL file portType entry that is related to the selected web service, complete these steps:
    1. Accept or update the name of the new Interface part.
    2. Select or clear check boxes to specify which operations in the portType entry will be represented in the new Interface part.
  6. 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.
  7. 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.
  8. If you want to overwrite the same-named EGL files, select Overwrite existing files.
  9. 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.
  10. Ensure that the Source folder field identifies the location of the EGL deployment descriptor.
  11. In the EGL deployment descriptor file name field, select the name of the EGL deployment descriptor to which you are adding service bindings.
  12. To update service-binding details that are already in that file, select Update all existing bindings.
  13. 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.
  14. 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.

  15. 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:

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.”


Feedback