This documentation is for WSO2 Enterprise Integrator version 6.0.0 . View documentation for the latest release.

All docs This doc
Skip to end of metadata
Go to start of metadata

WSO2 Enterprise Integrator (EI) is a comprehensive solution that brings together application integration, business process management and data integration capabilities, to support modern enterprise integration requirements. 

Let's go through the fundamental capabilities of WSO2 EI.

Let's take a look at a basic application integration use case of WSO2 EI using a sample scenario. 

Introducing the sample

This is a healthcare system in which a user reserves a medical appointment by providing his/her personal details, preferred hospital, doctor's name, credit card information etc. 

The Enterprise Integrator processes the user's request and returns an appointment confirmation or a refusal. The following diagram shows how the Enterprise Integrator handles all the service calls and payload manipulations involved in a reservation:

Note the following regarding the diagram:

  1. When a patient makes a request to reserve an appointment, the request is sent to a REST API that is configured in the Enterprise Integrator. The REST API processes the incoming request and forwards it to the hospital service, which does the appointment reservation.

  2. The REST API processes the appointment reservation response and sends a service call to the hospital service to get the doctor's channeling fee and receives the response.

  3. The REST API processes the channeling fee response and sends a service call to the hospital service t o get the user's eligibility for a discount. 

  4. When the responses for these service calls are returned, the REST API calculates the actual fee for the appointment and creates a new request with the payment details to be sent to the healthcare service.The healthcare service processes the payment settlement and returns the response to the REST API. 

  5. The REST API takes the payment settlement response and generates the response to be sent to the user.

Let's go through the main features of WSO2 EI using this healthcare service as an example.

Deploying the sample to create mediation artifacts

Instead of creating the artifacts that are required to run this sample scenario from scratch, let's deploy them using a Composite Application Archive (CAR) file. The CAR file consists of mediation artifacts such as the REST API, the endpoints (backend services the requests are sent to), and the sequences (list of mediators) that allow the Enterprise Integrator to process the requests.

Tip: For information on how to create all the required Enterprise Integrator artifacts in a composite application project, see the following tutorial: Sending a Simple Message

Before you begin,

  1. Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  2. Download the WSO2 EI ZIP file from here, and then extract the ZIP file.
    The path to this folder will be referred to as <EI_HOME> throughout this quick start guide.
  3. Download WSO2QuickStartGuideCapp_1.0.0.car from here and save it in a preferred location in your computer.
  4. If you are running on Windows, download the snappy-java_1.1.1.7.jar from here and copy the JAR file to <EI_HOME>\lib directory.

Let's get started!

Follow the steps below to deploy the healthcare sample:

  1. Set the following properties in the <EI_HOME>/conf/synapse.properties file to true so that the Enterprise Integrator can publish mediation statistics:

    ...
    mediation.flow.statistics.enable=true
    mediation.flow.statistics.tracer.collect.payloads=true
    mediation.flow.statistics.tracer.collect.properties=true
    ...
  2. Open a command line terminal and start the Analytics runtime that is shipped with your EI distribution by running one of the following startup scripts from the <EI_HOME>/wso2/analytics/bin directory:
    • On Linux/Mac OS:  sh wso2server.sh
    • On Windows:  wso2server.bat

  3. Open a new command line terminal and start WSO2 EI by running one of the following startup scripts from the <EI_HOME>/bin directory( Be sure you have successfully started the Analytics server before taking this step .):

    • On Linux/Mac OS:  sh integrator.sh

    • On Windows:  integrator.bat

  4. Open the Enterprise Integrator management console using https://localhost:9443/carbon/ and log in using admin as the username as well as the password.
  5. Deploy WSO2QuickStartGuideCapp_1.0.0.car in the Enterprise Integrator as follows:

    Tip: The CAR file was created using tooling. Find more information on Enterprise Integrator tooling from WSO2 Enterprise Integrator Tooling.

    1. On the Main tab of the management console, go to Manage -> Carbon Applications and click Add
    2. Click Choose File, select the WSO2QuickStartGuideCapp_1.0.0.car  file you downloaded in the Before you begin... section above, and click Upload

      Note

      After you upload a CAR file, you can confirm that it was successfully deployed by taking the following step:

      • On the Main tab of the management console, go to Manage -> Carbon Applications and click List. The Carbon Applications List screen appears. If successfully deployed, the CAR file will be listed here.
  6. Follow the steps below to enable statistics and tracing for the REST API:
    1. On the Main tab of the management console, go to Manage -> Service Bus and click APIs. The Deployed APIs screen appears, and you will see the HospitalServiceApi listed as follows:
    2. To enable the collection of mediation statistics for the REST API, click Enable Statistics.
    3. To enable mediation tracing for the REST API, click Enable Tracing.
  7. Follow the steps below to enable statistics for the endpoints:
    1. On the Main tab of the management console, go to Manage -> Service Bus, and click Endpoints. The Manage Endpoints screen appears, and you will see several endpoints listed.
    2. To enable the collection of mediation statistics for the endpoints, click Enable Statistics for each endpoint.

You have now created mediation artifacts in the Enterprise Integrator and enabled statistics. Let's send a request to the Enterprise Integrator.

Sending a request to the Enterprise Integrator

  1. Create a JSON file named reserve_appointment.json with the following request:

    {
    "reserveRequest": {
    "patientDetails": {
    "name": "Mark Smith",
    "dob": "1990-03-19",
    "ssn": "ASJK-asnda-AAA",
    "address": "100 MAIN ST, SEATTLE WA 98104, USA",
    "phone": "0770596754",
    "email": "marksm@mymail.com"},
    "doctor": "thomas collins",
    "hospital": "grand oak community hospital",
    "category": "surgery",
    "cardNo": "7844481124110331"
    }
    }
  2. In a new terminal, navigate to the location where you saved the reserve_appointment.json file and execute the following command:

    curl -v -X POST "http://localhost:8280/hospitalservice/reserve" --header "Content-Type: application/json" -d @reserve_appointment.json -k -v

    This sends an appointment request to the REST API, which is the configuration inside the Enterprise Integrator that receives and processes the request. Once all the message flows take place as described in the sample introduction, you will see a response similar to the following on the console:

    {
        "appointmentNumber": 1,
        "Doctor": {
             "fee": 7000,
             "name": "thomas collins",
             "availability": "9.00 a.m - 11.00 a.m",
             "hospital": "grand oak community hospital",
             "category": "surgery"
         },
         "Payment": {
             "patient": "Mark Smith",
             "actualFee": 7000,
             "discount": 0,
             "discounted": 7000,
             "paymentID": "c5edddf3-d7d7-4756-8a03-5e8e31f2e716",
             "status": "Settled"
         }
    } 

When you receive the response for the request that you sent, you can view the mediation statistics related to the processing that happens within WSO2 EI via WSO2 EI Analytics.

Now let's have a look at how you can view the mediation statistics on the Analytics Dashboard of WSO2 EI Analytics.

Analyzing the mediation statistics

  1. In a new browser window or tab, open https://localhost:9444/carbon/ and log into the Analytics management console using admin as the username as well as the password.
  2. On the Main tab, click Analytics Dashboard and log in using admin as the username as well as the password. You will then see the following:
  3. Click View to open the EI Analytics Dashboard. You will see an OVERVIEW page similar to the following:

    Note

    The statistics you see will be for the number of requests that you have sent. If you follow the steps in the Sending a request to the EI section, and send just one request, you will see the statistics for just that request.

    • To view statistics for a specific date range, select the required date range from the top right menu bar. If you want to view statistics for a specific date, click Custom in the menu bar and enter the required date. For more information on analyzing the statistics displayed on this page, see Analyzing EI Statistics Overview.
  4. To view statistics for the REST API, click API on the left navigator and search for HospitalServiceApi . For more information on analyzing statistics displayed on this page, see Analytics Statistics for REST APIs.
  5. To view statistics for an endpoint, click ENDPOINT on the left navigator and search for the required endpoint. You can view statistics for the following endpoints on this page:
    • reserveAppointmentEp
    • discountEligibility
    • channellingFee
    • settlePayment
     For more information on analyzing statistics displayed on this page, see Analyzing Statistics for Endpoints.

Let's take a look at how to model a business process using either the BPMN 2.0 standard or the WS-BPEL 2.0 standard.

Before you begin,

  1. Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  2. Download the WSO2 EI ZIP file from here, and then extract the ZIP file. 
    The path to this folder will be referred to as <EI_HOME> throughout this quick start guide.
  3. Download and setup EI Tooling


Setting up EI Business Process

  1. Open a command prompt (or a shell in Linux) and go to the <EI_HOME>\wso2\business-process\bin directory.
  2. Execute one of the following:
    • On Linux/Mac OS:  sh wso2server.sh

    • On Windows:  wso2server.bat

  3. The operation log keeps running until the server starts, which usually takes several seconds. Wait until the server fully boots up and displays a message similar to "WSO2 Carbon started in n seconds."
  4. Download and setup EI Tooling. 

