SimpleHTTP

 

The Simple HTTP component enables the user to get content from an external HTTP Server (Web Server). The component directly accepts the certificates. If the Content element is present in the input message, then Post method is used else Get method is used.

Configuration and Testing

Interaction Configurations

Figure 1: Sample SimpleHTTP configuration

Attributes

Accept Server Certificate

When accessing https URLs, this property determines whether the server certificates should be accepted or not

Ignore Hostname Mismatch
Cleanup resources after each document
Connection Cache Threshold

This option specifies the threshold limit, that is the maximum number of connections that can be stored in the cache. '-1' is the default value, which means connections are not removed from the cache. Any other positive integer can be specified to limit the number of connections stored. In this case 'Connection Removal Criteria' option will be visible.

Connection Removal Criteria

Figure 2: Connection Removal Criteria

This option specifies the criteria to remove connections from the cache if the threshold limit exceeds.

Configuration shown in the Figure 2 can be tested within the CPS by clicking on Test button.

Figure 3: Sample SimpleHTTP input message

Figure 4: Sample SimpleHTTP output message

Input Schema

Figure 5: Input Port Schema Structure

 

Schema Element

Description

 

<URL>

URL from which content has to be fetched.
If we set "Cleanup resources after each document" property to "no", then the attribute "CacheConnection" appears in this element (as shown in Figure 5).
This attribute accepts two values "true" and "false".
If "true" is set to "CacheConnection" attribute, then the connections created are cached and the these cached connections will be used when required.
If we set "CacheConnection" attribute to "false", then the component clears the connection after each request.

 

<Content>

Content to be posted (optional)

 

Functional Demonstration

Scenario 1

This scenario demonstrates a sending simple HTTP request to a server.

Configure the SimpleHTTP as described in Configuration and Testing section and use Feeder and Display component to send sample input and check the response respectively.

Figure 6: Demonstrating Scenario 1 with sample input and output

Sample Input

<ns1:HTTPRequest xmlns:ns1="http://www.fiorano.com/fesb/activity/SimpleHTTP1">

   <URL>http://www.google.co.in/advanced_search?hl=en</URL>

</ns1:HTTPRequest>

Sample Output

Figure 7:  HTML display of Output in Display Component.

Scenario 2

The scenario demonstrates how a SimpleHTTP component can be used to post some data onto a Web Server hosted by a HTTPReceive component. The HTTPReceive component is hosting on port 9999 on the localhost machine and is configured to receive post data as simple text and send it back to the client as simple text.

Figure 8: Demonstrates using SimpleHTTP component to post data

Configure the SimpleHTTP as described in Configuration and Testing section and use Feeder and Display component to send sample input given below.

Sample Input

<ns1:HTTPRequest xmlns:ns1="http://www.fiorano.com/fesb/activity/SimpleHTTP1">

   <URL>http://localhost:9999/index.html</URL>

   <Content>Sample Content</Content>

</ns1:HTTPRequest>

Sample Output

Sample Content

Useful Tips


Copyright © 2008-2011, Fiorano Software Pte. Ltd. and affiliates.

All rights reserved.

This software is the confidential and proprietary information of Fiorano Software ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement enclosed with this product or entered into with Fiorano.