76
CREATING WEB SERVICES WITH INTEGRATED WEB SERVICES (IWS) TURN YOUR RPG PROGRAMS INTO WEB SERVICES WITH EASE Presented by Mike Larsen Email: [email protected] LinkedIn: www.linkedin.com/in/mike-larsen-a4414a20

Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING WEB SERVICES WITH INTEGRATED WEB SERVICES (IWS)

TURN YOUR RPG PROGRAMS INTO WEB SERVICES WITH EASE

Presented by Mike LarsenEmail: [email protected]

LinkedIn: www.linkedin.com/in/mike-larsen-a4414a20

Page 2: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

AGENDA

• Objectives

• Brief introduction to IWS

• Creating a Web Server

• Lab 1: Creating a very simple Web Service

• Lab 2: Creating a Web Service with Select and Insert capabilities

• Lab 3: Creating a Web Service with Update and Delete capabilities

Page 3: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

OBJECTIVES

• Learn how to create a Web Server on IBM i

• Learn how to create and deploy RPG programs as Web Services

• Learn how to test Web Services using SoapUi

Page 4: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

NOTES

• This session is an introduction to creating Web Services

• All source code used in the session is provided

• RPG code is in fully free format. RDi is recommended, but not required

• SoapUi will be used for testing the Web Services and can be downloaded for

free. https://www.soapui.org/news/soapui-5-3-is-here!.html

Page 5: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

DOWNLOAD FORTICLIENT VPN

• https://forticlient.com/

Page 6: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

BRIEF INTRODUCTION TO IWS

• Allows ILE programs to be deployed as Web Services

• Wizard based deployment

• Supported on IBM i 6.1 and above

• SOAP or REST services. We’ll focus on REST.

• FAQ’s/prerequisites –

https://www-03.ibm.com/systems/power/software/i/iws/faq/

Page 7: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LOG IN TO IWS

• In a browser, navigate to http://10.2.5.250:2001/HTTPAdmin

• Enter your IBM i credentials

Page 8: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVER – STEP 1

• Click the link ‘Create Web Services Server’

Page 9: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVER – STEP 2

• Use default user ID

Page 10: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVER – STEP 3

• Click ‘Finish’

Page 11: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVER

• Click ‘Refresh’

Page 12: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVER

• Web server is created with a default service ‘ConvertTemp’

Page 13: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVICE

• Copy RPG & SQL source members to your personal library, Create source physical

files, if necessary.

• RPG source is in QRPGLESRC/MLARSEN

• REST_1_ML

• REST_2_ML

• REST_3_ML

• WRITE_LOG

• SQL source is in QDDLSRC/MLARSEN

• RESTLOG

• SALES_HIST

• RPG copy source is in QRPGCPYI/MLARSEN

• REST_DEMO

Page 14: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

CREATING A WEB SERVICE

• Compile RPG & SQL source members to your personal library

• Use the cheat sheet to compile the SQL tables

• REST_1_ML – CRTBNDRPG & WRITE_LOG. Create as a program.

• REST_2_ML & REST_3_ML – CRTSQLRPGI. Create as modules, then service

programs.

• REST_DEMO – Don’t compile.

Page 15: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Click ‘Deploy New Service’ or ‘Deploy’ button.

Page 16: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Select ‘REST’, then click ‘Next’.

Page 17: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Populate library name and ILE Object name. Select *PGM, then click ‘Next’.

Page 18: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Populate resource name and service description, then click ‘Next’.

Page 19: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Change ‘ParmInMessage’ to input, then click ‘Next’.

Page 20: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Use the cheat sheet to populate the URI path.

Page 21: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Click ‘Next’.

Page 22: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Click ‘Next’.

Page 23: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Select all transport metadata, and an HTTP header, then click ‘Next’.

Page 24: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Click ‘Finish’.

Page 25: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Note: you may need to click the ‘refresh’ button.

Page 26: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Click on ‘Properties’ to review the Web Service.

Page 27: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CREATE A SIMPLE WEB SERVICE

• Make note of the of base resource URL.

Page 28: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• Launch SoapUi and create a new REST project. The URI is the base resource

URL you just noted, plus the parameter being sent.