Go to the required tab for step by step instructions to model a business process.

Follow the steps below to model a BPMN process.

  1. Open Eclipse.
  2. Under the Help menu, click Install New Software. In the resulting panel, click the Add button to add a repository and fill in the following fields:

    Fill in the following repository details for BPMN.
  3. Click OK to add the plugin. Once this is done, click Finish and restart Eclipse.
  4. Once Eclipse restarts, navigate to File > New > Other. From the window that appears select Activiti > Activiti Project and click Next
  5. Provide a suitable Project Name and click Finish

  6. Right-click on your project and navigate to New > Other.

  7. From the window that appears, select Activiti > Activiti Diagram.

  8. Select the project in the viewer and enter a File name.
     

    Tip: The following example expands on creating a business process scenario, The manager invokes an order approval process where it is possible to set the product ID. Additionally, an employee from a good division can set the quantity and the unit price of the product. The quantity and the unit price are used to calculate the total cost. If the total cost is above 100,000, the order will have to be approved by an employee from the orderApproval Group before the order mail is dispatched. Alternatively, if the cost is below 100,000, the order mail is dispatched without approval. In this example, the process is named “OrderApproval”.

  9. Click Finish. You are presented with a canvas as shown below to model your BPMN package.

    The palette is positioned on the right side of the screen. You can drag and drop models from the palette onto the canvas and do yourmodelling.
  10. To implement the OrderApproval, drag and drop a Start Event element, two User Task elements, a Mail Task element and a Terminate Event element on the canvas.
  11. Link up the flow according to the business logic. 

    Tip: According to the business logic in this example, the Start Event should trigger the Fill Order Form User Task. So connect the Start Event to the Fill Order Form User Task.

  12. In the Connection tab, select Sequence Flow. Connect the Start Event to the Fill Order Form User Task.

    Tip: It is useful to understand the condition logic for this sequence. Here, if the total cost calculated from the quantity and unit price is above 100,000 a user task has to be executed or the mail task comes into play. In order to add this condition statement, click on the Fill Order Form User Task and you will be able to see few tooltips hovering around the Fill Order Form User Task on the canvas. The diamond shape with a cross in the middle implies an Exclusive Gateway.

  13. Select the Fill Order Form User Task by clicking on it and click on the Exclusive Gateway tooltip on the right of the tool.
  14. Once you click the Exclusive Gateway, a bigger diamond with a cross in the middle should appear on the canvas next to the Fill Order Form User Task. The Fill Order Form User Task will point to it. 
  15. The rest of the flow is fairly straightforward. Use the Sequence Flow to connect the tools and the final diagram will be similar to what is shown below.

    After the diagram has been constructed, you must configure the properties of each element tofulfil the business logic.
  16. Click on the Start Event element and set the following properties in the general tab.

    • Id: fillOrderDetails

    • Name: Enter Order Details

  17. To get the order details, you must create a form to get the product ID from the manager who invokes the process. Click on the Form tab in the properties of the Start Event.
  18. Click on the New button and use the new window as shown below to create a productID field.

    Ensure that you enter the following details.
    • Id: productID

    • Name: Product Id

    • Type: string

    • Variable: productID

  19. Click OK. Once you have filled the form, the table in the form tab should look similar to the following.

    Now that the configurations for the start event have been set, you can configure the Fill Order Form User Task, which is a claimable task by the goods division, where an employee of the goods division will be able to claim and complete the form. 
  20. Click on the Fill Order Form User Task. In the Properties tab, assign an Id and Name, similarly to how you assigned a Id and Name to the start event. You can use the following values.
    • Id: fillOrderForm

    • Name: Fill Order Form

  21. Click on the Main Config tab in the Properties pane. Since there is no specific user who the task is to be assigned and anyone from the goods division can claim the task and execute it, set the Candidate Group to goodsDivision. This is will allow any employee under the goods division to claim and complete the task.
  22. Create the form that the employee needs to fill. To do this, click on the Form tab in the Properties pane. Add the following fields in a similar manner to how you added form attributes for the start event.


    productIDquantityunitPrice
    IdproductIDquantityunitPrice
    NameProduct IDQuantityUnit Price
    Typestringlongdouble
    VariableproductIDquantityunitPrice

    Once the above fields are added to the form, the table in your Form tab should look similar to the following.

  23. Now that you have configured your Fill Order Form User Task, you can identify the two flows. There can be a default flow and a conditional flow.

    1. To assign the default flow, set an appropriate ID for the flow, which is the Sequence Flow element from the exclusive gateway to mail task. Click on this flow.
    2. Set the Id value as shown below.
  24. Similarly, assign an ID to the Sequence Flow from the exclusive gateway to the Approve Order User Task.
    • Id: approveOrder
  25. To set orderProduct as the default flow, do the following.
    1. Click on the exclusive gateway. 
    2. Click the General tab in the Properties pane and select orderProduct in the dropdown to assign it.
  26. To assign the Conditional flow, click on the approveOrder Sequence Flow element, navigate to the Main Config tab. In the condition field, define the condition as ${(quantity*unitPrice) > 100000}. This is for calculating the total cost and checking if it exceeds 100,000. If it does, it will take the conditional flow.

    You have now configured the conditional flow. If the total cost exceeds 100,000, the flow is directed to the Approve Order User Task.
  27. To configure the Approve Order User Task, do the following. 

    1. Click on the Approve Order User Task. 

    2. In the General tab, assign an appropriate ID and Name. 

    3. In the Main Config tab, you must set the Candidate Group as the “orderApproval” group, as according to the scenario, anyone from the order approval group can claim the task and complete the task. 

    4. To allow the approver to view the order details, you must create a form to display the Product ID, Quantity and Unit Price. To do this, navigate to the Form tab in the Properties pane and create the fields as show in the diagram below.

      Note: The fields are only readable.


  28. Now you have configured the properties for the Approve Order User Task. To accommodate a scenario for the orderApproval group rejecting an order, you must add an end event to this User Task. Therefore this process can terminate at Approve Order User Task.
  29. To configure the Mail Task, do the following. 
    1. Click on the Order Product Mail Task. In the Properties pane, select the General tab.
      • Id: mtOrderProduct

      • Name: Order Product

    2. Select the Main Config tab, and fill the respective fields (i.e., To, From, Subject). 
    3. In the non-HTML field, enter “Order ${quantity} of ${productID} at the rate of ${unitPrice}”. The variable will be used to create the mail body.
    4. Follow the instructions on the Working with the Email Task page to configure the server for the Mail Task. 
    The model is now complete as the necessary logic has been applied.
  30. To create the Business Archive File (.bar), do the following.

    1. On the Explorer, found in the upper left of your screen, navigate to Package Explorer

    2. Right click on the package and select “Create deployment artifacts”.

    3. Navigate to the location of the source. You will find the .bar file inside the deployment folder.


