Data Transformation Engine HTTP Adapter Reference Guide

Chapter 4 - Syntax Summary Example Files
HTTP Adapter Reference Guide
25
Example Files
To access an example for this adapter, click Start > Programs > Mercator
version number > Design Studio > Examples and navigate to Resource
Adapters.
The following examples can be found in this directory.
Using the Map Designer, select HTTP from the Source setting in an Input
Card dialog box. In the GET > Source > Command field, type the -URL
command to specify the uniform resource locator (URL) specifying the HTTP
server, the file to transfer, and other required adapter commands. In this input
card example, the HTTP adapter retrieves the test.htm file from host server
puff:
-URL HTTP//user1:test@puff:8080/c:/test/tst.htm
Using the Integration Flow Designer to override the HTTP adapter settings for
an input card, enter the following for the Source > GET > Source >
Command setting in the Event Server settings:
-TV –REDIR 3 –URL HTTP://user1:pass@puff:8080/c:/orb/original.htm
The adapter specifies the original.htm file to be used as the data source. The
-TV adapter command specifies that the adapter generate a verbose trace file
containing a log of all activity and events occurring while the adapter is
retrieving data. The -REDIR 3 adapter command specifies that the HTTP
adapter will follow three file redirections (or "document moved" messages)
before the file transfer request fails.
Using the Input Source Override – Application Execution Command (
-IA), this
command string example can be used to override the adapter commands
defined in output card 1:
-IAHTTP1 '-URL HTTP://user1:test@puff:8080/c:/test/test.htm'
This example command string causes the file test.htm to be retrieved from
host server puff.
Use the
M4HHTP_OPT environment variable to specify commands to the HTTP
adapter or a command file containing adapter commands.
Note Commands specified in the input or output card settings override commands
specified in the environment variable.
The format for specifying commands is:
M4HHTP_OPT=adaptercommands