A web service mapping file contains XML-encoded instructions that enable the SOAP transport to process SOAP messages.

Steps to create a web service using a web service mapping file

Perform the following steps to create a web service from a web service mapping file:
  1. Compile service interface and business logic into r-code.
  2. Generate a web service mapping file.
  3. Deploy the web service mapping file to an ABL web application.
  4. Verify that the web service is running by accessing its WSDL.

To perform these steps, you will need access to a PAS for OpenEdge instance that contains an ABL web application.

Step 1—Compile service interface and business logic into r-code

You must compile service interface and business logic code into r-code and place the r-code in a PROPATH directory before creating the web service mapping file. You can do this in one of the following ways:
  • If you are using Progress Developer Studio for OpenEdge, perform the following steps:
    1. Set automatic compilation by selecting Project > Build Automatically. Alternatively, select Project > Clean.
    2. Right-click the AppServer folder in the project, select Properties, and then click the icon next to the pathname. This opens the folder in a Windows Explorer.
    3. Open the AppServer folder and locate the r-code (files with the extension .R ).
    4. Copy the r-code into a directory that is included in the ABL application's PROPATH.
  • Run a procedure that compiles the ABL business logic and service interface code into a PROPATH directory, as in this example:
    COMPILE C:\Progress\workspace\MyApp\AppServer\Customer.cls SAVE INTO C:\OpenEdge\WRK\oepas1\openedge.
    COMPILE C:\Progress\workspace\MyApp\AppServer\service-interface.p SAVE INTO C:\OpenEdge\WRK\oepas1\openedge.
Note:
If you need to view or modify the PROPATH for an ABL application, open the openedge.properties file located in <PAS_Instance_Directory>/conf in a text editor and scroll down to the AppServer.Agent.<ABL-Application-Name> section.

Step 2—Generate a web service mapping file

To generate a web service mapping file, you use the Proxy Generator tool that is included in a default installation of Progress Developer Studio for OpenEdge.

Perform the following steps to generate a web service mapping file using the Proxy Generator:
  1. Launch the Proxy Generator from the Start menu.
  2. Select File > New.
  3. In the AppObject tab:
    • Specify a name for the AppObject. By default, this name will be used as the name of the web service.
    • Click New next to Propath Components and specify PROPATH directories that contain compiled service interface and ABL business logic code.
  4. Add non-persistent or persistent procedures to an AppObject or a SubAppObject in the object's Procedures tab.
    • To add non-persistent procedures:
      • Right-click the section labeled Non-persistent Procedures and select Add > Non-persistent....
      • In the dialog box that opens, select the compiled r-code files of the non-persistent service interface and click Add.
      • Click Close.
    • To add persistent procedures:
      • Right-click the section labeled Procedure Objects and select Add > Persistent....
      • In the dialog box that opens, select the compiled r-code files of the persistent service interface and click Add.
      • Click Close.
  5. Click the Save button on top to save the Proxy Generator project in a local directory.
  6. Select File > Generate.
  7. In the Generate Proxies dialog box:
    • Set Web Service as the Client Type.
    • Specify the namespace in the Namespace field. You can specify any value that uniquely identifies the web service and its elements in the WSDL and meets the requirements of an XML namespace value (a valid URN or URL). Typically, you will want to specify urn: followed by the web service name.
    • Select a WSDL Style. Doc/Literal is recommended.
    • Select a Session Model. If you have added persistent procedures earlier, you will most likely want to choose Managed.
    • Specify the Output Directory where the web service mapping file is to be created.
    • Click OK.
The following message appears:
The web service mapping file is generated in the output directory, along with a few other artifacts.

Step 3—Deploy the web service mapping file to a web application

To deploy a web service mapping file, perform the following steps:
  1. Ensure that the PAS for OpenEdge instance is running.
  2. Launch Proenv.
  3. Run the deploySOAP command using the following syntax:
    deploySOAP <PATH-TO-WSM-FILE> <WEBAPP-NAME>
    For example:
    deploySOAP C:\Users\Desktop\WSM\MySampleWebService.wsm MyWebApp

Step 4—Verify that the web service is running by accessing its WSDL

The best way to verify that the web service is running is by accessing its WSDL. Launch a browser and enter the WSDL URL, which has the following structure:
http://<host>:<port>/<WebAppName>/soap/wsdl?targetURI=<WebServiceNameSpace>
For example:
http://localhost:8810/soap/wsdl?targetURI=urn:MySampleWebService
Location of the WSDL file

The WSDL file that is generated during deployment is located in WEB-INF/adapters/soap/<WebServiceName> in the web application directory.

For example: C:\OpenEdge\WRK\oepas1\webapps\MySampleApp\WEB-INF\adapters\soap\MySampleWebService.