Page 29: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• Add the HTTP header ‘user-id’ along with a value of ‘mike’.

Page 30: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

Page 31: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• Execute the web service using the green play button.

Page 32: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• Change the HTTP header value.

Page 33: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• Execute the service again.

Page 34: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – TESTING THE WEB SERVICE

• The program is validating the HTTP header value for ‘user-id’ and only

executing the ‘GetOutMessage’ subroutine if the value is ‘mike’.

Page 35: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CHECK THE REST SERVICE LOG

• Use ACS or STRSQL to view the REST log file.

Page 36: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 1 – CHECK THE REST SERVICE LOG

• Use ACS or STRSQL to view the REST log file.

Page 37: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Click ‘Deploy New Service’ or ‘Deploy’ button.

Page 38: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Select ‘REST’ and click ‘Next’.

Page 39: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Populate the library and ILE object name. This time choose *SRVPGM.

Page 40: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Populate resource name and service description, then click ‘Next’.

Page 41: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Uncheck ‘detect field lengths’ and fill out per screen shot.

Page 42: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Populate the ‘CreateInvoice’ method. Note The HTTP method is ‘POST’.

Page 43: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Populate the ‘GetAll’ method. Note The HTTP method is ‘GET’.

Page 44: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Click ‘Next’.

Page 45: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Click ‘Next’.

Page 46: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Click ‘Next’.

Page 47: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – A WEB SERVICE WITH SELECT AND INSERT

• Click ‘Finish’.

Page 48: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE –‘CREATEINVOICE’

• Launch SoapUi and create a new REST project.

Page 49: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE –‘CREATEINVOICE’

• Change the method to ‘POST’ and populate the JSON being passed.

Page 50: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE –‘CREATEINVOICE’

• Click the ‘play’ button, then check the status on the ‘Headers’ tab.

Page 51: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE – ‘GETALL’

• Create a new REST project.

Page 52: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE – ‘GETALL’

• Click the ‘play’ button, then check the JSON tab for output.

Page 53: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 2 – TESTING THE WEB SERVICE – ‘GETALL’

Page 54: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Click ‘Deploy New Service’ or ‘Deploy’ button.

Page 55: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Select ‘REST’ and click ‘Next’.

Page 56: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Populate the library, ILE object name, and choose *SRVPGM.

Page 57: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Populate resource name and service description, then click ‘Next’.

Page 58: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Uncheck ‘detect field lengths’ and fill out per screen shot.

Page 59: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Populate the ‘DeleteInvoice’ method. Note The HTTP method is ‘DELETE’.

Page 60: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Populate the ‘UpdateInvoice’ method. Note The HTTP method is ‘PUT’.

Page 61: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Click ‘Next’.

Page 62: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Click ‘Next’.

Page 63: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Click ‘Next’.

Page 64: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

• Click ‘Finish’.

Page 65: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – A WEB SERVICE WITH UPDATE AND DELETE

Page 66: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE –‘UPDATEINVOICE’

• Launch SoapUi and create a new REST project.

Page 67: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘UPDATEINVOICE’

• Update Amount and Tax Amount on Invoice ‘000990000100022’.

Page 68: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘UPDATEINVOICE’

• Populate the JSON document and execute the Web Service.

Page 69: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘UPDATEINVOICE’

• Check the Headers tab for the result.

Page 70: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘UPDATEINVOICE’

• Query the Sales History table to see the update.

Page 71: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘DELETEINVOICE’

• Launch SoapUi and create a new REST project.

Page 72: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘DELETEINVOICE’

• Change the method to ‘DELETE’ and click the ‘Play’ button.

Page 73: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘DELETEINVOICE’

• Click on the ‘Headers’ tab to check the result.

Page 74: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

LAB 3 – TESTING THE WEB SERVICE – ‘DELETEINVOICE’

• Run a query in ACS to make sure the invoice was deleted.

Page 75: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

Questions or comments?

Page 76: Creating Web ServiceS with IWS - magic-ug.org...•Launch SoapUi and create a new REST project. LAB 3 –TESTING THE WEB SERVICE –‘UPDATEINVOICE’ • Update Amount and Tax Amount

Thank you!