Creating Web Service Provider Activity using WSDL4j Parser

This section explains how to create WS Provider activity, when you configure the Adeptia Suite to use WSDL4j parser.

Configuring WSDL4j Parser for Web Service Provider

This section explains how to configure the WSDL4j Parser for Web Service Provider. Adeptia Suite also supports easy WSDL parser from version 6.1 onwards.

Steps to configure WSDL4j Parser for Web Service Provider

  1. On the Adeptia Suite home page, click the Administer tab and then click at the Setup menu. This action will show you all the options of the Setup menu (see Figure 306).

    Figure 306 : Set Up Menu Options

  2. Select the Application Settings option. This action will show you the Application Settings screen (see Figure 307).

    Figure 307 : Application Settings

  3. Click the Update System Properties link. This action will show you the Update System Properties page.
  4. Click Services to expand the Services hierarchy (see Figure 308).


    Figure 308: Application Setting Page

  5. Expand Web Service Configuration.
  6. Change the value of the abpm.webservice.provider.wsdlparser.iswsdl4j property to true (see Figure 316).

    Figure 309: Web Service Configuration Properties

  7. Click the Save button to save the web service configuration settings.

    If you want to re-enable the new parser for WS Provider activity, EasyWSDL parser, then, simply set the value of the abpm.webservice.provider.wsdlparser.iswsdl4j property to false.

Steps to create a Web Service Provider Activity

  1. On the Adeptia Suite homepage, click the Develop tab.
  2. Go to Services > Web Services and then click Provider. This action will show you the Manage Provider screen (see Figure 337).

    Figure 337: Manage Web Service Provider Activity

  3. Click the Create New link. This will show you the New Web Service Provider screen.

  4. Enter the name and description of the new Web Service Provider activity in the Name and Description textboxes respectively.

    In case the Web Services Provider activity contains characters which falls in character set encoding, other than the default character set encoding, then you can change this encoding in the Character Set Encoding textbox. By default, this textbox will display you the character set encoding that you have defined at the application level.


  5. Select the type of web service that you want to publish from the Publish Type radio button.

    1. Select SOAP, when you want to publish a SOAP-based web service.
    2. Select REST, when you want to publish a RESTful web service.

    For information how to create a Web Service Provider activity to access a RESTful web service, refer to Creating RESTful Web Service Provider Activity section.

  6. If you want to create this activity by uploading a WSDL file then, select Yes in the Upload WSDL drop-down list. Otherwise, select No. The default value of this drop-down list is No.

    Skip step 7 – 12 and continue from step 13 if you select No in the Upload WSDL drop-down list.

  7. If you select Yes in the Upload WSDL drop-down list then, you can upload your own WSDL file.

  8. Click the Browse WSDL button and upload the WSDL file that you want to use while creating your Web Service Provider activity. This action will show you the Upload WSDL File screen (see Figure 338).

    Figure 338: Upload WSDL

  9. Click the Choose File button, select the WSDL, and then click the Upload File button. This action will upload your WSDL file (see Figure 329).
  10. Select the service name, ports, and port type from the respective drop-down list (see Figure 339). Along with this, you will get a list of operations to select the process flow for those operations.


    Figure 339: Create Web Service Provider

  11. Select a mode of configuration from the Configuration Mode drop-down list.

  12. Enter the request service name, by which you want to publish your web service, in the Request Service Name text box (see Figure 340).

    • Configuration Mode can be either: For All Operation: In case you want to select just one process flow to invoke any operation then select this option. However, you can execute the process flow only when you invoke an operation.
    • Per Operation: In case you want to select multiple process flows for invoking different operations then select this option. Here you can also leave any operation unbound. If you invoke any unbound operation then, you will see a "Requested Operation is not implemented" error message.
  13. Select the SOAP version from the Soap Version drop-down list.

    Skip step 12– 16 and continue from step 17 if you select Yes in the Upload WSDL drop-down list.


    Figure 340: Create Web Service Provider

     

  14. Select the process flow, which you want to publish as web service from the Process Flow Name dropdown list.

    While creating process flow for web services, you must keep the following things in mind:

    • Use Context source and target activities.
    • Input and Output variable names in the process flow properties must match with the ones that you enter while creating the provider activity (see step 18).
  15. Select an input XML schema from the Input XML Schema dropdown list. This XML Schema will contain the XML that the Web Service provider activity will input.

    By default, the request service will be in the services/<folder name>. You can change this location and provide a new location for accessing the web service.

    If you want your WS Provider activity to offer a SSL security then check the Enable SSL checkbox.

  16. Select the output XML schema from the Output XML Schema dropdown list.

    In case an XML Schema has multiple roots then, click the Select Root button and select a root.

  17.  Specify the way you want to process your payloads (request or response). Choose one of the following:

    • In Memory
      Select this option, the default selection, if your payload  size is small. In this case, the system processes web service payloads in the memory.

    • File
      Select this option if your payload size is relatively large. This helps while dealing with large volumes of payloads. As here, the system processes payload in a file, i.e., a physical space instead of memory, reducing the amount of memory needed for processing payloads

      While using File payload process type, the following additional changes must be made in the process designer:

      1. In the process designer, use Context Source and Context Target.
      2. Click Context Source and change its Document Repository property to True.
      3. In the File Name(with full path) field, choose $$WS_PROVIDER_PAYLOAD_SOURCE$$ variable.
      4. Repeat step b and c for Context target too. However, in the File Name(with full path) field, choose $$WS_PROVIDER_PAYLOAD_TARGET$$ variable.

      It is recommended that you use different process flow whenever a payload process type changes. For example, if a provider activity created with In Memory payload process type uses X process flow, then this process flow can be reused in any provider activity created using In Memory payload process type only, and not with a different payload process type, i.e., File.

      The web service provider stores these payloads at a base location that you can configure by the following steps:

      1. From the Adeptia Suite home page, click the Administer tab.
      2. On the Administer tab, click the Update System Properties link.
      3. On the Update System Properties screen, click on Services a Web Service Configuration.
      4. Enter the path where you want to store the payloads during processing, in the value of abpm.webservice.metro.soapattachment.location property. The default value is <Adeptia Installation Folder>AdeptiaServer\ServerKernel\web\Attachments.
  18. Enter the input and output variables in the Input Variable and Output Variable textboxes respectively. These names must match with the names defined in the properties section of process designer.

  19. Select the security policy activity from the Security Policy dropdown list if required (see Figure 341).

  20. Click the Save button.


    Figure 341: Create Web Service Provider

    To know how to create a security policy, please refer to the Creating Security Policy for Web Services section. 

    If you want to know the IP address of the clients who are accessing your web service then, you can now do that by accessing the ClientIP variable. This variable is a part of the context info of the process flow, which is published by the Web Service Provider. You can use this variable in scenarios such as - When you want to respond to a client’s request as per it’s IP. You can achieve this by using the IP address of the client that you can easily get from the ClientIP variable.