Table of Contents

Search

  1. Preface
  2. Web Services
  3. SOAP Web Services
  4. WSDL Data Object
  5. Schema Object
  6. How to Create a SOAP Web Service
  7. Operation Mappings
  8. Parsing Web Service SOAP Messages
  9. Generating Web Service SOAP Messages
  10. Web Service Consumer Transformation
  11. REST Web Services
  12. How to Create a REST Web Service
  13. REST Web Service Consumer Transformation
  14. REST Web Service Consumer Transformation Use Cases
  15. REST and SOAP Web Service Administration
  16. Datatype Compatibility

Web Services Guide

Web Services Guide

How to Use Argument Ports to Generate URL Parameters

How to Use Argument Ports to Generate URL Parameters

You can use argument ports to generate parameters in the URL to filter the data that you request from the web service. For example, if you use the Get method, you cannot configure a method input definition or an input mapping, but you still want to use a filter in the Get request. You can use argument ports to create a filter in the request message. Build a URL such as
https://sample.com?arg1=val1&arg2=val2
by using argument ports to generate the URL parameters.
To configure an argument port after you create the REST Web Service Consumer transformation, complete the following steps:
  1. Select the REST Web Service Consumer transformation.
  2. Navigate to the
    Properties
    view and select the
    Advanced
    tab.
  3. To configure the base URL, complete one of the following steps:
    • To configure the
      URL
      property, enter the base URL.
    • To configure the
      Connection
      property, select the HTTP connection.
  4. Navigate to the
    Ports
    tab.
  5. Highlight the
    RequestInput
    group and select
    New
    . Select
    Argument Ports
    from the drop-down menu.
    This image shows the Ports tab of the REST Web Service Consumer transformation. The RequestInput group is highlighted. New is selected and the drop-down menu is shown. In the drop-down menu, Argument Ports is selected.
  6. Enter values for
    Argument Name
    and
    Port Name
    .
    If the port name contains characters that the Data Integration Service cannot process, change the port name.
    This image shows the dialog box to create an argument port. You can configure the argument port properties Argument Name and Port Name.
    The following image shows the argument port nested under RequestInput:
    This image shows the Ports tab of the REST Web Service Consumer transformation. The URL port appears under the group RequestInput.
  7. Repeat steps 3 and 4 to add a second argument port.
    The second argument port appears under the first argument port:
    This image shows the Ports tab of the REST Web Service Consumer transformation. There are two argument ports nested under RequestInput. The first argument port has a value of arg1 and the second argument port has a value of arg2.
    The argument port values are appended to the URL in the format
    http://sample.com?arg1=val1&arg2=val2
    . The port name is not used in the URL. The Data Integration Service uses the port name to identify the argument ports.
  8. To use the argument ports
    arg1
    and
    arg2
    as parameters in the base URL, link ports from an upstream mapping object to the argument ports in the REST Web Service Consumer transformation.
    The ports linked from an upstream object define
    val1
    and
    val2
    in the URL
    https://sample.com?arg1=val1&arg2=val2
    .

0 COMMENTS

We’d like to hear from you!