Follow the steps below to model a BPEL process.Then you can deploy and test it via the BPS management console.

  1. Open Eclipse and select File > New > Other.
  2. From the window that appears, select Composite Application Project and click Next.
  3. Provide a suitable name for the project. For the purpose of this example, name it as "WS_NumberAdderCarbon". Click Finish once done.
    The composite application project is created and you can see it on Project Explorer pane on the left of your Developer Studio screen.
  4. Right-click on the project which is onthe Project Explorer pane and choose New  > BPEL WorkFlow. If it does not appear there, click Other and search for BPEL WorkFlow on the search bar. 
  5. On the Create New BPEL WorkFlow wizard, select Create New BPEL workflow and click Next to continue.
  6. Provide suitable names, a namespace and select the matching template for your BPEL process and project. More information on the different templates can be found here
    For this example, the following values can be used: 
    • Project Name : BPELNumberAdder
    • Process Name : AdderProcess
    • Namespace :  http://NumberAdder.co m
    • Template : Synchronous BPEL Process
  7. Click Finish to close the wizard.The Project Explorer window and the AdderProcess.bpel file will look like the following.

    This point onwards you have to design your BPEL process by adding business logic to the BPEL process. In this guide we will be designing a simple process to add two integers.

  8. Open AdderProcessArtifacts.wsdl file in BPELNumberAdder Project and click on the blue arrow next to Adder Process Request. It will open another tab called InlineSchemaofAdderProcessArtifacts.wsdl.
  9. Rename the default variable named as "input" as and change the type from "string" to int. 
  10. Add another element by right-clicking on AdderProcessRequestType>Add an element. Name it y and set the type as int. Now it should look like the follwing image.
  11. Now lets design the simple business logic. Open the AdderProcess.bpel  file. You need to add business logic in the place of where FIX_ME-Add_Business_Logic_Here  activity resides. Delete the FIX_ME-Add_Business_Logic_Here element. You will have the following process.

    To delete, right-click on the element and choose delete.

  12. Add an Assign activity in between receiveInput and callbackClient activities. To add Assign activity drag it from the Action section of the Action Palette.

    Another way to add activity element to the editor isright-clickonelementand use add-before option.

  13. Click on the Assign element and then click on Details tab in the Properties window. 
  14. Click on New which will lead you to the following view in the Properties window.
  15. We will use an Xpath expression to compute the addition of two variables and assign the result to the output variable. To do that select Expression from the From drop down list and select Variable from the To drop down list.
  16. Include the following expression in the box below "Edit the associated Xpath Expression".

    $input.payload/tns:x + $input.payload/tns:y 
  17. While you configure the variables, the a message will appear asking to initialize the variables. Click Yes. It will automatically generate an XML string for variable initialization. The Properties window of Assign activity should look like the following once you have completed the steps.
  18. Now you need to define inbound and out bound interfaces. Open the deploy.xml file which is in the BPEL project. Choose AdderProcessPort as the Inbound Address Port from the given list. The rest of the parameters will be automatically filled in once you select it. You do not need to specify ports outbound interfaces as we do not have external invocations in this particular business process.
  19. Include the BPEL process as a dependency of the Composite Application (WS_NumberAdderCarbon). To include it, open pom.xml of Composite application project and select the BPELNumberAdder checkbox as a dependency. 

