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.

Figure 3.6.483: Sample SimpleHTTP configuration
When accessing https URLs, this property determines whether the server certificates should be accepted or not
yes - Use this option if the server certificate should be accepted without any validation.
no - Use this option if server certificate should not be accepted. An exception is sent to ON_EXCEPTION port.
yes - Use this option to accept the certificate even if hostname in the certificate does not match with the hostname in the request URL.
no - If hostname in the certificate does not match with the hostname in the request URL, exception is thrown.
Configuration shown in the Figure 3.6.483 can be tested within the CPS by clicking on Test button.

Figure 3.6.484: Sample SimpleHTTP input message

Figure 3.6.485: Sample SimpleHTTP output message

Figure: 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 Input Port Schema Structure). This attribute accepts two values "true" and "false". If "true" is set to "CacheConnection" attribute, then the connections created are cached and 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) |
|
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 3.6.486: 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 3.6.487: HTML display of Output in Display Component.
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 3.6.486: 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
For providing header properties like Content-Type or Content-Length, set the required properties in the input message with a prefix http_. For example, http_Content-Type.
For providing parameters, set the required properties in the input message as properties with a prefix param_. For example, param_myproperty.
To Post data we need to provide the header property Content-Type by setting property http_Content-Type to appropriate value on the input message. For example if we need to post simple text content then set the property http_Content-Type to text/plain.
Copyright © 1999-2008, Fiorano Software Technologies Pvt. Ltd. All rights reserved.
Copyright © 2008-2009, Fiorano Software Pty. Ltd. 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.