HTTP Read Service (com.ibi.agents.XDHTTPReadAgent)

Syntax:

com.ibi.agents.XDHTTPReadAgent

iIT Service Object:

http: HTTP Read Agent

read: HTTP Read Agent

Description:

This service reads an HTTP source using HTTP GET and returns a result. The GET facility input accepts a URL in the incoming document and issues an HTTP GET through that URL. The transform business service and standard output can accept and operate upon this output. It is presumed that some output is returned, otherwise an error is generated.

In a use case scenario, the HTTP Read service can be part of an architecture for a web search engine, similar to the Google search engine. The service could be used to traverse or spider the contents of webpages for indexing purposes.

Parameters:

Parameter

Description

URL Tag Name *

Tag name is the input document containing the URL.

The input document might be the following assuming that the tagname parameter is set to inurl:

<?xml version="1.0"?>
<inurl>http://localhost:1234/xmlone.xml</inurl>

Edges:

The following table lists the available line edges for the HTTP Read Service (com.ibi.agents.XDHTTPReadAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_1xx
  • fail_2xx
  • fail_3xx
  • fail_4xx
  • fail_5xx
  • fail_6xx
  • fail_connect
  • fail_operation
  • fail_parse
  • fail_timeout
  • cancelled

Example:

The following is an example of configuration settings for an HTTP Read service object in iIT Designer:

A simple way to test your HTTP Read service is to first configure a channel that uses an HTTP listener. Your HTTP listener configuration settings would look similar to the following example, where an HTTP port and a document root are specified.

After you deploy and start the channel with the HTTP listener, you can test run your process flow, which contains an HTTP Read service object. You must ensure that the file name you supply within the <Test> tag of your incoming document is valid and is also contained within the document root folder specified for your HTTP listener configuration settings. A sample HTTP read incoming document can have the following format:

<Test>http://localhost:1234/index1.htm</Test>

If the service ran successfully, you will receive the contents of index1.hml as the output from the service. For example: