Exercise3 Integration

download Exercise3 Integration

of 21

Transcript of Exercise3 Integration

  • 7/25/2019 Exercise3 Integration

    1/21

    Exercise 3

    Integration

  • 7/25/2019 Exercise3 Integration

    2/21

    www.outsystems.com OutSystems. All Rights Reserved2

    www.outsystems.com OutSystems. All Rights Reserved2

    Trainer ReminderCreate GetSuppliers web service on module Supplier Portal

    Make sure that during the integration demo, you go to Supplier Portal on the demo server and exposethe suppliers as webservice.

  • 7/25/2019 Exercise3 Integration

    3/21

    www.outsystems.com OutSystems. All Rights Reserved3

    www.outsystems.com OutSystems. All Rights Reserved3

    Exercise context Part 1Overview

    Company ACME Goods wants to retrieve its own suppliers from their Supplier Portal application

    Main Needs:

    Supplier Information on the application

  • 7/25/2019 Exercise3 Integration

    4/21

    www.outsystems.com OutSystems. All Rights Reserved4

    www.outsystems.com OutSystems. All Rights Reserved4

    Exercise StructureDevelopment stages

    1.

    SOAP Webservices integration

    Get wsdl file

    2. Call SOAP Webservice Use webservices

  • 7/25/2019 Exercise3 Integration

    5/21www.outsystems.com OutSystems. All Rights Reserved5 www.outsystems.com OutSystems. All Rights Reserved5

    IntegrationStep 1 Open Customer management application

    1. Go to Service Studio and open the Customer Management application.

  • 7/25/2019 Exercise3 Integration

    6/21www.outsystems.com OutSystems. All Rights Reserved6 www.outsystems.com OutSystems. All Rights Reserved6

    IntegrationStep 2 Create a SOAP web reference

    1.

    Go to Logic Section and right click WebServices.

    2.

    After click Consume SOAP Web Service and

    add the following wsdl: http://

    demo4dev.outsystems.net/SupplierPortal/

    Supplier.asmx?WSDL

    3. Create a new web screen calledSuppliers on the Interface section.

    4. Add a preparation action so you can

    populate the screen.

  • 7/25/2019 Exercise3 Integration

    7/21www.outsystems.com OutSystems. All Rights Reserved7 www.outsystems.com OutSystems. All Rights Reserved7

    IntegrationStep 3 Show the service result on your application

    1.

    Drag the GetSuppliers web method from theLogic section to the preparation flow. 2. Drag Table Records widget to theSuppliers page.

    3. Add Suppliers to the title.

  • 7/25/2019 Exercise3 Integration

    8/21www.outsystems.com OutSystems. All Rights Reserved8 www.outsystems.com OutSystems. All Rights Reserved8

    IntegrationStep 4 Bind the web service

    1.

    Drag the supplier structure to the Table

    Records widget.

    2. Bind the table records to the output of the

    web service.

  • 7/25/2019 Exercise3 Integration

    9/21www.outsystems.com OutSystems. All Rights Reserved9 www.outsystems.com OutSystems. All Rights Reserved9

    IntegrationStep 5 Compose the interface

    1.

    On the interface section go to Customerspage. 2. Drag the Suppliers page to the menu.

  • 7/25/2019 Exercise3 Integration

    10/21

    www.outsystems.com OutSystems. All Rights Reserved10 www.outsystems.com OutSystems. All Rights Reserved10

    IntegrationStep 6 Deploy & Publish

    1.

    Deploy and publish the application.

  • 7/25/2019 Exercise3 Integration

    11/21

    www.outsystems.com OutSystems. All Rights Reserved11 www.outsystems.com OutSystems. All Rights Reserved11

    IntegrationStep 7 Congratulations!

    1.

    Test your integration by seeing the supplier list.

  • 7/25/2019 Exercise3 Integration

    12/21

    www.outsystems.com OutSystems. All Rights Reserved12 www.outsystems.com OutSystems. All Rights Reserved12

    Exercise context Part 2Overview

    Company ACME Goods wants to check the local Weather at the customer location before going tomeetings there

    Main Needs:

    Local Weather Information on the application

  • 7/25/2019 Exercise3 Integration

    13/21

    www.outsystems.com OutSystems. All Rights Reserved13 www.outsystems.com OutSystems. All Rights Reserved13

    Exercise StructureDevelopment stages

    1.

    REST Webservices integration

    Set up REST web service in OutSystems

    2. Call REST Webservice Use webservices

  • 7/25/2019 Exercise3 Integration

    14/21

    www.outsystems.com OutSystems. All Rights Reserved14 www.outsystems.com OutSystems. All Rights Reserved14

    IntegrationStep 1 Prepare a REST web reference

    1.

    Using your browser, go to

    http://openweathermap.org/api

    2.

    Review the documentation for integrating to

    this REST web service

    3. In the Logic Section, right click Web

    Services and select Consume REST API.

    4. Copy past the example URL and example

    response into the Consume REST API

    dialog

  • 7/25/2019 Exercise3 Integration

    15/21

    www.outsystems.com OutSystems. All Rights Reserved15 www.outsystems.com OutSystems. All Rights Reserved15

    IntegrationStep 2 Add parameters to the API call

    1.

    In the URL replace London,uk with {city},

    which will create a parameter with that name.

    2.

    Press ok.

  • 7/25/2019 Exercise3 Integration

    16/21

    www.outsystems.com OutSystems. All Rights Reserved16 www.outsystems.com OutSystems. All Rights Reserved16

    IntegrationStep 3 Get Weather info for Customers city

    1.

    In the Preparation action of the CustomerDetail add the GetWeather API call

    2.

    Set the City input parameter of the GetWeather API call

  • 7/25/2019 Exercise3 Integration

    17/21

    www.outsystems.com OutSystems. All Rights Reserved17 www.outsystems.com OutSystems. All Rights Reserved17

    IntegrationStep 4 Add info to Customer Screen

    1.

    In the CustomerDetail screen add a new Form

    2.

    Set the Source Record property in the new Form to GetWeather.Response.Main and the Enabled

    property to False

    3. Drag the Main structure into the new Form

  • 7/25/2019 Exercise3 Integration

    18/21

    www.outsystems.com OutSystems. All Rights Reserved18 www.outsystems.com OutSystems. All Rights Reserved18

    IntegrationStep 5 Deploy & Publish

    1.

    Deploy and publish the application.

  • 7/25/2019 Exercise3 Integration

    19/21

    www.outsystems.com OutSystems. All Rights Reserved19 www.outsystems.com OutSystems. All Rights Reserved19

    IntegrationStep 6 Congratulations!

    1.

    Test your integration by seeing the Customer Detail screen for a customer

    2. Reading this REST API documentation, you can change the units to metric just by adding the

    parameter into the REST address &units=metric

  • 7/25/2019 Exercise3 Integration

    20/21

    Thank you for your time!

    Hope you have enjoyed the session!

  • 7/25/2019 Exercise3 Integration

    21/21

    www.outsystems.com Page 21 OutSystems all rights reserved

    This material is owned by OutSystems and may only beused in the ways described in this Copyright Notice:

    You may take temporary copies necessary to read this

    document

    You may print a single copy of this material forpersonal use

    You must not change any of this material or remove

    any part of any copyright notice

    You must not distribute this material in any shape or

    form

    Copyright