+ All Categories
Home > Documents > Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and...

Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and...

Date post: 13-Feb-2019
Category:
Upload: vancong
View: 222 times
Download: 0 times
Share this document with a friend
14
Calling a RESTful service and processing the JSON or XML_HTTP response Part 1: Deployment of the service package using Amazon’s Elastic Beanstalk Part 2: Building a mobile app to call the service Part 3: Running the app on a mobile device Part 4: Final tips on using the PROCE55 Player iOS application
Transcript
Page 1: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling a RESTful service and processing the JSON or XML_HTTP response

Part 1: Deployment of the service package using Amazon’s Elastic BeanstalkPart 2: Building a mobile app to call the servicePart 3: Running the app on a mobile devicePart 4: Final tips on using the PROCE55 Player iOS application

Page 2: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Creating and deployment of a testing AWS Elastic Beanstalk application

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk

1

2

3

Page 3: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk Creating and deployment

of a testing AWS Elastic Beanstalk application

1

2

3

Page 4: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk Creating and deployment

of a testing AWS Elastic Beanstalk application

1

2

3

Page 5: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk Creating and deployment

of a testing AWS Elastic Beanstalk application

1

2

3

Page 6: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk Creating and deployment

of a testing AWS Elastic Beanstalk application

Page 7: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 1: Deployment of the service package using Amazon’s Elastic Beanstalk

Check if your service application is available using a web browser. As you can see, based on the ‘mode’ parameter in the URL the service returns either an

XML_HTTP (default) or a JSON response.

Page 8: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 2: Building a mobile app to call the service

Open the ‘PHP Service Demo’ app using the PROCE55 Mobile Modeler (file name: PHP_Service_AWS_ElasticBeanstalk.p55m).

You can download both from PROCE55.com

Page 9: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 2: Building a mobile app to call the service

Select the first table on the screen s1 (s1_t1) and examine the table column definition. Table columns have the visible Header text (shown to the user) and

the internal system name used as a parameter in action sequences (e.g. ‘Response type’ / resp_type).

Page 10: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 2: Building a mobile app to call the service

Select the ‘s1_b2’ button and inspect the

action sequence

This service will only be called if the enclosing condition is true

Similarly, the other service will be called if we choose the

second option from the s1_t1 table (resp_type=2, which is the JSON response type in this case)

Once the action sequence is completed, we will end up on the

target screen (s2 in this case).

Page 11: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 2: Building a mobile app to call the service

The service request and response will be processed using the XML_HTTP format

The service call request (POST body) will contain one parameter (mode) and the response should contain three scalar values (MATNR, TEXT, PHPVER) and a table (TABLE1)

Page 12: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

Calling RESTful service and processing the JSON or XML_HTTP responsePart 2: Building a mobile app to call the service

This service request will be called using the HTTP GET

The service call response should be in JSON format

Page 13: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

1. Scan the app QR code Using the ‘PROCE55 Player’ application on

your mobile device

2. Tap the button to call the service

3. The service has returned two tables and two scalar

values

4. Change the preselected table rows by tapping the table elements

5. We have now transferred the selected table values to the last

screen (s3). Tap the ‘Exit’ button.

Calling RESTful service and processing the JSON or XML_HTTP responsePart 3: Running the app on a mobile device

Page 14: Calling a RESTful service and processing the JSON or XML ... · Calling a RESTful service and processing the JSON or ... the PROE55 Mobile Modeler (file name: PHP_Service ... RESTful

You can access all the apps you have imported from portals or QR codes using the ‘My Apps’ tab

You can also remove apps you no longer need in the list

Calling RESTful service and processing the JSON or XML_HTTP responsePart 4: Final tips on using the PROCE55 Player iOS application


Recommended