Difference between revisions of "ExtendedInboundParamHandlerFormatter"

From GreenVulcano Wiki
Jump to: navigation, search
(RequestFlatParamMapping)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
 
This sub-element formatter is used into the decoding of client request's parameters in order to create the input for a {{GVESB}} service and to convert the service's output into a HTTP response.  
 
This sub-element formatter is used into the decoding of client request's parameters in order to create the input for a {{GVESB}} service and to convert the service's output into a HTTP response.  
 
 
DA COMPLETARE
 
  
  
Line 13: Line 10:
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| type || fixed || This attribute must keep the value '''FormatterPlugin'''.
+
| type || fixed || Set to '''FormatterPlugin'''.
 
|-
 
|-
| class|| fixed || Module Id always set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.ExtendedInboundParamHandlerFormatter'''.
+
| class|| fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.ExtendedInboundParamHandlerFormatter'''.
 
|-
 
|-
| ID || required || If 'true' reads the request HTTP headers and provide them with the request parameters. Default value is '''false'''.
+
| ID || required || Formatter identifier
 
|-
 
|-
| read-request-header || optional || CharacterEncoding to be used to handle requests from external system. Default to UTF-8.
+
| read-request-header || optional || If 'true' reads the request HTTP headers and provide them with the request parameters. Default value is '''false'''.
 
|-
 
|-
| ReqCharacterEncoding || optional || CharacterEncoding to handle responses to the external system. Default to UTF-8.
+
| ReqCharacterEncoding || optional || CharacterEncoding to be used to handle requests from external system. Default to UTF-8.
 
|-
 
|-
| RespCharacterEncoding || optional || ContentType to be declared while handling HTTP responses to the external system. Default to text/html.
+
| RespCharacterEncoding || optional || CharacterEncoding to handle responses to the external system. Default to UTF-8.
 
|-
 
|-
| RespContentType || optional || If true force the POST body to be handled as application/x-www-form-urlencoded content type. Default is false.
+
| RespContentType || optional || ContentType to be declared while handling HTTP responses to the external system. Default to text/html.
 
|-
 
|-
| HandlePostBodyAsParams || optional || If != -1 force the adapter to respond with the given http code on case of error. Default is -1 (disabled).
+
| HandlePostBodyAsParams || optional || If true force the POST body to be handled as application/x-www-form-urlencoded content type. Default is false.
 
|-
 
|-
| ResponseOnError-HTTPCode || optional || CharacterEncoding to be used to handle requests from external system. Default to UTF-8.
+
| ResponseOnError-HTTPCode || optional || If != -1 force the adapter to respond with the given http code on case of error. Default is -1 (disabled).
Template to follow:
 
<syntaxhighlight lang="XML">
 
        <xsl:template match="GVBufferFieldDefaultValue">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                    <td>Field name:  <i><xsl:value-of select="@FieldName"/></i></td>
 
                </tr>
 
                <tr>
 
                    <td>Field value:  <i><xsl:value-of select="@FieldValue"/></i></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
