DataPower

 View Only

Recipe: Create DataPower REST and SOAP services automatically through a single page

By Deniz Berkyurek posted Thu September 30, 2021 11:00 AM

  

DP_SERVICE_CREATOR can be used to deploy


Create DataPower REST and SOAP services automatically through a single page


Contents

Overview

Skill Level: Beginner

DP_SERVICE_CREATOR is a web application which runs on DataPower and provides a single page that can be used to create SOAP and REST services automatically on DataPower.

Ingredients

  • XML Management interface of the DataPower must be enabled.
  • A privileged DataPower user must be created or "admin" user can be used.
  • DP_SERVICE_CREATOR.zip has to be downloaded.
  • Step-by-step

    1. Downloading Installation file

    DP_SERVICE_CREATOR is a web application which runs on DataPower and provides a single page that can be used to create SOAP and REST services automatically on DataPower.

    It creates a service from suitable template and automatically assigns new port to front side handlers.

    It can be modified to be used with your own service templates or standards which are being used in your DataPower environment.

    DataPower Service Creator



    Click the link below to download DP_SERVICE_CREATOR from GITHUB.

    https://github.ibm.com/Deniz-Berkyurek1/DP_SERVICE_CREATOR

    It can be cloned to local repository or downloaded as ZIP file as well. If you download it as ZIP, please extract it.

    2. Deploy the application

    Login to DataPower and switch to the domain that you need to create services automatically by using DP_SERVICE_CREATOR.
    Click to “Import Configuration” on the Conrol Panel.
    Click “Choose File“.
    Browse to the directory you extracted / cloned the resources. You will find the DP_SERVICE_CREATOR.zip in the “deploy” directory, select it and import it the to DataPower. 

    Import config icon



    • As a result of import the deployed objects / files will be as follows :
      • An XML Firewall Service with dependent objects
      • DP_SERVICE_CREATOR folder will be created on local:/// directory and files inside it
      • Two template files are going to be uploaded in to config:/// folder.

    Imported Configuration



    Click Done.

    3. Setting object for XML Management Interface

    DP_SERVICE_CREATOR utilizes XML Management Interface of the DataPower to create services and objects. To be able to to use XML Mgmt Interface it must be enabled. In this step you will find out the IP Address of the XML Mgmt Int. and create a Host Alias for that IP Address.

      • Switch to the default domain.
      • Search for “XML Man” and click "XML Management Interface."
      • XML Management Interface


  • Find out the IP Address shown in the “Local Address” field and jot it down. In case an host alıas shown in that field instead of IP Address, click to “Select Alias” button and find out the corresponding IP Address and jot it down.
    • As it can be seen on the next screenshot, at least 3 services needs to be enabled on XML Mgmt Int.

SOAP management URI
SOAP configuration management
SOAP configuration management (v2004)

Services enabled XML Management Interface



  • Provided that you obtained the XML Mgmt Int. IP Address, search for "Host Alias" and select it. 
     
  • Click "Add" and create a host alias named as mgmt-interface and fill the "IP address" field with th IP Address you have obtained on previous step and click "Apply."
  • host alias mgmt-interface

    • Click to “Save Configuration” and switch to the domain that you deployed DP_SERVICE_CREATOR.zip. 

  1. 4. Set username for XML Management Interface

    If you are using "admin" user for XML Mgmt Int. jump to the next step.

    • On the domain that you deployed DP_SERVICE_CREATOR search for “User Agent” and click it.
    • Click to DP_SERVICE_CREATOR_XFW_UA and open Basic-Auth Policy tab.
    • open basic-auth policy
    • Click to Edit button (pencil icon) and change the “User name” field with the username that you are using for XML Mgmt. Int.
  2. 5. Set password for XML Management Interface

    • On the domain that you deployed DP_SERVICE_CREATOR search for “Pass” and click “Password Map Alias“.
    • Click to “ADMIN_PASS” and fill the “Password” field with the user that you specified in previous step.
      • If you are using admin user, you need to enter the admin user password.
      • Configure Password Map Alias
    • Click "Apply."
    • Click "Save Configuration."


  1. 6. Create Services by using DP_SERVICE_CREATOR

    1. Go to the address below on your web browser.

    http://{YOUR_DATAPOWER_MGMT_ADDRESS}:5555/datapower-service-creator.html

    2. Specify a name for your service.
    3. Describe the purpose of the service.
    4. Choose SOAP or REST as Service Format.

    i. If you choose SOAP format a pop-up is going to appear to upload WSDL file. If pop-up gets closed, you can click “CLICK TO UPLOAD A WSDL” button
    to make the WSDL pop-up appear again.
    ii. By uploading WSDL, a folder is going to be created under “local:///wsdl/” directory with name {SERVICE_NAME}-mpgw and your WSDL is going to be uploaded  inside it with name “{SERVICE_NAME}-mpgw.wsdl”.
    iii. You can also upload XSD files with this pop-up.

    Upload XSD files popup



    iv. If you are creating a REST proxy on DataPower you can choose REST format.

    5. Fill the “Backend Endpoint” field with backend service address.

    i. If backend service address is SSL secured (starts with “https://”) certificate upload button appear as “CLICK TO UPLOAD A SPECIFIC CERTIFICATE”.

    ii. If you upload backend service certificate, the backend SSL certificate is going to be validated against the certificate you upload. The uploaded certificate is going to be uploaded under cert:// folder as named {SERVICE_NAME}_backend.{extension}

    backend ssl certificate


    iii. If you don’t upload backend service certificate the backend SSL certificate is not going to be validated. This is not recommended.

    6. When the service creation is successful configuration page link is going to be shown.

    i. If it is a SOAP service, WSDL address of the service created on DataPower is going to be shown.

    my soap service mpgw ibm datapower

    ii. If it is a REST service the Base Path of the service created on DataPower is going to be shown.

    my rest service mpgw ibm datapower

    iii. If there is already a service with the same name you defined, warning is going to be shown. If there is any file uploaded, they must be uploaded again with new service name defined.

    Warning for existing service





#Automation
#DataPower
#rest
#soap
1 comment
46 views

Permalink

Comments

Thu October 07, 2021 03:46 AM

Hi.

I'm an IBM customer and do not have access to this file.
Can you be so kind and send it to me.

My team is currently working on automating several tasks, and this would be a great help.

Cheers