Altova MapForce 2025 Enterprise Edition

Manual Service Definition

Home Prev Top Next

This topic describes the manual definition of a call to an HTTP API. To be able to configure a call to an HTTP API manually, open the Web Service Call Settings dialog and select Manual in the Service Definition section. The parameters you can configure are described in the subsections below.

 

The screenshot below illustrates the manual definition of a sample call to an HTTP API.

mf_ws_01_zoom70

Optionally, if you have the WADL file of the Web service, you can import the Web service settings by clicking Import from WADL (see Import from WADL). Also, if you want to extract the Web service parameters from a URL, click the Import from URL button (see Import from URL).

 

Request method

This setting enables you to define the HTTP method (e.g., GET, POST, PUT, and so on) that MapForce should use to call the Web service. You can select a value from the existing list or type the name of the request method. The HTTP method names are case-sensitive.

 

Connection settings

URL

The URL text box specifies the address (URL) of the Web service you want to call.

 

Dynamic URL (supplied by mapping)

If you would like to supply the URL of the Web service from the mapping, select the Dynamic URL (supplied by mapping) check box. This creates an additional input connector in the Web service component in the mapping, to which you can connect some input which provides the URL of the Web service.

 

Note: When the Dynamic URL (supplied by mapping) check box is selected, the URL text box will become disabled, and you will have to supply the URL from the main mapping. For HTTP APIs, this also means that you can define only Header-style parameters in the Parameters table.

 

With fully or partially dynamic URLs, you can flexibly adjust the URL according to your needs. For example, you could run the mapping with a specific URL during development and use a different URL in production, without modifying the mapping. A URL like https://{host}/some/path/to/service would make this possible, assuming that the host name is the only difference between the production and testing URLs, and you supply it as a parameter to the mapping. Note that partially dynamic URLs enforce stricter validation, since only the designated URL parts are replaced with mappable or runtime values.

 

With fully dynamic URLs, the entire URL is mappable and you have complete control over it; the only requirement is that the URL must begin with http:// or https:// and it must be a valid URL. Dynamic URLs also make it possible to supply the URL returned from a Web service call as input to another component which may call the same (or some other) Web service.

 

Timeout

The Timeout parameter defines the time interval after which the Web service call will time out if there is no response from the server. Select Infinite if the call should wait for a response for an indefinite amount of time.

 

 

Notes about parameters in URL

You can optionally turn specific parts of the URL into parameters and supply values to these parameters from the main mapping. For URLs defined this way, note the following:

 

If you call a Web service with template- or matrix-style parameters, enclose the parameters within curly braces, for example: http://example.org/api/products/{id}. Then define the settings of each parameter in the Parameters table. At runtime, MapForce replaces the placeholders in curly braces with the actual parameter values and produces the final URL.

If you call a Web service with query URL parameters (e.g., http://example.org/api/products?sort=asc&category=1&page=1), do not enter the query part in the URL text box. Instead, define the parameters only in the Parameters table and make sure to designate them as query-style parameters.

 

Structures

This section of the dialog enables you to select the request and response structures of your Web service call. When you call Web services that expect content in the body part of the request message or return content in the body part of the response message, you can set request and response structures to be any of the following:

 

No structure

XML

JSON

Protocol Buffers

 

Note:In Web service calls created with MapForce, you can use standard JSON as request or response structure; JSON Lines or JSON5 structures are not supported.

 

The structure selected here determines the mappable items that appear in the mapping as children of the Body mf_ic_body item.

 

For details about request and response structures, see Request/Response Structures.

 

Parameters

If you call a Web service with URL parameters, you must define the parameters in the Parameters section of the Web Service Call Settings dialog box (screenshot below). This dialog box also enables you to configure the Web service request with custom headers.

 

As an alternative to manual definition, you can also fill in the Web service's parameters automatically, by importing them from an existing URL or from a WADL file.

mf_ws_03

For details about parameters, see Parameters.

 

HTTP security settings

You may need to configure HTTP security settings in the following scenarios:

 

The Web service is called through HTTPS and requires a client certificate.

The server uses an incorrect certificate, and you would like to allow a host name mismatch between the certificate and request.

The Web service requires basic HTTP authentication or OAuth 2.0 authorization.

 

For more information, see HTTP Security Settings.

 

Save all file paths relative to MFD file

When this option is enabled, MapForce saves the file paths displayed in the Component Settings dialog box relative to the location of the MapForce Design (.mfd) file. See also Relative and Absolute Paths.

 

© 2018-2024 Altova GmbH