Deploying and testing the BPEL process

AftermodellingtheBPEL process, it can be deployed in the WSO2 BPS.

  1. In Developer Studio, right-click on the Servers window and select New>Server. If it is not visible, select Window>Show View>Servers.
  2. The New Server window appears. From the list, expand the WSO2 folder and select WSO2 Carbon 4.4 based server as shown below. Carbon 4.4 based server is selected here since BPS 3.5.0 is based on Carbon 4.0.2. If needed, specify the Server name here. In this example, we specify it as WSO2 BPS. Click Next.
  3. Set the CARBON_HOME by clicking the Browse button and selecting WSO2 Business Process Server_Home directory. Click Finish once done or Next if more settings of the server need to be configured such as the 'service port', 'web console port' etc.
  4. Once done, WSO2 BPS is added to Servers List as shown below.
  5. The next step is to deploy the composite application in WSO2 BPS. Go to WSO2 BPS Server>Add and Remove and select the WS_NumberAdderCarbon project.  The server will be automatically started.
  6. If the server does not get started automatically, right-click on the server and select Start. In the console window, note the server process's log. 
  7. The WSO2 BPS login page will open automatically in the default web browser. Loginusing admin as username and admin as password.
  8. Select Processes >BPEL>List from the Main menu. The Deployed Processes window opens with the AdderProcess deployed.

    The "Process ID" is generated in the format {"Process NameSpace"} ProcessName-VersionNo.

  9. Click the Process ID.

  10. The Process Information window appears with the details of the process. Click on the Try It link. 
  11. A browser window opens to enter the required input parameters. Enter the values and press Send to calculate the result. 
 Alternatively, you can use the SOAP UI to test a business process. The SOAP UI application shows the request/response soap messages and is particularly helpful in error handling.

Let's take a look at how to create and invoke a data service using WSO2 EI. See the following topics for details:

Before you begin,

  1. Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  2. Download the WSO2 EI ZIP file from here, and then extract the ZIP file.
    The path to this folder will be referred to as <EI_HOME> throughout this quick start guide.

Let's get started!

Creating a sample database with data

Create a sample MySQL database and add some data. For the purpose of this demonstration, we will create a simple database with one table. 

  1. Download and install MySQL.

  2. Open a terminal and execute the following command to start your MySQL database:

    mysql.server start
  3. Access the MySQL prompt by giving the user name and password. By default the user name is 'root' and the password is blank.

    mysql -u root -p
  4. Create the sample database named employeedb using the following command: 

    create database employeedb;
  5. Open the employeedb database you just created using the following command:

    use employeedb;
  6.  Create one table in the database using the following command:

    create table employee(id VARCHAR(10) NOT NULL PRIMARY KEY, name VARCHAR(100), address VARCHAR(100));

    This command will create the following table in the database:

  7. Insert employee data into the employee table as follows:

    1. The first employee:

      insert into employee values('01','john','Boston');
    2. The second employee:

      insert into employee values('02','Micheal','Dallas');
    3. The third employee:

      insert into employee values('03','richard','Chicago');
  8. You can see the data that you have added to the employee table of the employeedb database by executing the following command:

    SELECT * FROM employee

    The result will be as follow:

