You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide9/modeling/integration/web-services/consumed-web-services/consume-a-complex-web-service.md
This opens the **Import Web Service or XML Schema** wizard that will guide you through importing the result of a web service (or an XML file). As a result, it will generate the following:
33
35
* Domain model entities to store the results
@@ -36,29 +38,29 @@ To import a web service using the wizard, follow these steps:
36
38
* A microflow that calls the web service (or imports an XML file) (optional)
37
39
2. On the **Import Web Service or XML Scheme** dialog box, select **Web service operation** and click **Next**:
3. On the **Import Web Service** dialog box, select **Web service operation** and click **Next**.
42
44
4. In the **New Web Service Operation** dialog box, for **WSDL source** , specify the WSDL to be used for this imported web service. For the **WSDL source** you can either provide the **URL** (for example, http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL) or load a **File** from your computer.
7. On the **New Web Service Operation** dialog box, you can review the services and operations that are available to the imported web service. If you click on any of the operations, information about the operation will be displayed in the right pane. Select a web service operation and click **Next**.
52
54
53
-
{{< figure src="/attachments/howto9/integration/consume-a-complex-web-service/wizard-web-service-list.png" alt="wizard web service" >}}
55
+
{{< figure src="attachments/refguide9/integration/consume-a-complex-web-service/wizard-web-service-list.png" alt="wizard web service" >}}
54
56
55
57
8. On the **Select Elements** dialog box, you can optionally select individual elements to map as return values of the web service. Click **Next**.
9. In the final step of this wizard you can select icons that will be attached to the generated entities and create a microflow in which the imported web service is called:
@@ -83,52 +85,52 @@ To import a web service directly, follow these steps:
83
85
2. Specify a name for the new consumed web service and click **OK**.
84
86
3. In the **Consumed Web Service** box, specify the **WSDL Source** to be used for this consumed web service. Click **Edit**, and in the **WSDL Source** diaglog box, specify a **URL** or load a **File** from your computer.
4. Click **Import** to fetch the services and operations in the WSDL. If prompted, in the **WSDL Source** dialog box, select the ports you want to use and click **OK**.
89
91
90
92
5. In the **Consumed Web Services** screen, review the **Services** and **Operations** available to the imported web service. If you click on any of the **Operations**, information about the operation will be displayed in the right pane. You can select individual web service operations from the list otherwise the whole service and operation will be imported:
To configure the web service call, follow these steps:
97
99
98
100
1. If you did not use the web service wizard or did not use the option in the wizard to automatically create a microflow, you have to create a microflow that will call the imported web service:
{{% alert color="info" %}}Make sure the microflow either creates the variables required as arguments for the web service call or has them passed to it.{{% /alert %}}
103
105
104
106
2. If you are creating your own microflow, add the call web service activity to the microflow. For details on how to add activities to a microflow, see [Activities](/refguide9/activities/) in the *Studio Pro Guide*.
105
107
3. Double-click the activity to open the **Call Web Service** properties editor and in the **Operation** section, click **Select** for **Operation**.
106
108
4. In the **Select Web Service Operation** dialog box, you can select the operation for this web service call:
107
109
108
-
{{< figure src="/attachments/howto9/integration/consume-a-complex-web-service/select-web-service-op.png" alt="select web service op" >}}
110
+
{{< figure src="attachments/refguide9/integration/consume-a-complex-web-service/select-web-service-op.png" alt="select web service op" >}}
109
111
110
112
5. In the **SOAP Request Body** tab of the **Call Web Service** properties editor, you can configure the SOAP body. This contains the parameters needed to execute the web service request. The **Simple**, **Export Mapping**, and **Custom** options enable you to select the type of SOAP body to use. Click **Edit value** and use one of the following to change the domain-to-XML mapping or the variables from the microflow used as input arguments:
111
113
***Simple expressions for each request parameter** — if the imported web service requires only primitive arguments:
***Export mappings for each request parameter** or **Export mapping for the entire request** — if the domain model entities need to be mapped to XML elements
116
118
***Custom request template** — for the definition of a custom XML body with parameters:
6. In the **HTTP Headers** tab, if the Mendix Runtime should use HTTP authentication before calling the web service, check **Use HTTP authentication** and enter the **User name** and **Password** using the **Edit** buttons:
Copy file name to clipboardExpand all lines: content/en/docs/refguide9/modeling/integration/web-services/consumed-web-services/consume-a-simple-web-service.md
@@ -29,11 +31,11 @@ To import a WSDL, follow these steps:
29
31
3. On the **Consumed Web Service** screen. Click **Edit**. Enter `https://www.w3schools.com/xml/tempconvert.asmx?wsdl` as the **URL** and click **Import**.
30
32
4. The **Select Ports** dialog box is displayed for selecting a web service port:
5. Click **OK** to select the default, and click **OK** to close the **WSDL Source** dialog. The operations **CelsiusToFahrenheit** and **FahrenheitToCelsius** are imported into the app:
8. Drag a **Call web service** activity from the toolbox and add it to the microflow just before the end event.
62
64
9. Double-click this activity to open the **Call Web Service** properties editor. For the **Operation** of your consumed web service, click **Select**. Expand the **TemperatureConverter** web service and under **TempConvert** click **CelsiusToFahrenheit** and click **Select**:
10. In the **Location** section for this operation , check the **Override location** box to override the location and use the secure location of the web service.
67
69
11. Click **Edit** and change `http` to `https` for the URL in the **Location** editor and click **OK**.
68
70
12. In the **SOAP Request Body** tab of the **Call Web Service** properties editor, double-click the **Celsius (optional)** input parameter and enter `toString($TemperatureInCelsius)` for the expression. The web service operation expects a string value, which is why you need to use the `toString` function. Then click **OK**.
15. Drag a **Show message** activity from the **Toolbox** to the line before the end event.
81
83
16. Double-click the new activity to open the **Show Message** dialog box.
82
84
83
85
17. Select **Information** as the **Type**, and enter *The temperature in Fahrenheit is: {1}* for the **Template**. The *{1}* functions as a placeholder for the parameters.
18. Create a new parameter and enter `$TemperatureInFahrenheit` for the expression (this is the return value of the web service operation) and click **OK**:
20. Create a menu item that triggers this microflow. For details on how to create a menu item, see [Setting Up Navigation](/refguide9/setting-up-the-navigation-structure/).
96
98
@@ -99,8 +101,8 @@ To create logic to call the web service, follow these steps:
99
101
## 4 Read More
100
102
101
103
*[Create a Secure App](/howto9/security/create-a-secure-app/)
102
-
*[Consume a Complex Web Service](/howto9/integration/consume-a-complex-web-service/)
104
+
*[Consume a Complex Web Service](/refguide9/integration/consume-a-complex-web-service/)
103
105
*[Export XML Documents](/howto9/integration/export-xml-documents/)
0 commit comments