Difference between revisions of "Http-call"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "==Description== HTTP VCL plugin to call HTTP methods on remote servers. =={{VULCON}} / {{GVCONSOLE}} Configuration== The http-call Element is used by: Channel and [[routed...")
 
(endpoint)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
  
HTTP VCL plugin to call HTTP methods on remote servers.
+
The {{GVESB}} http-call [[plugins | plug-in]] allows the data exchange through the [http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP protocol].  
  
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 +
 +
Use the HTTP [[Plugins|VCL plugin]] if you want to call HTTP methods on remote servers.
  
 
The http-call Element is used by: [[Channel]] and [[routed-call]]. Its attributes are:
 
The http-call Element is used by: [[Channel]] and [[routed-call]]. Its attributes are:
* ''type'': call.
+
{|class="gvtable"
* ''class'': it.greenvulcano.gvesb.virtual.http.HTTPCallOperation.
+
! Attribute !! Type !! Description
* ''name'': Operation name. Used in the [[Flow]] section to associate workflow nodes to VCL operations.
+
|-
 
+
| type || fixed || This attribute must assume the value '''call'''.
its subelements are:
+
|-
* Description
+
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.http.HTTPCallOperation'''.
* endpoint
+
|-
* method
+
| name || required || Operation name. Used in the [[Flow]] section to associate workflow nodes to VCL operations.
 +
|}
  
 +
Might contain the following sub-elements:
 +
* [[Description]]
 +
* [[Http-call#endpoint|endpoint]]
 +
* [[Http-call#method|method]]
  
 
===endpoint===
 
===endpoint===
Line 21: Line 28:
  
 
The endpoint Element is used by: http-call. Its attributes are:
 
The endpoint Element is used by: http-call. Its attributes are:
* ''host'': Host to connect to.
+
{|class="gvtable"
* ''port'': Port where the service is exposed. Default port is '80'.
+
! Attribute !! Type !! Description
* ''secure'': Defines if the endpoint connection is secure or not. If secure is 'true', the default connection protocol will be 'http'; otherwise, the default connection protocol will be 'https'. The default value is 'false'.
+
|-
* ''custom-protocol'': Can be one of those defined locally for this 'http-call', or globally in {{GVESB}} on {{GVSupport}} configuration.
+
| host || required || Host to connect to.
 +
|-
 +
| port || optional || Port where the service is exposed. Default port is '80'.
 +
|-
 +
| secure || optional || Defines if the endpoint connection is secure or not. If secure is 'true', the default connection protocol will be 'http'; otherwise, the default connection protocol will be 'https'. The default value is 'false'.
 +
|-
 +
| custom-protocol || optional || Can be one of those defined locally for this 'http-call', or globally in {{GVESB}} on [[GVSupport]] configuration.
 +
|}
 +
 
 +
<div class="version_ge3.4/3.3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| conn-timeout || optional || Defines the connection timeout, in ms. Default to 10000ms.
 +
|-
 +
| so-timeout || optional || Defines the timeout to wait for a server response, in ms. Default to 30000ms.
 +
|}
 +
</div>
 +
<div class="version_ge3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| context-path || optional || Optional context path to prepend to remote URI call.
 +
|}
 +
</div>
 +
 
  
 
It has the subelements:
 
It has the subelements:
* Description
+
* [[Description]]
* CustomProtocol
+
* [[#CustomProtocol|CustomProtocol]]
 
* [[Proxy]]
 
* [[Proxy]]
 +
<div class="version_ge3.4">
 +
* [[BasicHttpAuth]]
 +
* [[NTLMHttpAuth]]
 +
</div>
  
 
====CustomProtocol====
 
====CustomProtocol====
  
This element represents the custom protocol handler configuration. Referes to HttpClient documentation for further info: [http://hc.apache.org/httpclient-3.x/sslguide.html|http://hc.apache.org/httpclient-3.x/sslguide.html]
+
This element represents the custom protocol handler configuration. Refer to HttpClient documentation for further info: [http://hc.apache.org/httpclient-3.x/sslguide.html| http://hc.apache.org/httpclient-3.x/sslguide.html]
  
The CustomProtocol Element is used by: endpoint.
 
 
Its attributes are:
 
Its attributes are:
* ''name'': Name identifier for this protocol.
+
{|class="gvtable"
* ''protocol-scheme'': The URI protocol scheme (http, https, etc.).
+
! Attribute !! Type !! Description
* ''protocol-socket-factory'': The custom socket factory class, implementation of class ''org.apache.commons.httpclient.protocol.ProtocolSocketFactory''. If this class do not have a default constructor, you can
+
|-
specify constructor arguments using ''constructor-args'' element.
+
| name || required || Name identifier for this protocol.
* ''protocol-default-port'': The default port number for this custom protocol.
+
|-
* ''protocol-virtual-scheme'': You can specify this parameter to use your own custom protocol designator as well as the default protocol implementation, specified by ''protocol-scheme'' attribute.
+
| protocol-scheme || required || The URI protocol scheme (http, https, etc.).
 +
|-
 +
| protocol-socket-factory || required || The custom socket factory class, implementation of class ''org.apache.commons.httpclient.protocol.ProtocolSocketFactory''. <br/> If this class do not have a default constructor, you can specify constructor arguments using ''[[#constructor-args|constructor-args]]'' element.
 +
|-
 +
| protocol-default-port || required || The default port number for this custom protocol.
 +
|-
 +
| protocol-virtual-scheme || optional || You can specify this parameter to use your own custom protocol designator as well as the default protocol implementation, specified by ''protocol-scheme'' attribute.
 +
|}
  
 
Its subelements are:
 
Its subelements are:
* Description
+
* [[Description]]
* constructor-args
+
* [[#constructor-args|constructor-args]]
  
 
=====constructor-args=====
 
=====constructor-args=====
  
You can specify constructor arguments here, if your protocol socket factory class does not have a default constructor.
+
Contains more ''[[#constructor-param|constructor-param]]'' items where you can specify the constructor arguments, if your protocol socket factory class does not have a default constructor.
The constructor-args Element is used by CustomProtocol and contains the subelements:
+
 
* Description
+
======constructor-param======
* '''constructor-param''': A constructor parameter that has the attributes:
+
 
** ''type'': Parameter type. Only simple java types are supported. The attribute's admitted values are:
+
The constructor-param Element is a constructor parameter. It has the attributes:
*** byte
+
{|class="gvtable"
*** boolean
+
! Attribute !! Type !! Description
*** char
+
|-
*** double
+
| type || required || Parameter type. Only simple java types are supported. The attribute's admitted values are:
*** float
+
* byte
*** int
+
* boolean
*** long
+
* char
*** short
+
* double
*** String
+
* float
** ''value'': Parameter value. Do not specify the value of this parameter if null should be passed. #Encrypted. The attribute's admitted values are:
+
* int
*** true
+
* long
*** false
+
* short
 +
* String
 +
|-
 +
| value || optional || Parameter value. Do not specify the value of this parameter if null should be passed. #Encrypted. <br/> The attribute's admitted values are:
 +
* true
 +
* false
 +
|}
  
 
===method===
 
===method===
  
Method to execute to the server. It is used by: http-call.
+
Method to invoke on the server.
  
 
Its attributes are:
 
Its attributes are:
* ''name'': Method name. The attribute's admitted values are:
+
{|class="gvtable"
** OPTIONS
+
! Attribute !! Type !! Description
** GET
+
|-
** HEAD
+
| name || required || Method name. The attribute's admitted values are:
** POST
+
* OPTIONS
** PUT
+
* GET
** DELETE
+
* HEAD
* ''request-uri'': Request URI. Can contain placeholders.
+
* POST
* ''ref-dp'': Name of Data Provider to use to prepare the request.
+
* PUT
 +
* DELETE
 +
|-
 +
| request-uri || required || Request URI. Can contain [[placeholders]].
 +
|-
 +
| ref-dp || optional || Name of [[Data provider]] to use to prepare the request.
 +
|}
 +
 
 +
<div class="version_ge3.3.3">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| uri-escaped || optional || If true the request-uri is already escaped, if false (WARNING!!!) the uri is escaped by the plug-in.
 +
Default to true.
 +
|}
 +
</div>

Latest revision as of 11:04, 31 December 2014

Description

The GreenVulcano® ESB http-call plug-in allows the data exchange through the HTTP protocol.

VulCon / GV Console Configuration

Use the HTTP VCL plugin if you want to call HTTP methods on remote servers.

The http-call Element is used by: Channel and routed-call. Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value call.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.http.HTTPCallOperation.
name required Operation name. Used in the Flow section to associate workflow nodes to VCL operations.

Might contain the following sub-elements:

endpoint

Endpoint configuration to connect to the server.

The endpoint Element is used by: http-call. Its attributes are:

Attribute Type Description
host required Host to connect to.
port optional Port where the service is exposed. Default port is '80'.
secure optional Defines if the endpoint connection is secure or not. If secure is 'true', the default connection protocol will be 'http'; otherwise, the default connection protocol will be 'https'. The default value is 'false'.
custom-protocol optional Can be one of those defined locally for this 'http-call', or globally in GreenVulcano® ESB on GVSupport configuration.
Attribute Type Description
conn-timeout optional Defines the connection timeout, in ms. Default to 10000ms.
so-timeout optional Defines the timeout to wait for a server response, in ms. Default to 30000ms.
Attribute Type Description
context-path optional Optional context path to prepend to remote URI call.


It has the subelements:

CustomProtocol

This element represents the custom protocol handler configuration. Refer to HttpClient documentation for further info: http://hc.apache.org/httpclient-3.x/sslguide.html

Its attributes are:

Attribute Type Description
name required Name identifier for this protocol.
protocol-scheme required The URI protocol scheme (http, https, etc.).
protocol-socket-factory required The custom socket factory class, implementation of class org.apache.commons.httpclient.protocol.ProtocolSocketFactory.
If this class do not have a default constructor, you can specify constructor arguments using constructor-args element.
protocol-default-port required The default port number for this custom protocol.
protocol-virtual-scheme optional You can specify this parameter to use your own custom protocol designator as well as the default protocol implementation, specified by protocol-scheme attribute.

Its subelements are:

constructor-args

Contains more constructor-param items where you can specify the constructor arguments, if your protocol socket factory class does not have a default constructor.

constructor-param

The constructor-param Element is a constructor parameter. It has the attributes:

Attribute Type Description
type required Parameter type. Only simple java types are supported. The attribute's admitted values are:
  • byte
  • boolean
  • char
  • double
  • float
  • int
  • long
  • short
  • String
value optional Parameter value. Do not specify the value of this parameter if null should be passed. #Encrypted.
The attribute's admitted values are:
  • true
  • false

method

Method to invoke on the server.

Its attributes are:

Attribute Type Description
name required Method name. The attribute's admitted values are:
  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • DELETE
request-uri required Request URI. Can contain placeholders.
ref-dp optional Name of Data provider to use to prepare the request.
Attribute Type Description
uri-escaped optional If true the request-uri is already escaped, if false (WARNING!!!) the uri is escaped by the plug-in.

Default to true.