User Guide: Integration > Configure the Integration Service > SOAP Adapter
To create the service definitions for an external data source providing SOAP interface, use the SOAP Service. You need to have a WSDL URL or file to create the service definition. For example, we will use a WSDL URL of a weather application that has a
GetCityWeatherByZip service and will provide appropriate configurations for the Service Definition.
Configure SOAP End-point Adapter
To configure a SOAP service in Integration service definition tab, follow these steps:
- In the Name field, provide a unique name for your service.
From the Service Type list, select SOAP.
Note: XML is selected, by default.
Provide the following details to create a SOAP service.
|Version||Specify the version number for the service.|
|Base URL||Type the URL.|
|Identity Service for Backend Token||Select the Identity service associated with your app if this service needs backend token like access_token from that Identity service to access the backend server.|
Select the option to specify the WSDL (Web Service Definition Language) URL or upload the WSDL / ZIP file.e.
Click Specify WSDL URL and type the WSDL URL.
Important: In case, if you are unable to read metadata from an integration service (for example, SOAP) that is protected by an SSL certificate, enable the integration service by following one of the ways:- Download the WSDL file from the https WSDL URL and upload the WSDL file on Volt MX Foundry console. - Importing the SSL into your cacerts in your Volt MX Foundry install location. For more details, refer to FAQs.Click Upload WSDL / ZIP File and follow these steps to upload your WSDL / ZIP file. The ZIP file that refers to local XSD files.Click Upload WSDL* / ZIP File button. Navigate to the WSDL or ZIP file from your local system and click *Open.
The selected WSDL or ZIP file gets uploaded.
Select one of the following modes:
None: Select this option if you do not want to provide any authentication for the service. Basic: Provide User ID and Password if the external Web service requires a form or basic authentication. NTLM: Your service follows the NT LAN Manager authentication process. You are required to provide the User ID, Password, NTLM Host, and NTLM Domain.
For additional configuration of your service definition, provide the following details in the Advanced section.
|Custom code||To specify a JAR associated to the service, select one from the Select Existing JAR drop-down menu or click Upload New to add a new JAR file. Make sure that you upload a custom JAR file that is built on the same JDK version used for installing Volt MX Foundry Integration. You can download the uploaded jars to your local system.|
|API Throttling||If you want to use API throttling in Volt MX Foundry Console, to limit the number of request calls within a minute. do the following:|
|In the Total Rate Limit text box, enter a required value. This will limit the total number of requests processed by this API.In the Rate Limit Per IP field, enter a required value. With this value, you can limit the number of IP address requests configured in your Volt MX Foundry console in terms of Per IP Rate Limit.|
|To override throttling from Volt MX Foundry App Services Console, refer to Override API Throttling Configuration.|
|URL Provider Class||Enter the qualified name of the URL Provider Class. For more information, refer URL Provider Support for XML, JSON, SOAP, and API Proxy.|
Note: All options in the Advanced section are optional.
- Enter the Description for the service.
- Click SAVE to save your service definition.
Create Operations for SOAP
The Operation List tab appears when you click Add Operation in the Service Definition page.
Note: Click Operations List tab > Configure Operation. The Configured Operations list appears.
To create an operation, follow these steps:
- Click SAVE & ADD OPERATION in your service definition page to save your service definition and display the NewOperation tab for adding operations.
Click Add Operation to add a new operation or from the tree in the left pane, click Add > Add New Operation.
Click to View image
!(Resources/Images/MuleSoftAddOps_549x351.png) > **_Note:_** To use an existing integration service, refer to [How to Use an Existing Integration Service](Manage_Existing_Integration_Services_1.md#how-to-use-an-existing-integration-service).
- In Operations List tab, click Operation Name list box and select one or more Operations.
Click Add Operation. The selected operations appears under Configured Operations list.
Important: While configuring an integration service with basic auth mode, ensure that some reserved IDs are not used as input/header IDs. Key words such as userid, pwd and password are reserved by middleware when a user selects basic auth mode.
Click the operation name under Configured Operations. The operation details page appears.
- Type the following fields to create an operation
|Name||The operation name appears in the Name field. You can modify the name, if required.|
|Operation Security Level||It specifies how a client must authenticate to invoke this operation.|
|Target URL||The Target URL field is pre-populated with the URL. You can add the suffix, if required.http://baseurl.com/suffixFor Example, to the base URL, you can add suffix such as
Select one of the following security operations in the Operation Security Level field.
**Authenticated App User** – It restricts the access to clients who have successfully authenticated using an Identity Service associated with the app.**Anonymous App User** – It allows the access from trusted clients that have the required App Key and App Secret. Authentication through an Identity Service is not required.**Public** – It allows any client to invoke this operation without any authentication. This setting does not provide any security to invoke this operation and you should avoid this authentication type if possible.**Private** - It blocks the access to this operation from any external client. It allows invocation either from an Orchestration/Object Service, or from the custom code in the same run-time environment.
> **_Note:_** The field is set to Authenticated App User, by default. | | Target URL | The **Target URL** field is pre-populated with the URL. You can add the suffix, if required.http://baseurl.com/suffixFor Example, to the base URL, you can add suffix such as `/latest` or `/sports` to get latest news or sports news:``http://feeds.foxnews.com/foxnews`/latest` `
For additional configuration of request (or) response operations, provide the following details in theAdvanced section.
Custom Code Invocation You can add pre and post processing logic to services to modify the request inputs. When you test, the services details of various stages in the service execution are presented to you for better debugging. All options in the Advanced section are optional. For more details, refer to Preprocessor and Postprocessor. Additional Configuration Properties Additional Configuration Properties allows you to configure service call time out cache response. For information on different types of configuration properties, refer Properties. Pass-through Cookies Pass-through Cookies allows you send cookies present in the incoming client request to the backend target request. For detailed information, refer Pass-through Cookies. Front-end API Front-end API allows you map your endpoint (or) backend URL of an operation to a front-end URL. For detailed information, refer Custom Front-end URL. Stub Backend Response Stub Backend Response allows you enable a stub back-end service. To enable Stub Backend Response, refer How to Enable Stub Back-end Response.For more details on Stub back-end response, refer to How to Develop Apps based on a Stubbed Service. Server Events Using Server Events you can configure this service to trigger or process server side events. For detailed information, refer Server Events.
Note: All options in the Advanced section for operations are optional.
Enter the Description for the operation.
Configure Request Operation for SOAP
Integration services accept only
form-url-encoded inputs for all input parameters provided in service input parameters (request input).
You can perform the following actions in Request Input tab:
- Click Add Parameter to add an entry (if the entries for input and the output tabs does not exist).
- To make duplicate entries, select the check box for the entry, click Copy and Paste.
- To delete an entry, select the check box for an entry and click Delete .
Under the Body tab, perform the following actions:
To forward the body of the client's request to backend as it is, select the Enable pass-through input body check box. For more details on API Proxy service, refer to How to Enable Pass-through Proxy for Operations.
To configure parameters in the clients body, do the following:
Field Description Name Enter the name for the request input parameter. Value Three different options are available in Volt MX Foundry under VALUE during configuration of any operation. When you start editing this field, dependent identity services are auto populated. These options primarily determine the source of the value of the header. Select request or session or Identity Request: If this option is selected, the Integration Server picks the value pairs from the client's request during run time and forwards the same to the back-end.User has the option to configure the default value. This default value is taken if the request does not have the header.Session: If this option is selected, the value of header is picked from session context based on the user configuration.Identity: If this option is selected, you can filter the request parameters based on the response from the identity provider. For more details to configure identity filters, refer to Enhanced Identity Filters - Integration Services.
Note: The field is set to Request, by default. | | TEST VALUE | Enter a value. A test value is used for testing the service. | | DEFAULT VALUE | Enter the value, if required. The default value will be used if the test value is empty. | | Scope | Select request or session. This field is set to Request, by default. | | Encode | Select the checkbox to enable an input parameter to be encoded. For example, the name New York Times would be encoded as New_York_Times when the encoding is set to True. The encoding must also adhere the HTML URL encoding standards. | | Description | Enter the description for the request. |
Click the Header tab to provide the following customer headers, perform the following actions:
You must provide the custom HTTP headers based on the operation. For example, post or get.
- To forward headers of the client's request to backend as it is, select the Enable pass-through input header check box. For more details on API Proxy service, refer to How to Enable Pass-through Proxy for Operations.
To configure parameters in the client's header, do the following:
Field Description Name Provide custom HTTP headers required by the external source. Value Three different options are available in Volt MX Foundry under VALUE during configuration of any operation. When you start editing this field, dependent identity services are auto populated. These options primarily determine the source of the value of the header. Select request or session or Identity.
Request: If this option is selected, the Integration Server picks the value pairs from the client's request during run time and forwards the same to the back-end.User has the option to configure the default value. This default value is taken if the request does not have the header.Session: If this option is selected, the value of header is picked from session context based on the user configuration.Identity: If this option is selected, you can filter the request parameters based on the response from the identity provider. For more details to configure identity filters, refer to Enhanced Identity Filters - Integration Services.
Note: The field is set to Request, by default.> Note: If the header value is scoped as a Request (or) Session and the same header is accessed under the Expression header value, then the expression must be represented as $request.header (or) $session.header.Example: If a header 1 value is a request and header 2 value is an expression, then the value of the expression must be $Request.header1. | | TEST VALUE | Enter a value. A test value is used for testing the service. | | DEFAULT VALUE | Change the syntax, if required. The default value will be used if the test value is empty. | | Description | Enter the description for the header. |
You can add pre and post processing logic to services to modify the request inputs. When you test, the services details of various stages are displayed in the service execution for better debugging. You can refer to Test a Service Operation for the steps to test a service.
Configure Response Operation for SOAP
Click the Response Output tab to configure the fields of the table for displaying the data.
Note: If you define parameters inside a record as the session, the session scope will not get reflected for the parameters.
- To forward the response from the backend to the client as it is, select the Enable pass-through output body check box. For more details on API Proxy service, refer to How to Enable Pass-through Proxy for Operations.
You can create a desired output based on the back-end response by using XPath. So that the extracted output can be sent to the client app. You can create an XPath manually.
The following steps details XPath generation manually:
- Click Add Parameter to add new row.
Click the Tree button in the Backend Response tab.
This displays the backend response in a tree structure format.
Click the node for which you want to create XPath.
The XPath for that node is displayed at the bottom of the Tree structure.
Enter that XPath in the row that you have created.
For more details, refer XPath in Volt MX Foundry.
To configure parameters in the response, enter the values for required fields such as name, path, scope, data type, collection ID, record ID, format and format value.
ID Path State //GetCityWeatherByZIPResponse/GetCityWeatherByZIPResult /State City //GetCityWeatherByZIPResponse/GetCityWeatherByZIPResult /City Temperature //GetCityWeatherByZIPResponse/GetCityWeatherByZIPResult / Humidity //GetCityWeatherByZIPResponse/GetCityWeatherByZIPResult /RelativeHumidity Wind //GetCityWeatherByZIPResponse/GetCityWeatherByZIPResult /Wind
Important: If the back-end for a SOAP service provides the date in a specific format and you want send the date in a different format to a device, you can configure the data format and FormatValue ( syntax :
inputDateFormat~outputDateFormat) in the response tab.
For example, if a back-end sends the date as
Thu, 07 Sep 2017 07:03:00 GMT and you want convert it to
2017-09-07T07:03:00.000+0000, then set the format value as
EEE, dd MMM yyyy HH:mm:ss z~yyyy-MM-dd'T'HH:mm:ss.SSSZ.
For more details on the syntax of the date formats, refer https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
Note: When you enable Pass-through proxy flags, you will notice that you cannot configure request input, headers, and response out parameters for this operation.
- To validate the operation details, click Save and Test. For more details, refer to Test a Service Operation.
- Click SAVE OPERATION to save the changes. To use an existing integration service, refer to How to Use an Existing Integration Service.
Note: You can view the service in the Data Panel feature of Volt MX Iris. By using the Data Panel, you can link back-end data services to your application UI elements seamlessly with low-code to no code. For more information on Data Panel, click here.