Skip to content

Commit 276ae9b

Browse files
author
Johanna Hemminger
committed
Fix links and move some images
1 parent 19b6c99 commit 276ae9b

14 files changed

Lines changed: 86 additions & 80 deletions

File tree

content/en/docs/howto8/integration/testing-web-services-using-soapui.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ category: "Testing"
55
weight: 30
66
tags: ["test", "testing", "web service", "soapui"]
77
aliases:
8-
- /howto8/testing/testing-web-services-using-soapui/
8+
- /howto8/integration/testing-web-services-using-soapui/
99
---
1010

1111
## 1 Introduction
@@ -43,11 +43,11 @@ In the how-to [Exposing a web service](/howto8/integration/expose-a-web-service/
4343
2. Open the project you created in the how-to [Exposing a web service](/howto8/integration/expose-a-web-service/).
4444
3. Create a **Microflow** that creates a customer and returns a Boolean.
4545

46-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/model1.jpg" >}}
46+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/model1.jpg" >}}
4747

4848
4. Create a **Microflow** that deletes a customer and returns a Boolean.
4949

50-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/model2.jpg" >}}
50+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/model2.jpg" >}}
5151

5252
5. Publish both microflows as web service operation of the **CustomerWebservice** as described in chapter 4 of the how-to [Exposing a web service](/howto8/integration/expose-a-web-service/).
5353

@@ -57,39 +57,39 @@ In this chapter you will create a new SOAP project.
5757

5858
1. Open **SoapUI**.
5959
2. Press **CTRL+N** to create a new SOAP project.
60-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580339.png" >}}
60+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580339.png" >}}
6161
3. Run the project locally in Studio Pro.
6262
4. Go to `http://localhost:8080/ws-doc/`.
63-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580314.png" >}}
63+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580314.png" >}}
6464
5. Enter the URL of the WSDL schema in the **Initial WSDL** field in SoapUI.
6565
The Project Name field will automatically be filled with the name of the webservice following by *?wsdl*.
66-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580334.png" >}}
66+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580334.png" >}}
6767
6. Click**OK**. This will create a new SOAP project in SoapUI.
68-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580313.png" >}}
68+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580313.png" >}}
6969

7070
## 5 Building a TestSuite, TestCase, and TestStep
7171

7272
In this chapter you will build a testsuite. A testsuite contains one or more testcases. Every testcase contains one ore more teststeps.
7373

7474
1. In SoapUI, press **CTRL+T** to create a new TestSuite.
75-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580332.png" >}}
75+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580332.png" >}}
7676
2. Click **OK**.
7777
3. Select TestSuite 1 and press **CTRL+N** to create a new TestCase.
78-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580331.png" >}}
78+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580331.png" >}}
7979
4. Click **OK**.
8080
5. Expand TestSuite 1 and TestCase 1.
8181
6. Right-click **Test Steps(0)** and select **SOAP Request**.
82-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580312.png" >}}
82+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580312.png" >}}
8383
7. Enter *Retrieve Customers* in the name field.
84-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580329.png" >}}
84+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580329.png" >}}
8585
8. Click **OK**.
8686
9. Select **CustomerWebserviceSoap -> GetCustomers**.
87-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580328.png" >}}
87+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580328.png" >}}
8888
10. Click **OK**.
89-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580327.png" >}}
89+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580327.png" >}}
9090
11. Click **OK**.
9191
12. Open SOAP request **Retrieve Customers**.
92-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580326.png" >}}
92+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580326.png" >}}
9393
13. Change the follow value:
9494

9595
```java
@@ -144,15 +144,15 @@ In this chapter you will build a testsuite. A testsuite contains one or more tes
144144
Assertions are used to validate the message received by a TestStep during execution, usually by comparing parts of the message (or the entire message) to some expected value. In this chapter you will create an assertion that validates the number of customers.
145145

146146
1. Click **Assertions (1)**.
147-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580307.png" >}}
147+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580307.png" >}}
148148
In chapter 3 step 9 the *Add SOAP Response Assertion* checkbox was checked. That is the first assertion you see in the list, *SOAP Response - VALID*.
149149
2. Click the add assertion icon.
150-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580324.png" >}}
150+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580324.png" >}}
151151
3. Click **Property Content**.
152152
4. Click **XPath Match**.
153153
5. Enter *count(//Customer)* in the XPath Expression field.
154154
6. In step 1.4 of the previous how-to you have added some data. Enter the number of created customers in the **Expected Result** field. In this example four customers were created.
155-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580323.png" >}}
155+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580323.png" >}}
156156
7. Click **Save**.
157157

158158
## 7 Extending Your Test Case
@@ -183,13 +183,13 @@ In this chapter you will extend your test case with multiple test steps and asse
183183
```
184184

185185
3. Add a **Contains Assertion** and enter *true* in the content field.
186-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580322.png" >}}
186+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580322.png" >}}
187187
4. Right-click test step **Retrieve Customers**.
188188

189189
5. Select **Clone TestStep**.
190190

191191
6. Change **TestStep Name** to *Retrieve Customers 2*.
192-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580320.png" >}}
192+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580320.png" >}}
193193
7. Click **OK**.
194194
8. Open teststep **Retrieve Customers 2**.
195195
9. Click **Assertions (2)**.
@@ -218,17 +218,17 @@ In this chapter you will extend your test case with multiple test steps and asse
218218
In this chapter you will learn how to run the testcase you created in previous chapters.
219219

220220
1. Open testcase **TestCase 1**.
221-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580310.png" >}}
221+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580310.png" >}}
222222
2. Click the run this testcase icon.
223-
{{< figure src="/attachments/howto8/testing/testing-web-services-using-soapui/18580309.png" >}}
223+
{{< figure src="/attachments/howto8/integration/testing-web-services-using-soapui/18580309.png" >}}
224224

225225
Congratulations! You have just created your first automated test with SoapUI.
226226

227227
## 9 Read More
228228

229229
* [Finding the Root Cause of Runtime Errors](/howto8/monitoring-troubleshooting/finding-the-root-cause-of-runtime-errors/)
230230
* [Clearing Warning Messages in Mendix](/howto8/monitoring-troubleshooting/clear-warning-messages/)
231-
* [Testing web services using SoapUI](/howto8/testing/testing-web-services-using-soapui/)
231+
* [Testing web services using SoapUI](/howto8/integration/testing-web-services-using-soapui/)
232232
* [Monitoring Mendix using JMX](/howto8/monitoring-troubleshooting/monitoring-mendix-using-jmx/)
233233
* [Debugging Java actions remotely](/howto8/monitoring-troubleshooting/debug-java-actions-remotely/)
234234
* [Log Levels](/howto8/monitoring-troubleshooting/log-levels/)

content/en/docs/refguide9/modeling/integration/rest-services/consumed-rest-services/consume-a-rest-service.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
title: "Consume a REST Service"
3-
url: /howto9/integration/consume-a-rest-service/
3+
url: /refguide9/integration/consume-a-rest-service/
44
category: "Integration"
55
weight: 9
66
description: "Describes how to integrate an existing system or a legacy system into a Mendix app by calling a REST service in a microflow."
77
tags: ["integration", "rest service", "data model", "consume"]
88
description: "Describes how to get information from a REST service."
9+
aliases:
10+
- /howto9/integration/consume-a-rest-service/
911
---
1012

1113
## 1 Introduction
1214

13-
In your Mendix app, you can use information from REST services. This how-to shows you how to do that through an example in which you create an app that retrieves Wikipedia pages from a REST service. The resulting app is [available for download](/attachments/howto9/integration/consume-a-rest-service/WikipediaApi.mpk).
15+
In your Mendix app, you can use information from REST services. This how-to shows you how to do that through an example in which you create an app that retrieves Wikipedia pages from a REST service. The resulting app is [available for download](/attachments/refguide9/integration/consume-a-rest-service/WikipediaApi.mpk).
1416

1517
This how-to will teach you how to do the following:
1618

@@ -25,14 +27,14 @@ We will start by providing Studio Pro as an example of what the REST service ret
2527
1. Open your browser and go to [https://en.wikipedia.org/api/rest_v1/page/summary/Tahiti](https://en.wikipedia.org/api/rest_v1/page/summary/Tahiti).
2628
2. This calls the REST service with a GET request – the result is the summary of the [Tahiti page on Wikipedia](https://en.wikipedia.org/wiki/Tahiti) in the JSON format:
2729

28-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/get-call-result.png" alt="Screenshot of the result of the rest call" >}}
30+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/get-call-result.png" alt="Screenshot of the result of the rest call" >}}
2931

3032
3. Select the **Raw Data** tab and copy the whole whole JSON snippet.
3133
4. Create a module and name it *RESTconsume*. Add the new [JSON structure](/refguide9/json-structures/) to your module: right-click the module in the **App Explorer** and select **Add other** > **JSON structure**.
3234
5. Enter a **Name** for the structure: *JSON_structure* and click **OK**.
3335
6. In the **JSON Structure** dialog box, paste the JSON snippet in the **General** tab and click **Refresh** in the **Structure** section. This analyzes the structure of the JSON snippet and provides a representation of it.
3436

35-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/json-structure.png" >}}
37+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/json-structure.png" >}}
3638

3739
7. Click **OK**
3840

@@ -46,7 +48,7 @@ An [import mapping](/refguide9/import-mappings/) specifies how the JSON relates
4648
4. Double-click **JSON_structure** in the **Select JSON Structure** dialog box.
4749
5. Click **Expand all** and then click **Check all**.
4850

49-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/import-mapping.png" >}}
51+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/import-mapping.png" >}}
5052

5153
6. Click **OK**. The **Import_mapping** document is displayed and the JSON structure is on the right.
5254
7. Click **Map automatically** in the editor toolbar.
@@ -69,13 +71,13 @@ To add an input entity to the domain model, follow these steps:
6971
6. On the **Attributes** tab, click **New** to add a string attribute, name it *Title*, then click **OK**.
7072
7. Drag an association from **Input** to **Summary**.
7173

72-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/domain-model.png" >}}
74+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/domain-model.png" >}}
7375

7476
8. Double-click **Import_mapping** in the **App Explorer** and from the **Connector** pane, drag **Input** as the input parameter for the input mapping.
7577
9. Double-click **Summary**.
7678
10. In the **Map entity 'Summary' from schema object element 'Root** dialog box, **Set association** to **Yes** and select the **RESTconsume_input_Summary** for the **Association** to enable the import mapping to set the association:
7779

78-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/map-entity-from-input-mapping.png" alt="map entity from input mapping" >}}
80+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/map-entity-from-input-mapping.png" alt="map entity from input mapping" >}}
7981

8082
11. Click **OK**.
8183

@@ -91,13 +93,13 @@ To call the REST service in a microflow, follow these steps:
9193
4. Right-click and select **Add** > **Activity** and insert this to the microflow. Double-click the activity and select **Call REST service** to change the type of action.
9294
5. In the **Call REST** dialog box, click **Edit** for the **Location** and add the following to **Template**: `https://en.wikipedia.org/api/rest_v1/page/summary/{1}`, with the parameter being the Title attribute from the **Input** parameter `$Input/Title`. Click **OK**.
9395

94-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/location.png" >}}
96+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/location.png" >}}
9597

9698
6. In the **Response** tab, the response has to be mapped using the import mapping. For **Response handling** select **Apply import mapping**.
9799
7. For **Mapping**, click **Select** and double-click **Import_mapping**. For the **Parameter**, select **Input**.
98100
8. For **Output** select **Yes** for **Store in variable** and specify *Summary* for the **Variable name**.
99101

100-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/response.png" >}}
102+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/response.png" >}}
101103

102104
9. Click **OK**.
103105
10. Right-click after the **Call REST service** object and select **Insert** > **Activity** and double-click it and change it to a **Change object**.
@@ -107,15 +109,15 @@ To call the REST service in a microflow, follow these steps:
107109
14. On the **Edit Change Item** dialog box, for **Member**, select **RESTconsume.Input_Summary (RESTconsume.Summary)**.
108110
15. Under **Value**, enter `$Summary`.
109111

110-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/set-association.png" >}}
112+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/set-association.png" >}}
111113

112114
16. Click **OK**.
113115

114-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/change-object.png" >}}
116+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/change-object.png" >}}
115117

116118
17. Click **OK**. You have created microflow that takes the title of an article as input and associates it with its summary.
117119

118-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/microflow.png" >}}
120+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/microflow.png" >}}
119121

120122
You have successfully consumed a REST service and created a microflow to show the results. The rest of this how-to describes how to use this microflow in an app so that you can see the REST call in action.
121123

@@ -141,7 +143,7 @@ To create a page for this app, follow these steps:
141143
16. For **Show label**, select **No**, then click **OK**.
142144
17. Delete the **Save** and **Cancel** buttons.
143145

144-
{{< figure src="/attachments/howto9/integration/consume-a-rest-service/page.png" >}}
146+
{{< figure src="/attachments/refguide9/integration/consume-a-rest-service/page.png" >}}
145147

146148
## 7 Filling in the Create Input Microflow {#createinput}
147149

0 commit comments

Comments
 (0)