Contains the sub-elements [[#GVBufferFieldDefaultValue|GVBufferFieldDefaultValue]].
+
Contains the sub-elements:
 +
* [[#RequestParams|RequestParams]]
 +
* [[#RequestContent|RequestContent]]
 +
* [[#GVBufferDefaultValues|GVBufferDefaultValues]]
 +
* [[#OpTypeDefaultValue|OpTypeDefaultValue]]
 +
* [[#ResponseParams|ResponseParams]]
 +
* [[Description]]
 +
 
  
Contains the sub-elements [[#GVBufferPropertyDefaultValue|GVBufferPropertyDefaultValue]].
+
==RequestParams==
 +
This element contains configuration informations about conversion of the parameters of an inbound http request into a valid [[GVBuffer]] object and determination of the communication paradigm to be used by GreenVulcano.
  
Contains the sub-elements  
+
Contains the sub-elements:
[[#GVBufferField|GVBufferField]].
+
* [[#RequestParam|RequestParam]]
  
==GVBufferFieldDefaultValue==
+
The following table shows the '''RequestParams''' attributes:
The following table shows the '''GVBufferFieldDefaultValue''' attributes:
 
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| FieldName || required || The configured default value of an GVBuffer field. Cannot be left blank.
+
| ParamNameValueSeparator|| optional || Parameters name-value separator string within input querystring.
 
|-
 
|-
| FieldValue || required || A configured default value for a property field of an GVBuffer object.
+
| ParamEntrySeparator|| optional || Parameters entry separator string within input querystring.
 
|}
 
|}
  
==GVBufferPropertyDefaultValue==
+
 
The name of an GVBuffer extended field.
+
===RequestParam===
The following table shows the '''GVBufferPropertyDefaultValue''' attributes:
+
This element specifies the rules to follow to convert a single parameter of an inbound http request into a partially populated [[GVBuffer]] object.
 +
 
 +
Contains the sub-elements:
 +
* [[#RequestXMLParamHandler|RequestXMLParamHandler]]
 +
* [[#RequestFlatParamHandler|RequestFlatParamHandler]]
 +
* [[#RequestStringParamHandler|RequestStringParamHandler]]
 +
 
 +
The following table shows the '''RequestParam''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| FieldName || required || This element represents a mapping target from/to a property field of an GVBuffer object.
+
| Name|| required|| The name of an inbound request parameter.
 +
|-
 +
| Required|| optional|| If true the request parameter is mandatory. Default is '''True'''.
 
|-
 
|-
| FieldValue || required || This element represents a mapping target from/to a field of an GVBuffer object.
+
| Type|| optional || '''Not used'''
Template to follow:
 
<syntaxhighlight lang="XML">
 
        <xsl:template match="GVBufferPropertyDefaultValue">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                    <td>Extended field name:  <i><xsl:value-of select="@FieldName"/></i></td>
 
                </tr>
 
                <tr>
 
                    <td>Extended field value:  <i><xsl:value-of select="@FieldValue"/></i></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
==GVBufferField==
+
 
The name of a field of an GVBuffer object.
+
==RequestContent==
The following table shows the '''GVBufferField''' attributes:
+
This element contains configuration informations about conversion of the content of an inbound http request into a valid [[GVBuffer]] object and determination of the communication paradigm to be used by GreenVulcano.
 +
 
 +
Contains the sub-elements:
 +
* [[#RequestXMLParamHandler|RequestXMLParamHandler]]
 +
* [[#RequestFlatParamHandler|RequestFlatParamHandler]]
 +
* [[#RequestStringParamHandler|RequestStringParamHandler]]
 +
 
 +
 
 +
==ResponseParams==
 +
This element contains configuration informations about conversion of a response [[GVBuffer]] object (received from GreenVulcano) into an inbound http response to be sent to the invoking external http system.
 +
 
 +
Contains the sub-elements:
 +
* [[#ResponseParam|ResponseParam]]
 +
 
 +
The following table shows the '''ResponseParams''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| FieldName || required || The configured default value of an GVBuffer extended field. Cannot be left blank.
+
| ParamNameValueSeparator|| optional|| Parameters name-value separator string within ouput querystring. Default is '='
Template to follow:
+
|-
<syntaxhighlight lang="XML">
+
| ParamEntrySeparator|| optional || Parameters entry separator string within ouput querystring. Default is '&'
        <xsl:template match="GVBufferProperty">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                    <td>Extended field name: <b><xsl:value-of select="@FieldName"/></b></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
==GVBufferProperty==
+
 
The name of a field of an GVBuffer object.
+
===ResponseParam===
The following table shows the '''GVBufferProperty''' attributes:
+
This element specifies the rules to follow to generate a single parameter of an inbound http response.
 +
It's possible to use values read from the fields of the response [[GVBuffer]] object received from GreenVulcano, or configure a default value for each handler mapping.
 +
 
 +
Contains the sub-elements:
 +
* [[#ResponseXMLParamHandler|ResponseXMLParamHandler]]
 +
* [[#ResponseFlatParamHandler|ResponseFlatParamHandler]]
 +
* [[#ResponseStringParamHandler|ResponseStringParamHandler]]
 +
* [[#XMLParamErrorHandler|XMLParamErrorHandler]]
 +
* [[#FlatParamErrorHandler|FlatParamErrorHandler]]
 +
* [[#StringParamErrorHandler|StringParamErrorHandler]]
 +
 
 +
The following table shows the '''ResponseParam''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| FieldName || required || This element represents a plain text value to be assigned as source/target of an handler mapping.
+
| Name|| required|| The name of an inbound request parameter.
Template to follow:
+
|-
<syntaxhighlight lang="XML">
+
| SendParameterName || required || True if the parameter's name must appear within inbound response, false otherwise.
        <xsl:template match="DefaultValue">
+
|-
            <table cellpadding="0" cellspacing="0">
+
| PutInHeader|| required|| If true must appear in the HTTP header.
                <tr>
+
|-
                    <td>Value length: <b><xsl:value-of select="string-length(text())"/></b> characters</td>
+
| Type|| optional || '''Not used'''
                </tr>
+
|}
            </table>
+
 
        </xsl:template>
+
 
</syntaxhighlight>
+
==Request Parameter Handlers==
 +
===RequestXMLParamHandler===
 +
This element contains configuration informations about an inbound request XML parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains an XML string) and use them to populate one or more fields of a [[GVBuffer]] request object to be sent to GreenVulcano.
 +
 
 +
Contains the sub-elements:
 +
* [[#RequestXMLParamMapping|RequestXMLParamMapping]]
  
This element represents a mapping target from/to a list of extended field of an GVBuffer object.
+
The following table shows the '''RequestXMLParamHandler''' attributes:
Template to follow
+
{|class="gvtable"
<syntaxhighlight lang="XML">
+
! Attribute !! Type !! Description
        <xsl:template match="GVBufferPropertyList">
+
|-
            <table cellpadding="0" cellspacing="0">
+
| ItemType || fixed|| Set to '''Handler'''.
                <tr>
+
|-
                    <td>Excluded Extended fields names: <b><xsl:value-of select="@ExcludeFields"/></b></td>
+
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler'''.
                </tr>
+
|-
            </table>
+
| OutputType || required|| The output type of this inbound request parameter handler ([[GVBuffer]] object or communication paradigm string).
        </xsl:template>
+
Possible values are:
</syntaxhighlight>
+
* GVBuffer
 +
* OpType
 
|}
 
|}
  
==GVBufferPropertyList==
+
 
The following table shows the '''GVBufferPropertyList''' attributes:
+
====RequestXMLParamMapping====
 +
This element contains a mapping between a value extracted by an element or attribute (within XML content of an inbound request parameter) matching a given XPath, and a field of a request [[GVBuffer]] object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply)
 +
 
 +
Contains the sub-elements:
 +
* [[#GVBufferField|GVBufferField]]
 +
* [[#GVBufferProperty|GVBufferProperty]]
 +
* [[#OpType|OpType]]
 +
 
 +
The following table shows the '''RequestXMLParamMapping''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| URLEncoding|| required|| Parameters name-value separator string within list. Possible values are : '''True''', '''False'''. Default is ';'
+
| ItemType || fixed|| Set to '''Mapping'''.
 +
|-
 +
| XPath || required || XPath of an element or attribute (within XML content of an inbound request parameter).
 +
|}
 +
 
 +
 
 +
===RequestFlatParamHandler===
 +
This element contains configuration informations about an inbound request Flat parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a Flat string) and use them to populate one or more fields of a [[GVBuffer]] request object to be sent to GreenVulcano.
 +
 
 +
Contains the sub-elements:
 +
* [[#RequestFlatParamMapping|RequestFlatParamMapping]]
 +
 
 +
The following table shows the '''RequestFlatParamHandler''' attributes:
 +
{|class="gvtable"e.
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed|| Set to '''Handler'''.
 
|-
 
|-
| FieldNameValueSeparator || optional || Parameters entry separator string within list. Default is '='
+
| Class || fixed|| Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler'''
 
|-
 
|-
| FieldEntrySeparator || optional || The comma separated list of extended fields names to ignore.
+
| OutputType || required|| The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
 +
Possible values are:
 +
* GVBuffer
 +
* OpType
 
|-
 
|-
| ExcludeFields || required || This element represents a plain text value to be assigned as source/target of an handler mapping.
+
| SeparatorChar || optional || The separator character between fields within the flat string value of this inbound request parameter.
This is the template used:
 
<syntaxhighlight lang="XML">
 
        <xsl:template match="DefaultValue">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                    <td>Value length: <b><xsl:value-of select="string-length(text())"/></b> characters</td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
==RequestParams==
+
 
 +
====RequestFlatParamMapping====
 +
This element contains a mapping between a value extracted from a flat string (the content of an inbound request parameter), and a field of a request [[GVBuffer]] object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
* [[#RequestParam|RequestParam]]
+
* [[#GVBufferField|GVBufferField]]
 +
* [[#GVBufferProperty|GVBufferProperty]]
 +
* [[#OpType|OpType]]
  
The following table shows the '''RequestParams''' attributes:
+
The following table shows the '''RequestFlatParamMapping''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ParamNameValueSeparator|| required|| Parameters name-value separator string within list. Possible values are : '''True''', '''False'''. Default is ';'
+
| ItemType || fixed || Set to '''Mapping'''.
 +
|-
 +
| Offset || required || The offset of a field within the flat string value of this inbound request parameter.
 +
|-
 +
| Length || optional || The length of a field within the flat string value of this inbound request parameter. Not needed if a field separator char has already been specified.
 
|-
 
|-
| ParamEntrySeparator|| optional || Parameters entry separator string within list. Default is '='
+
| Trim || optional || The place where unneeded filling white spaces can be present.
This is the template used:
+
Possible values are:
<syntaxhighlight lang="XML">
+
* left, to trim leading white spaces
        <xsl:template match="RequestContent">
+
* right, to trim trailing white spaces
            <table cellpadding="0" cellspacing="0">
+
* both, to trim both leading and trailing spaces
                <tr>
+
If it is specified a value different from these above, no trimming will be performed
                        <td>Configured handlers:</td>
 
                        <td width="20"></td>
 
                        <td><b><xsl:value-of select="count(./*[@ItemType='Handler'])"/></b></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
==RequestParam==
+
 
The following table shows the '''RequestParam''' attributes:
+
===RequestStringParamHandler===
 +
This element contains configuration informations about an inbound request Flat parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a plain text string) and use them to populate one or more fields of a [[GVBuffer]] request object to be sent to GreenVulcano.
 +
 
 +
Contains the sub-elements:
 +
* [[#RequestStringParamMapping|RequestStringParamMapping]]
 +
 
 +
The following table shows the '''RequestStringParamHandler''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| Name|| required|| If true the request parameter is mandatory. Possible values are : '''True''', '''False'''. Default is '''True'''.
+
| ItemType || fixed || Set to '''Handler'''.
 +
|-
 +
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler'''
 
|-
 
|-
| Type|| optional || This element contains configuration informations about an inbound request XML parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains an XML string) and use them to populate one or more fields of an GVBuffer request object to be sent to GreenVulcano.
+
| OutputType || required || The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
 +
Possible values are:
 +
* GVBuffer
 +
* OpType
 +
|}
 +
 
 +
 
 +
====RequestStringParamMapping====
 +
This element contains a mapping between a value extracted from a plain text string (the value of an inbound request parameter), and a field of a request [[GVBuffer]] object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).
 +
 
 +
Contains the sub-elements:
 +
* [[#GVBufferField|GVBufferField]]
 +
* [[#GVBufferProperty|GVBufferProperty]]
 +
* [[#OpType|OpType]]
  
This is the template used:
+
The following table shows the '''RequestStringParamMapping''' attributes:
<syntaxhighlight lang="XML">
+
{|class="gvtable"
      <xsl:template match="RequestXMLParamHandler">
+
! Attribute !! Type !! Description
            <table cellpadding="0" cellspacing="0">
+
|-
                <xsl:choose>
+
| ItemType || fixed || Set to '''Mapping'''.
                <xsl:when test="../@Name">
 
                    <tr>
 
                        <td>Inbound request parameter handled:</td>
 
                        <td width="20"></td>
 
                        <td><b><xsl:value-of select="../@Name"/></b></td>
 
                    </tr>
 
                </xsl:when>
 
                <xsl:otherwise>
 
                    <tr>
 
                        <td>Inbound request content handler.</td>
 
                    </tr>
 
                </xsl:otherwise>
 
            </xsl:choose>
 
              <tr>
 
                    <td>Output type: <b><xsl:value-of select="@OutputType"/></b></td>
 
                </tr>
 
                <tr>
 
                    <td>Maps parameter contents to:</td>
 
                    <td width="20"></td>
 
                </tr>
 
                <tr>
 
                    <td>
 
                        <ul>
 
                            <xsl:for-each select="RequestXMLParamMapping">
 
                                <xsl:if test="GVBufferField">
 
                                    <li>field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer</li>
 
                                </xsl:if>
 
                                <xsl:if test="GVBufferProperty">
 
                                    <li>extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer</li>
 
                                </xsl:if>
 
                                <xsl:if test="OpType">
 
                                    <li><i>OperationType</i> variable (GreenVulcano communication paradigm)</li>
 
                                </xsl:if>
 
                          </xsl:for-each>
 
                        </ul>
 
                  </td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
==RequestXMLParamHandler==
+
 
 +
==Default Value Handlers==
 +
===GVBufferDefaultValues===
 +
This element contains the configuration of default values for some of all the fields of a inbound request [[GVBuffer]] object.
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
* [[#RequestXMLParamMapping|RequestXMLParamMapping]]
+
* [[#GVBufferFieldDefaultValue|GVBufferFieldDefaultValue]]
 +
* [[#GVBufferPropertyDefaultValue|GVBufferPropertyDefaultValue]]
 +
 
  
The following table shows the '''RequestXMLParamHandler''' attributes:
+
====GVBufferFieldDefaultValue====
 +
A configured default value for a field of a [[GVBuffer]] object.
 +
The following table shows the '''GVBufferFieldDefaultValue''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| Inbound request parameter/content format.
+
| FieldName || required || The [[GVBuffer]] field name.
 +
The possible values are:
 +
* GVBuffer.system
 +
* GVBuffer.service
 +
* GVBuffer.id
 +
* GVBuffer.retCode
 +
* GVBuffer.object
 +
|-
 +
| FieldValue || required || The configured default value of a [[GVBuffer]] field.
 +
|}
 +
 
 +
 
 +
====GVBufferPropertyDefaultValue====
 +
A configured default value for a property of a [[GVBuffer]] object.
 +
The following table shows the '''GVBufferPropertyDefaultValue''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 
|-
 
|-
| Class || optional || The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
+
| FieldName || required || The [[GVBuffer]] property name.
 
|-
 
|-
| OutputType || fixed|| This element contains a mapping between a value extracted by an element or attribute (within XML content of an inbound request parameter) matching a given XPath, and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply). Possible values are '''GVBuffer''', '''OpType'''.
+
| FieldValue || required || A configured default value for a property field of a [[GVBuffer]] object.
 +
|}
 +
 
  
This is the template used:
+
===OpTypeDefaultValue===
<syntaxhighlight lang="XML">
+
A configured default value for the communication paradigm to be used.
  
        <xsl:template match="RequestXMLParamMapping">
+
The following table shows the '''OpTypeDefaultValue''' attributes:
            <table cellpadding="0" cellspacing="0">
+
{|class="gvtable"
            <xsl:choose>
+
! Attribute !! Type !! Description
                <xsl:when test="../../@Name">
+
|-
                    <tr>
+
| Value || required || The configured default value for the communication paradigm.
                        <td>Inbound request parameter handled:</td>
+
Possible values are:
                        <td width="20"></td>
+
* RequestReply
                        <td><b><xsl:value-of select="../../@Name"/></b></td>
+
* Request
                    </tr>
+
* SendReply
                </xsl:when>
+
* GetRequest
                <xsl:otherwise>
+
* GetReply
                    <tr>
 
                        <td>Inbound request content handler mapping.</td>
 
                    </tr>
 
                </xsl:otherwise>
 
            </xsl:choose>
 
                <tr>
 
                    <td>Mapping source: <b><xsl:value-of select="@XPath"/></b></td>
 
                </tr>
 
                <tr>
 
                    <td>Mapping target:
 
                        <xsl:if test="GVBufferField">
 
                          field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="GVBufferProperty">
 
                            extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="OpType">
 
                            <i>OperationType</i> variable (GreenVulcano communication paradigm)
 
                        </xsl:if>
 
                    </td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
  
==RequestXMLParamMapping==
+
==Response Parameter Handlers==
Element type (used for XPath navigation).
+
===ResponseXMLParamHandler===
 +
This element contains configuration informations about an inbound response XML parameter <b>Handler</b>: a Java object used to extract informations from one or more fields of an GVBuffer response object (received from GreenVulcano) and use them to generate an Http response parameter value (containing an XML string) to be sent back to external Http system.
 +
 
 +
Contains the sub-elements:
 +
* [[#ResponseXMLParamMapping|ResponseXMLParamMapping]]
 +
 
 +
The following table shows the '''ResponseXMLParamHandler''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed|| Set to '''Handler'''.
 +
|-
 +
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler'''.
 +
|-
 +
| OutputType || fixed || Set to '''HttpParam'''
 +
|}
 +
 
 +
 
 +
====ResponseXMLParamMapping====
 +
This element contains a mapping between the value of a field of a response [[GVBuffer]] object (received from GreenVulcano) and the value (to be set) of an element or attribute (within the XML content of an inbound response parameter) matching a given XPath.
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferProperty|GVBufferProperty]]
 
* [[#GVBufferProperty|GVBufferProperty]]
 
* [[#GVBufferPropertyList|GVBufferPropertyList]]
 
* [[#GVBufferPropertyList|GVBufferPropertyList]]
* [[#OpType|OpType]]
+
* [[#DefaultValue|DefaultValue]]
  
The following table shows the '''RequestXMLParamMapping''' attributes:
+
The following table shows the '''ResponseXMLParamMapping''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| XPath of an element or attribute (within XML content of an inbound request parameter).
+
| ItemType || fixed|| Set to '''Mapping'''.
 
|-
 
|-
| XPath || required || This element contains configuration informations about an inbound request Flat parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a Flat string) and use them to populate one or more fields of an GVBuffer request object to be sent to GreenVulcano.
+
| XPath || required || XPath of an element or attribute (within XML content of an inbound response parameter).
This is the template used:
 
<syntaxhighlight lang="XML">
 
      <xsl:template match="RequestFlatParamHandler">
 
            <table cellpadding="0" cellspacing="0">
 
                <xsl:choose>
 
                <xsl:when test="../@Name">
 
                    <tr>
 
                        <td>Inbound request parameter handled:</td>
 
                        <td width="20"></td>
 
                        <td><b><xsl:value-of select="../@Name"/></b></td>
 
                    </tr>
 
                </xsl:when>
 
                <xsl:otherwise>
 
                    <tr>
 
                        <td>Inbound request content handler.</td>
 
                    </tr>
 
                </xsl:otherwise>
 
            </xsl:choose>
 
              <tr>
 
                    <td>Output type: <b><xsl:value-of select="@OutputType"/></b></td>
 
                </tr>
 
                <tr>
 
                    <td>Maps parameter contents to:</td>
 
                    <td width="20"></td>
 
                </tr>
 
                <tr>
 
                    <td>
 
                        <ul>
 
                            <xsl:for-each select="RequestFlatParamMapping">
 
                                <xsl:if test="GVBufferField">
 
                                    <li>field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer</li>
 
                                </xsl:if>
 
                                <xsl:if test="GVBufferProperty">
 
                                    <li>extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer</li>
 
                                </xsl:if>
 
                                <xsl:if test="OpType">
 
                                    <li><i>OperationType</i> variable (GreenVulcano communication paradigm)</li>
 
                                </xsl:if>
 
                          </xsl:for-each>
 
                        </ul>
 
                  </td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
  
==RequestFlatParamHandler==
+
===ResponseFlatParamHandler===
Element type (used for XPath navigation).
+
This element contains configuration informations about an inbound response Flat parameter <b>Handler</b>: a Java object used to extract informations from one or more fields of an [[GVBuffer]] response object (received from GreenVulcano) and use them to generate an Http response parameter value (containing a Flat string) to be sent back to external Http system.
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
* [[#RequestFlatParamMapping|RequestFlatParamMapping]]
+
* [[#ResponseFlatParamMapping|ResponseFlatParamMapping]]
  
The following table shows the '''RequestFlatParamHandler''' attributes:
+
The following table shows the '''ResponseFlatParamHandler''' attributes:
{|class="gvtable"
+
{|class="gvtable"e.
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| Inbound request parameter/content format.
+
| ItemType || fixed|| Set to '''Handler'''.
 
|-
 
|-
| Class || fixed|| The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
+
| Class || fixed|| Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler'''
 
|-
 
|-
| OutputType || required|| The separator character between fields within the flat string value of this inbound request parameter.
+
| OutputType || fixed|| Set to '''HttpParam'''
Possible values are '''GVBuffer''', OpType'''.
 
 
|-
 
|-
| SeparatorChar || optional || This element contains a mapping between a value extracted from a flat string (the content of an inbound request parameter), and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).
+
| SeparatorChar || optional || The separator character between fields within the flat string value of this inbound response parameter.
This is the template used:
 
<syntaxhighlight lang="XML">
 
    <xsl:template match="RequestFlatParamMapping">
 
            <table cellpadding="0" cellspacing="0">
 
            <xsl:choose>
 
                <xsl:when test="../../@Name">
 
                    <tr>
 
                        <td>Inbound request parameter handled:</td>
 
                        <td width="20"></td>
 
                        <td><b><xsl:value-of select="../../@Name"/></b></td>
 
                    </tr>
 
                </xsl:when>
 
                <xsl:otherwise>
 
                    <tr>
 
                        <td>Inbound request content handler mapping.</td>
 
                    </tr>
 
                </xsl:otherwise>
 
            </xsl:choose>
 
                <tr>
 
                    <td>Mapping source offset: <b><xsl:value-of select="@Offset"/></b></td>
 
                </tr>
 
                <xsl:if test="@Length">
 
                <tr>
 
                    <td>Mapping source Length: <b><xsl:value-of select="@Length"/></b></td>
 
                </tr>
 
                </xsl:if>
 
                <tr>
 
                    <td>Mapping target:
 
                        <xsl:if test="GVBufferField">
 
                          field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="GVBufferProperty">
 
                            extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="OpType">
 
                            <i>OperationType</i> variable (GreenVulcano communication paradigm)
 
                        </xsl:if>
 
                    </td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
  
==RequestFlatParamMapping==
+
====ResponseFlatParamMapping====
Element type (used for XPath navigation).
+
This element contains a mapping between a value extracted from a field of a response [[GVBuffer]] object (received from GreenVulcano) and the value (to be set) of a field within a flat string (the content of an inbound response parameter).
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferProperty|GVBufferProperty]]
 
* [[#GVBufferProperty|GVBufferProperty]]
* [[#OpType|OpType]]
+
* [[#DefaultValue|DefaultValue]]
  
The following table shows the '''RequestFlatParamMapping''' attributes:
+
The following table shows the '''ResponseFlatParamMapping''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed || The offset of a field within the flat string value of this inbound request parameter.
+
| ItemType || fixed || Set to '''Mapping'''.
 +
|-
 +
| Offset || required || The offset of a field within the flat string value of this inbound response parameter.
 
|-
 
|-
| Offset || required || The length of a field within the flat string value of this inbound request parameter. Not needed if a field separator char has already been specified.
+
| Length || optional || The length of a field within the flat string value of this inbound response parameter. Not needed if a field separator char has already been specified.
 
|-
 
|-
| Length || optional || The place where unneeded filling WhiteSpaces can be present. These spaces will be trimmed by the Adapter.
+
| Trim || optional || The place where unneeded filling white spaces can be present.
 
Possible values are:
 
Possible values are:
'''left''', to trim leading white spaces
+
* left, to trim leading white spaces
'''right''', to trim trailing white spaces
+
* right, to trim trailing white spaces
'''both''', to trim both leading and trailing spaces
+
* both, to trim both leading and trailing spaces
 
If it is specified a value different from these above, no trimming will be performed
 
If it is specified a value different from these above, no trimming will be performed
 +
|}
 +
 +
 +
===ResponseStringParamHandler===
 +
This element contains configuration informations about an inbound request Flat parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a plain text string) and use them to populate one or more fields of a [[GVBuffer]] request object to be sent to GreenVulcano.
 +
 +
Contains the sub-elements:
 +
* [[#ResponseStringParamMapping|ResponseStringParamMapping]]
 +
 +
The following table shows the '''ResponseStringParamHandler''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed || Set to '''Handler'''.
 +
|-
 +
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler'''
 +
|-
 +
| OutputType || fixed || Set to '''HttpParam'''
 +
|}
 +
 +
 +
====ResponseStringParamMapping====
 +
This element contains a mapping between a value extracted from a field of a response [[GVBuffer]] object (received from GreenVulcano) and the value (to be set) of a field within a plain text string (the content of an inbound response parameter).
 +
 +
Contains the sub-elements:
 +
* [[#GVBufferField|GVBufferField]]
 +
* [[#GVBufferProperty|GVBufferProperty]]
 +
* [[#GVBufferPropertyList|GVBufferPropertyList]]
 +
* [[#DefaultValue|DefaultValue]]
 +
 +
The following table shows the '''ResponseStringParamMapping''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed || Set to '''Mapping'''.
 +
|}
 +
 +
 +
==Response Parameter Error Handlers==
 +
===XMLParamErrorHandler===
 +
This element contains configuration informations about an inbound response XML parameter <b>Error Handler</b>: a Java object used to generate an Http response parameter ERROR value (containing an XML string) to be sent back to external Http system.
 +
 +
Contains the sub-elements:
 +
* [[#XMLParamErrorMapping|XMLParamErrorMapping]]
 +
 +
The following table shows the '''XMLParamErrorHandler''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed|| Set to '''ErrorHandler'''.
 +
|-
 +
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler'''.
 +
|-
 +
| OutputType || fixed || Set to '''HttpParam'''
 +
|}
 +
 +
 +
====XMLParamErrorMapping====
 +
This element contains a mapping between the value of a field of an [[GVTransactionInfo]] object (or a fixed default error value) and the value (to be set in case of error) of an element or attribute (within the XML content of an inbound response parameter) matching a given XPath.
 +
 +
Contains the sub-elements:
 +
* [[#GVTransactionErrorInfo|GVTransactionErrorInfo]]
 +
* [[#DefaultErrorMessage|DefaultErrorMessage]]
 +
 +
The following table shows the '''XMLParamErrorMapping''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed|| Set to '''Mapping'''.
 
|-
 
|-
| Trim || optional || This element contains configuration informations about an inbound request Flat parameter <b>Handler</b>: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a plain text string) and use them to populate one or more fields of an GVBuffer request object to be sent to GreenVulcano.
+
| XPath || required || XPath of an element or attribute (within XML content of an inbound response parameter).
Possible values are:
+
|}
'''left''', '''right''','''both'''.
+
 
This is the template used:
+
 
<syntaxhighlight lang="XML">
+
===FlatParamErrorHandler===
  <xsl:template match="RequestStringParamHandler">
+
This element contains configuration informations about an inbound response Flat parameter <b>Error Handler</b>: a Java object used to generate an Http response parameter ERROR value (containing a Flat string) to be sent back to external Http system.
            <table cellpadding="0" cellspacing="0">
+
 
                <xsl:choose>
+
Contains the sub-elements:
                <xsl:when test="../@Name">
+
* [[#FlatParamErrorMapping|FlatParamErrorMapping]]
                    <tr>
+
 
                        <td>Inbound request parameter handled:</td>
+
The following table shows the '''FlatParamErrorHandler''' attributes:
                        <td width="20"></td>
+
{|class="gvtable"e.
                        <td><b><xsl:value-of select="../@Name"/></b></td>
+
! Attribute !! Type !! Description
                    </tr>
+
|-
                </xsl:when>
+
| ItemType || fixed|| Set to '''ErrorHandler'''.
                <xsl:otherwise>
+
|-
                    <tr>
+
| Class || fixed|| Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler'''
                        <td>Inbound request content handler.</td>
+
|-
                    </tr>
+
| OutputType || fixed|| Set to '''HttpParam'''
                </xsl:otherwise>
+
|-
            </xsl:choose>
+
| SeparatorChar || optional || The separator character between fields within the flat string value of this inbound response parameter.
              <tr>
+
|}
                    <td>Output type: <b><xsl:value-of select="@OutputType"/></b></td>
+
 
                </tr>
+
 
                <tr>
+
====FlatParamErrorMapping====
                    <td>Maps parameter contents to:</td>
+
This element contains a mapping between a value extracted from a field of an [[GVTransactionInfo]] object (or a fixed default error value) and the value (to be set) of a field within a flat string (the error content of an inbound response parameter).
                    <td width="20"></td>
+
 
                </tr>
+
Contains the sub-elements:
                <tr>
+
* [[#GVTransactionErrorInfo|GVTransactionErrorInfo]]
                    <td>
+
* [[#DefaultErrorMessage|DefaultErrorMessage]]
                        <ul>
+
 
                            <xsl:for-each select="RequestStringParamMapping">
+
The following table shows the '''FlatParamErrorMapping''' attributes:
                                <xsl:if test="GVBufferField">
+
{|class="gvtable"
                                    <li>field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer</li>
+
! Attribute !! Type !! Description
                                </xsl:if>
+
|-
                                <xsl:if test="GVBufferProperty">
+
| ItemType || fixed || Set to '''Mapping'''.
                                    <li>extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer</li>
+
|-
                                </xsl:if>
+
| Offset || required || The offset of a field within the flat string value of this inbound response parameter.
                                <xsl:if test="OpType">
+
|-
                                    <li><i>OperationType</i> variable (GreenVulcano communication paradigm)</li>
+
| Length || optional || The length of a field within the flat string value of this inbound response parameter. Not needed if a field separator char has already been specified.
                                </xsl:if>
+
|}
                          </xsl:for-each>
+
 
                        </ul>
+
 
                  </td>
+
===StringParamErrorHandler===
                </tr>
+
This element contains configuration informations about an inbound response string parameter <b>Error Handler</b>: a Java object used to generate an Http response parameter ERROR value (containing a plain text string) to be sent back to external Http system.
            </table>
+
 
        </xsl:template>
+
Contains the sub-elements:
</syntaxhighlight>
+
* [[#StringParamErrorMapping|StringParamErrorMapping]]
 +
 
 +
The following table shows the '''StringParamErrorHandler''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed || Set to '''ErrorHandler'''.
 +
|-
 +
| Class || fixed || Set to '''it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler'''
 +
|-
 +
| OutputType || fixed || Set to '''HttpParam'''
 
|}
 
|}
  
  
==RequestStringParamHandler==
+
====StringParamErrorMapping====
Element type (used for XPath navigation).
+
This element contains a mapping between a value extracted from a field of an [[GVTransactionInfo]] object (or a fixed default error value) and the value (to be set) of a field within a plain text string (the content of an inbound response parameter).
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
* [[#RequestStringParamMapping|RequestStringParamMapping]]
+
* [[#GVTransactionErrorInfo|GVTransactionErrorInfo]]
 +
* [[#DefaultErrorMessage|DefaultErrorMessage]]
 +
 
 +
The following table shows the '''StringParamErrorMapping''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ItemType || fixed || Set to '''Mapping'''.
 +
|}
 +
 
 +
 
 +
==Common Elements==
 +
===GVBufferField===
 +
This element represents a mapping target from/to a field of a [[GVBuffer]] object.
 +
The following table shows the '''GVBufferField''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| FieldName || required || The [[GVBuffer]] field name.
 +
The possible values are:
 +
* GVBuffer.system
 +
* GVBuffer.service
 +
* GVBuffer.id
 +
* GVBuffer.retCode
 +
* GVBuffer.object
 +
|}
 +
 
 +
 
 +
===GVBufferProperty===
 +
This element represents a mapping target from/to a property of a [[GVBuffer]] object.
 +
The following table shows the '''GVBufferProperty''' attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| FieldName || required || The [[GVBuffer]] property name.
 +
|}
 +
 
  
The following table shows the '''RequestStringParamHandler''' attributes:
+
===GVBufferPropertyList===
 +
This element represents a mapping target from/to a list of properties of a [[GVBuffer]] object.
 +
The following table shows the '''GVBufferPropertyList''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed || Inbound request parameter/content format.
+
| URLEncoding|| required|| True if outbound request parameters must be URLEncoded, false otherwise.
 +
Possible values are :
 +
* True
 +
* False
 +
|-
 +
| FieldNameValueSeparator || optional || Parameters name-value separator string. Default is '='
 
|-
 
|-
| Class || fixed || The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
+
| FieldEntrySeparator || optional || Parameters entry separator string within list. Default is ';'
 
|-
 
|-
| OutputType || required || This element contains a mapping between a value extracted from a plain text string (the value of an inbound request parameter), and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).
+
| ExcludeFields || optional || The comma separated list of property names to ignore.
 +
|}
 +
 
 +
 
 +
===OpType===
 +
This element represents a mapping target to the variable containing the communication paradigm to be used.
 +
 
 +
 
 +
===DefaultValue===
 +
This element represents a plain text value to be assigned as source/target of an handler mapping.
 +
 
 +
 
 +
===DefaultErrorMessage===
 +
This element represents a plain text value to be assigned as source of an inbound response error message.
  
Possible values are:
 
'''GVBuffer''', '''OpType'''.
 
  
This is the template used:
+
===GVTransactionErrorInfo===
<syntaxhighlight lang="XML">
+
This element represents a mapping target from a field of an [[GVTransactionInfo]] object to the error value of an HTTP parameter.
  <xsl:template match="RequestStringParamMapping">
+
The following table shows the '''GVTransactionErrorInfo''' attributes:
            <table cellpadding="0" cellspacing="0">
+
{|class="gvtable"
            <xsl:choose>
+
! Attribute !! Type !! Description
                <xsl:when test="../../@Name">
+
|-
                    <tr>
+
| Value || required || The [[GVTransactionInfo]] field name.
                        <td>Inbound request parameter handled:</td>
+
The possible values are:
                        <td width="20"></td>
+
* GVTransInfo.system
                        <td><b><xsl:value-of select="../../@Name"/></b></td>
+
* GVTransInfo.service
                    </tr>
+
* GVTransInfo.id
                </xsl:when>
+
* GVTransInfo.errorCode
                <xsl:otherwise>
+
* GVTransInfo.errorMessage
                    <tr>
 
                        <td>Inbound request content handler mapping.</td>
 
                    </tr>
 
                </xsl:otherwise>
 
            </xsl:choose>
 
                <tr>
 
                    <td>Mapping target:
 
                        <xsl:if test="GVBufferField">
 
                          field <b><xsl:value-of select="substring-after(GVBufferField/@FieldName, 'GVBuffer.')"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="GVBufferProperty">
 
                            extended field <b><xsl:value-of select="GVBufferProperty/@FieldName"/></b> of GVBuffer
 
                        </xsl:if>
 
                        <xsl:if test="OpType">
 
                            <i>OperationType</i> variable (GreenVulcano communication paradigm)
 
                        </xsl:if>
 
                    </td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}

Latest revision as of 14:44, 2 August 2013

Description

This sub-element formatter is used into the decoding of client request's parameters in order to create the input for a GreenVulcano® ESB service and to convert the service's output into a HTTP response.


GreenVulcano® ESB Configuration

The GVAdapterHttpConfiguration Element is used by: GVAdapters.

The following table shows the ExtendedInboundParamHandlerFormatter attributes:

Attribute Type Description
type fixed Set to FormatterPlugin.
class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.ExtendedInboundParamHandlerFormatter.
ID required Formatter identifier
read-request-header optional If 'true' reads the request HTTP headers and provide them with the request parameters. Default value is false.
ReqCharacterEncoding optional CharacterEncoding to be used to handle requests from external system. Default to UTF-8.
RespCharacterEncoding optional CharacterEncoding to handle responses to the external system. Default to UTF-8.
RespContentType optional ContentType to be declared while handling HTTP responses to the external system. Default to text/html.
HandlePostBodyAsParams optional If true force the POST body to be handled as application/x-www-form-urlencoded content type. Default is false.
ResponseOnError-HTTPCode optional If != -1 force the adapter to respond with the given http code on case of error. Default is -1 (disabled).

Contains the sub-elements:


RequestParams

This element contains configuration informations about conversion of the parameters of an inbound http request into a valid GVBuffer object and determination of the communication paradigm to be used by GreenVulcano.

Contains the sub-elements:

The following table shows the RequestParams attributes:

Attribute Type Description
ParamNameValueSeparator optional Parameters name-value separator string within input querystring.
ParamEntrySeparator optional Parameters entry separator string within input querystring.


RequestParam

This element specifies the rules to follow to convert a single parameter of an inbound http request into a partially populated GVBuffer object.

Contains the sub-elements:

The following table shows the RequestParam attributes:

Attribute Type Description
Name required The name of an inbound request parameter.
Required optional If true the request parameter is mandatory. Default is True.
Type optional Not used


RequestContent

This element contains configuration informations about conversion of the content of an inbound http request into a valid GVBuffer object and determination of the communication paradigm to be used by GreenVulcano.

Contains the sub-elements:


ResponseParams

This element contains configuration informations about conversion of a response GVBuffer object (received from GreenVulcano) into an inbound http response to be sent to the invoking external http system.

Contains the sub-elements:

The following table shows the ResponseParams attributes:

Attribute Type Description
ParamNameValueSeparator optional Parameters name-value separator string within ouput querystring. Default is '='
ParamEntrySeparator optional Parameters entry separator string within ouput querystring. Default is '&'


ResponseParam

This element specifies the rules to follow to generate a single parameter of an inbound http response. It's possible to use values read from the fields of the response GVBuffer object received from GreenVulcano, or configure a default value for each handler mapping.

Contains the sub-elements:

The following table shows the ResponseParam attributes:

Attribute Type Description
Name required The name of an inbound request parameter.
SendParameterName required True if the parameter's name must appear within inbound response, false otherwise.
PutInHeader required If true must appear in the HTTP header.
Type optional Not used


Request Parameter Handlers

RequestXMLParamHandler

This element contains configuration informations about an inbound request XML parameter Handler: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains an XML string) and use them to populate one or more fields of a GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestXMLParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler.
OutputType required The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).

Possible values are:

  • GVBuffer
  • OpType


RequestXMLParamMapping

This element contains a mapping between a value extracted by an element or attribute (within XML content of an inbound request parameter) matching a given XPath, and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply)

Contains the sub-elements:

The following table shows the RequestXMLParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
XPath required XPath of an element or attribute (within XML content of an inbound request parameter).


RequestFlatParamHandler

This element contains configuration informations about an inbound request Flat parameter Handler: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a Flat string) and use them to populate one or more fields of a GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestFlatParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler
OutputType required The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).

Possible values are:

  • GVBuffer
  • OpType
SeparatorChar optional The separator character between fields within the flat string value of this inbound request parameter.


RequestFlatParamMapping

This element contains a mapping between a value extracted from a flat string (the content of an inbound request parameter), and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).

Contains the sub-elements:

The following table shows the RequestFlatParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
Offset required The offset of a field within the flat string value of this inbound request parameter.
Length optional The length of a field within the flat string value of this inbound request parameter. Not needed if a field separator char has already been specified.
Trim optional The place where unneeded filling white spaces can be present.

Possible values are:

  • left, to trim leading white spaces
  • right, to trim trailing white spaces
  • both, to trim both leading and trailing spaces

If it is specified a value different from these above, no trimming will be performed


RequestStringParamHandler

This element contains configuration informations about an inbound request Flat parameter Handler: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a plain text string) and use them to populate one or more fields of a GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestStringParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler
OutputType required The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).

Possible values are:

  • GVBuffer
  • OpType


RequestStringParamMapping

This element contains a mapping between a value extracted from a plain text string (the value of an inbound request parameter), and a field of a request GVBuffer object. If mapping target is indicated with the "OpType" keyword, the value is a string indicating the requested communication paradigm (RequestReply, Request, SendReply, GetRequest, GetReply).

Contains the sub-elements:

The following table shows the RequestStringParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.


Default Value Handlers

GVBufferDefaultValues

This element contains the configuration of default values for some of all the fields of a inbound request GVBuffer object.

Contains the sub-elements:


GVBufferFieldDefaultValue

A configured default value for a field of a GVBuffer object. The following table shows the GVBufferFieldDefaultValue attributes:

Attribute Type Description
FieldName required The GVBuffer field name.

The possible values are:

  • GVBuffer.system
  • GVBuffer.service
  • GVBuffer.id
  • GVBuffer.retCode
  • GVBuffer.object
FieldValue required The configured default value of a GVBuffer field.


GVBufferPropertyDefaultValue

A configured default value for a property of a GVBuffer object. The following table shows the GVBufferPropertyDefaultValue attributes:

Attribute Type Description
FieldName required The GVBuffer property name.
FieldValue required A configured default value for a property field of a GVBuffer object.


OpTypeDefaultValue

A configured default value for the communication paradigm to be used.

The following table shows the OpTypeDefaultValue attributes:

Attribute Type Description
Value required The configured default value for the communication paradigm.

Possible values are:

  • RequestReply
  • Request
  • SendReply
  • GetRequest
  • GetReply


Response Parameter Handlers

ResponseXMLParamHandler

This element contains configuration informations about an inbound response XML parameter Handler: a Java object used to extract informations from one or more fields of an GVBuffer response object (received from GreenVulcano) and use them to generate an Http response parameter value (containing an XML string) to be sent back to external Http system.

Contains the sub-elements:

The following table shows the ResponseXMLParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler.
OutputType fixed Set to HttpParam


ResponseXMLParamMapping

This element contains a mapping between the value of a field of a response GVBuffer object (received from GreenVulcano) and the value (to be set) of an element or attribute (within the XML content of an inbound response parameter) matching a given XPath.

Contains the sub-elements:

The following table shows the ResponseXMLParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
XPath required XPath of an element or attribute (within XML content of an inbound response parameter).


ResponseFlatParamHandler

This element contains configuration informations about an inbound response Flat parameter Handler: a Java object used to extract informations from one or more fields of an GVBuffer response object (received from GreenVulcano) and use them to generate an Http response parameter value (containing a Flat string) to be sent back to external Http system.

Contains the sub-elements:

The following table shows the ResponseFlatParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler
OutputType fixed Set to HttpParam
SeparatorChar optional The separator character between fields within the flat string value of this inbound response parameter.


ResponseFlatParamMapping

This element contains a mapping between a value extracted from a field of a response GVBuffer object (received from GreenVulcano) and the value (to be set) of a field within a flat string (the content of an inbound response parameter).

Contains the sub-elements:

The following table shows the ResponseFlatParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
Offset required The offset of a field within the flat string value of this inbound response parameter.
Length optional The length of a field within the flat string value of this inbound response parameter. Not needed if a field separator char has already been specified.
Trim optional The place where unneeded filling white spaces can be present.

Possible values are:

  • left, to trim leading white spaces
  • right, to trim trailing white spaces
  • both, to trim both leading and trailing spaces

If it is specified a value different from these above, no trimming will be performed


ResponseStringParamHandler

This element contains configuration informations about an inbound request Flat parameter Handler: a Java object used to extract informations from a single parameter of an inbound http request (in the case that this parameter contains a plain text string) and use them to populate one or more fields of a GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the ResponseStringParamHandler attributes:

Attribute Type Description
ItemType fixed Set to Handler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler
OutputType fixed Set to HttpParam


ResponseStringParamMapping

This element contains a mapping between a value extracted from a field of a response GVBuffer object (received from GreenVulcano) and the value (to be set) of a field within a plain text string (the content of an inbound response parameter).

Contains the sub-elements:

The following table shows the ResponseStringParamMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.


Response Parameter Error Handlers

XMLParamErrorHandler

This element contains configuration informations about an inbound response XML parameter Error Handler: a Java object used to generate an Http response parameter ERROR value (containing an XML string) to be sent back to external Http system.

Contains the sub-elements:

The following table shows the XMLParamErrorHandler attributes:

Attribute Type Description
ItemType fixed Set to ErrorHandler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.XMLParameterHandler.
OutputType fixed Set to HttpParam


XMLParamErrorMapping

This element contains a mapping between the value of a field of an GVTransactionInfo object (or a fixed default error value) and the value (to be set in case of error) of an element or attribute (within the XML content of an inbound response parameter) matching a given XPath.

Contains the sub-elements:

The following table shows the XMLParamErrorMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
XPath required XPath of an element or attribute (within XML content of an inbound response parameter).


FlatParamErrorHandler

This element contains configuration informations about an inbound response Flat parameter Error Handler: a Java object used to generate an Http response parameter ERROR value (containing a Flat string) to be sent back to external Http system.

Contains the sub-elements:

The following table shows the FlatParamErrorHandler attributes:

Attribute Type Description
ItemType fixed Set to ErrorHandler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.FlatParameterHandler
OutputType fixed Set to HttpParam
SeparatorChar optional The separator character between fields within the flat string value of this inbound response parameter.


FlatParamErrorMapping

This element contains a mapping between a value extracted from a field of an GVTransactionInfo object (or a fixed default error value) and the value (to be set) of a field within a flat string (the error content of an inbound response parameter).

Contains the sub-elements:

The following table shows the FlatParamErrorMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.
Offset required The offset of a field within the flat string value of this inbound response parameter.
Length optional The length of a field within the flat string value of this inbound response parameter. Not needed if a field separator char has already been specified.


StringParamErrorHandler

This element contains configuration informations about an inbound response string parameter Error Handler: a Java object used to generate an Http response parameter ERROR value (containing a plain text string) to be sent back to external Http system.

Contains the sub-elements:

The following table shows the StringParamErrorHandler attributes:

Attribute Type Description
ItemType fixed Set to ErrorHandler.
Class fixed Set to it.greenvulcano.gvesb.adapter.http.formatters.handlers.StringParameterHandler
OutputType fixed Set to HttpParam


StringParamErrorMapping

This element contains a mapping between a value extracted from a field of an GVTransactionInfo object (or a fixed default error value) and the value (to be set) of a field within a plain text string (the content of an inbound response parameter).

Contains the sub-elements:

The following table shows the StringParamErrorMapping attributes:

Attribute Type Description
ItemType fixed Set to Mapping.


Common Elements

GVBufferField

This element represents a mapping target from/to a field of a GVBuffer object. The following table shows the GVBufferField attributes:

Attribute Type Description
FieldName required The GVBuffer field name.

The possible values are:

  • GVBuffer.system
  • GVBuffer.service
  • GVBuffer.id
  • GVBuffer.retCode
  • GVBuffer.object


GVBufferProperty

This element represents a mapping target from/to a property of a GVBuffer object. The following table shows the GVBufferProperty attributes:

Attribute Type Description
FieldName required The GVBuffer property name.


GVBufferPropertyList

This element represents a mapping target from/to a list of properties of a GVBuffer object. The following table shows the GVBufferPropertyList attributes:

Attribute Type Description
URLEncoding required True if outbound request parameters must be URLEncoded, false otherwise.

Possible values are :

  • True
  • False
FieldNameValueSeparator optional Parameters name-value separator string. Default is '='
FieldEntrySeparator optional Parameters entry separator string within list. Default is ';'
ExcludeFields optional The comma separated list of property names to ignore.


OpType

This element represents a mapping target to the variable containing the communication paradigm to be used.


DefaultValue

This element represents a plain text value to be assigned as source/target of an handler mapping.


DefaultErrorMessage

This element represents a plain text value to be assigned as source of an inbound response error message.


GVTransactionErrorInfo

This element represents a mapping target from a field of an GVTransactionInfo object to the error value of an HTTP parameter. The following table shows the GVTransactionErrorInfo attributes:

Attribute Type Description
Value required The GVTransactionInfo field name.

The possible values are:

  • GVTransInfo.system
  • GVTransInfo.service
  • GVTransInfo.id
  • GVTransInfo.errorCode
  • GVTransInfo.errorMessage