Creating a basic web service


When you right-click a form in Developer Studio and select Create Web Service, the AR System server generates a basic web service. It is automatically associated with the form, and includes the default XML schema and the WSDL operations Get, Create, GetList, Set, and Service. Each of these operations includes a set of pre-defined input and output parameters using the fields on your base form. An external client can call this web service and create, modify, or get records from your form.

To create a basic web service

  1. Create a form to use as your base form, if you do not already have one.
  2. In AR System Navigator, expand serverName > All Objects and double-click Forms.
  3. Right-click your base form and select Create Web Service.

    web_services_create001.gif
  4. Right-click the General panel, and select Expand All Panels.
    These are the default settings for web services:
    • Form Name—The name of the base form.
    • Label, Description, and XML Schema—Blank.
    • XML Schema Source—Embedded. The source type applies only if a schema file is specified in the XML Schema field.
    • Port Name—The default value is Port.
    • Operations—Default input and output mappings are automatically set for each WSDL operation.
    • Qualification—An automatically generated qualification for Get, Set, and GetList operations. No qualification is needed for the Create or Service operations.
    • Start Record and Max Limit—When GetList is selected, these fields are filled in. See Setting-the-start-record-and-the-maximum-limit.

      The Start Record and Max Limit fields apply only to the GetList operation. For other Get operations, data entered in these fields is ignored.

    • Set Query Options—The default setting is Set All Entries. See The-Set-operation-type-for-complex-documents.
    • Composite Options—The default setting is Full. See The-Set-operation-type-for-complex-documents.

      web_services_create002.gif

Best practice
The Port Name and Operation Name fields are free text fields. Developers can provide any name in it.  
For better comprehension, we recommend using the form name and actual operation type for the Port Name and Operation Name fields.

The following screenshot shows an example of adding a Port Name.

WSDL-Example.png

  1. In the Properties tab, set Permissions, Change History, and Help Text.
    The permissions are the same whether the web service is visible or hidden.

    If you intend to publish your web service over the Internet or an intranet for general use, set the permissions to Public.

  2. Click File > Save to save your web service.
    The name of the web service should be descriptive and indicative of the web service's function. The name should not be the same as any existing active link guide, filter guide, packing list, or application. The default web service name is the name of the base form you chose when creating the service.
  3. Click the WSDL Publishing Location panel.
    A sample URL for your WSDL file is displayed in the Specify mid tier's WSDL handler URL field.
  4. Adjust the URL for your configuration:
    1. Replace <midtier_server> with the name of the web server where the mid tier is running.
    2. Add /public or /protected after "WSDL," depending on the permissions of the web service.
    3. Replace "Untitled Web Service" with the name of the web service.
      For example, if the web service has public permissions, use this format:
      http://midtierServer/arsys/WSDL/public/ARServer/webServiceName
      If the web service does not have public permissions, use this format:
      http://midtierServer/arsys/WSDL/protected/ARServer/webServiceName
  5. Click File > Save.
  6. Click View to display your WSDL file in the panel.
    This step also verifies that Developer Studio can access the WSDL file.
    To enable your clients to communicate with your web service, see Creating-web-service-clients.

    web_services_wsdl.gif

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*