Creating Web Service Provider activity using EasyWSDL parser

This section explains how to create WS Provider activity, when you configure the Adeptia Suite to use EasyWSDL parser. Perform the following steps to create Web Service Provider activity using EasyWSDL parser:

  1. On the Develop tab, click Services > Web Services > Provider.

     

  2. Click Create New to view New Web Service Provider screen.

     

  3. Type the name and description of the new Web Service Provider activity in the Name and Description text boxes respectively.

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

  4. Select the type of web service that you want to publish from the Publish Type. The available options are SOAP and REST. Select SOAP, to publish a SOAP-based web service. Select REST, to publish a RESTful web service. 

    For information on how to create a Web Service Provider activity, refer to Creating RESTful Web Service Provider Activity.

  5. If you want to upload your own WSDL file, select Yes in the Upload WSDL drop-down list box. A message box appears prompting to change the configuration values. 

    Skip these steps and continue from step 6, if you select No in the Upload WSDL drop-down list box.

      1. If WSDL file is referring to another WSDL or XSD file, then you can either choose an existing file reference activity from the File References drop-down list or click on the  button to create a new file reference activity. You can click on the  button, if you want to update an existing file reference activity. For information on how to create a file reference activity, refer to Creating File Reference.

      2. Click Browse WSDL and upload the WSDL file that you want to use while creating your Web Service Provider activity.




      3. After the file is uploaded successfully, few new fields will add in the screen. 



      4. If there is only one service name in your WSDL file then Adeptia Suite will show that service name as selected. If there are multiple service names in your WSDL file then Adeptia Suite will show you all the services in a drop-down list options in the Service Name text box. In this case, you have to select the service that you want.

        When you select the service name, it will populate the Binding text box automatically. This text box displays only those bindings that corresponds to the service name, which you will select in the Service Name text box. If in the WSDL definition file, there is only one binding for any service name then by default, you will see only that binding in the Binding text box. However, if there are multiple bindings for a service name then you will see all the bindings in the Binding drop-down list box.
      5. Select a mode of configuration from the Configuration Mode drop-down list box.

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

      6. Select the way you want to process your payloads (request or response). The available options are In Memory and File.
        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.

      7. Type the input and output variables in the Input Variable and Output Variable text boxes respectively. These names must match with the names defined in the properties section of Process Designer. The name of these variables should be the same as you defined in the respective process flow. 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.

      8. Select the security policy activity from the Security Policy drop-down list box. For information on how to create a security policy, refer to Creating Security Policy for Web Services. For information about its Advanced Properties, refer to Changing Advanced Properties.
      9. To extract attachments from the request and send it with your response, select Enable Attachment check box. For more information, refer Using Attachments in Web Services.

      10. Click Save.

    A message box appears prompting to configure the Process Flow settings for the production environment. This message box appears only if Optimize for Real-Time check box is not selected. For more information, refer to Creating Process Flow.
  6. Type request service name, by which you want to publish your web service, in the Request Service Name text box.

  7. Select the SOAP version from the Soap Version drop-down list box.

  8. Select the process flow to publish as web service from the Process Flow Name drop-down list box.

    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).
  9. Select an input XML schema from the Input XML Schema drop-down list box. This XML Schema will contain the XML that the Web Service provider activity will input.

  10. Select the output XML schema from the Output XML Schema drop-down list box.

    In case, an XML Schema has multiple roots then click Select Root button and select a root
  11. 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.
  12. Type the input and output variables in the Input Variable and Output Variable text boxes respectively. These names must match with the names defined in the properties section of Process Designer.

    The names of these variables should be the same as you defined in the respective process flow.

    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, select Enable SSL check box.

  13. Select the security policy activity from the Security Policy drop-down list box.


  14. If you want to extract attachments from the request and send it with your response, select Enable Attachment check box. For more information, refer to Using Attachments in Web Services.

  15. Click the Save.

The following  context variables are the parts of context info of the process flows, which are published by the Web Service Provider.

You may now access:

  • ClientIP: If you want to know the IP address of the clients who are accessing your web service.
  • WsProviderTypeId: If you want to know the Type Id of your web service provider activity.

Storing HTTP Request Header in Suite

Adeptia Suite (AIS) will now store HTTP request header of a Web Service provider context variable in the process flow. However, the user must adhere to the following naming convention while sending a request header. The first letter of the header has to be in uppercase and following all letters in lower case, for example:

  • Test
  • Testheader
  • Test-header