You now have a MySQL database with employee data. 


Starting WSO2 EI

  1. Open a command line terminal and start WSO2 EI by running one of the following startup scripts from the <EI_HOME>/bin directory:

    • On Linux/Mac OS:  sh integrator.sh

    • On Windows:  integrator.bat

  2. Open the Enterprise Integrator management console using https://localhost:8243/carbon/ and log in using admin as the username as well as the password.

Creating your first data service

We are now ready to start creating the first data service. We can use the created employeedb database to expose the data through our data service.

Step 1: Creating the data service

  1. On the Management Console, go to the Main tab and click Services -> Add -> Data Service -> Create. This opens the Create Data Service wizard.

  2. In the Data Service Name field, enter 'MyFirstDS' as the name. Leave the default settings of all other options.
    Create New Data Service

  3. Click Next. This will take you to the page for adding datasources.

Step 2: Adding new datasources

  1. Click Add New Datasource. You can now specify the datasource details. 
    1. In the Datasource ID field, enter 'MyDS'.
    2. In the Datasource Type field, select RDBMS from the list of values. 
  2. You will now be prompted to enter details of your RDBMS:
    Edit datasources page
  3. Enter the following details of your MySQL database in the relevant fields as shown above:
  4. Click Save to save the datasource.
  5. Click Next. This will take you to a new page for adding queries to your service. 

Step 3: Creating a query for your datasource

  1. Now we will create a query to obtain all the employee details saved in the database.
    1. Enter a name for the query in the Query ID field. We will use 'QueryAll'.
    2. All datasources created for the data service will be listed for the Datasource field. Select MyDS from this list.
    3. Specify the SQL statement in the SQL field. We will use a SELECT statement to query for all the employee details in the database as shown below.
    4. We must now specify output mappings to determine how the information in the database should be displayed in the query output. We will be needing three columns (IDName and Address) to display the employee details. Therefore, we need to create three output mapping entries for these fields. Click Generate Response to automatically create output mappings as shown below.
  2. Click Next. This will take you to a new page for connecting operations to each of your queries.

Step 4: Creating an operation to invoke a query

  1. Enter a name for the operation in the Operation Name field. We will use 'getEmployees'. 
  2. All the queries defined for the data service will be listed for the Query ID field. Select 'QueryAll'.
  3. Save the operation.
  4. Click Finish to complete the data service creation. The 'MyFirstDS' data service is now listed as a deployed data service.
    Deployed services page

Invoking the data service

In this section, we will look at two different ways of invoking our data service without writing a single line of code. First, we will invoke our data service using the Tryit utility, which is integrated with the Management Console of WSO2 EI. We will then invoke the service using a simple HTTP GET request.

Using the TryIt tool

  1. In the Deployed Services page, you will now see 'MyFirstDS' listed as a data service. You can access the Deployed Services page by clicking Services -> List in the Main tab.
  2. Click the Try this service link for the data service. The service will be opened from the TryIt tool as shown below.
    TryIt Tool
    All the operations defined for the data service will be listed in the left navigator. As shown above, the 'MyFirstDS' data service has one operation (getEmployees). 
  3. Click getEmployees to invoke the operation.
  4. Click Send to execute the getEmployees operation and the result will be printed as shown below. 
    TryIt Tool result

    Note that the employee ID and name will be returned as XML elements and the address will be wrapped as an attribute. This is due to the  output mapping  that was defined for each column: We have configured ID and Name as  element  type mappings and the address as an  attribute  type mapping. You can edit these mappings and observe the associated changes in the response very easily using the Tryit tool.

Sending an HTTP GET request

Now we will invoke the same data service using the HTTP GET request. Get the URL of the data service from the service dashboard:

  1. Go to Services -> List to open the Deployed Services page.
  2. Click the data service (MyFirstDS) to open the service dashboard. See that the URL of the 'MyFirstDS' data service is listed under Endpointshttps://10.100.5.65:8243/services/MyFirstDS/
  3. You can execute the getEmployees operation using the above URL. Simply copy this URL followed by the operation name as follows:
    https://10.100.5.65:8243/services/MyFirstDS/getEmployees
  4. The result will be the same as with the TryIt tool:
    Operation result using HTTP GET request


  • No labels