Difference between revisions of "ExtendedInboundParamHandlerFormatter"

From GreenVulcano Wiki
Jump to: navigation, search
Line 32: Line 32:
 
|}
 
|}
  
Contains the sub-elements [[#GVBufferFieldDefaultValue|GVBufferFieldDefaultValue]].
+
Contains the sub-elements [[#GVBufferFieldDefaultValue|GVBufferFieldDefaultValue]] and [[#GVBufferPropertyDefaultValue|GVBufferPropertyDefaultValue]].
 
 
Contains the sub-elements [[#GVBufferPropertyDefaultValue|GVBufferPropertyDefaultValue]].
 
  
 
Contains the sub-elements  
 
Contains the sub-elements  
Line 40: Line 38:
  
 
==GVBufferFieldDefaultValue==
 
==GVBufferFieldDefaultValue==
 +
A configured default value for a field of a [[GVBuffer]] object.
 
The following table shows the '''GVBufferFieldDefaultValue''' 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.
+
| FieldName || required || The [[GVBuffer]] field name.
 +
The possible values are:
 +
* GVBuffer.system
 +
* GVBuffer.service
 +
* GVBuffer.id
 +
* GVBuffer.retCode
 +
* GVBuffer.object
 
|-
 
|-
| FieldValue || required || A configured default value for a property field of an GVBuffer object.
+
| FieldValue || required || The configured default value of a [[GVBuffer]] field.
 
|}
 
|}
  
 
==GVBufferPropertyDefaultValue==
 
==GVBufferPropertyDefaultValue==
The name of an GVBuffer extended field.
+
A configured default value for a property of a [[GVBuffer]] object.
 
The following table shows the '''GVBufferPropertyDefaultValue''' attributes:
 
The following table shows the '''GVBufferPropertyDefaultValue''' 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.
+
| FieldName || required || The [[GVBuffer]] property name.
 
|-
 
|-
| FieldValue || required || This element represents a mapping target from/to a field of an GVBuffer object.
+
| FieldValue || required || A configured default value for a property field of a [[GVBuffer]] object.
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==
 
==GVBufferField==
The name of a field of an GVBuffer object.
+
This element represents a mapping target from/to a field of a [[GVBuffer]] object.
 
The following table shows the '''GVBufferField''' attributes:
 
The following table shows the '''GVBufferField''' 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.
+
| FieldName || required || The [[GVBuffer]] field name.
Template to follow:
+
The possible values are:
<syntaxhighlight lang="XML">
+
* GVBuffer.system
        <xsl:template match="GVBufferProperty">
+
* GVBuffer.service
            <table cellpadding="0" cellspacing="0">
+
* GVBuffer.id
                <tr>
+
* GVBuffer.retCode
                    <td>Extended field name: <b><xsl:value-of select="@FieldName"/></b></td>
+
* GVBuffer.object
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
 
==GVBufferProperty==
 
==GVBufferProperty==
The name of a field of an GVBuffer object.
+
This element represents a mapping target from/to a property of a [[GVBuffer]] object.
 
The following table shows the '''GVBufferProperty''' attributes:
 
The following table shows the '''GVBufferProperty''' 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.
+
| FieldName || required || The [[GVBuffer]] property name.
Template to follow:
 
<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>
 
 
 
This element represents a mapping target from/to a list of extended field of an GVBuffer object.
 
Template to follow
 
<syntaxhighlight lang="XML">
 
        <xsl:template match="GVBufferPropertyList">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                    <td>Excluded Extended fields names: <b><xsl:value-of select="@ExcludeFields"/></b></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
  
 
==GVBufferPropertyList==
 
==GVBufferPropertyList==
 +
This element represents a mapping target from/to a list of properties of a [[GVBuffer]] object.
 
The following table shows the '''GVBufferPropertyList''' attributes:
 
The following table shows the '''GVBufferPropertyList''' 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 ';'
+
| URLEncoding|| required|| True if outbound request parameters must be URLEncoded, false otherwise.
 +
Possible values are :
 +
* True
 +
* False
 
|-
 
|-
| FieldNameValueSeparator || optional || Parameters entry separator string within list. Default is '='
+
| FieldNameValueSeparator || optional || Parameters name-value separator string. Default is '='
 
|-
 
|-
| FieldEntrySeparator || optional || The comma separated list of extended fields names to ignore.
+
| FieldEntrySeparator || optional || Parameters entry separator string within list. Default is ';'
 
|-
 
|-
| ExcludeFields || required || This element represents a plain text value to be assigned as source/target of an handler mapping.
+
| ExcludeFields || optional || The comma separated list of property names to ignore.
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>
 
 
|}
 
|}
 +
 +
 +
==DefaultValue==
 +
This element represents a plain text value to be assigned as source/target of an handler mapping.
 +
  
 
==RequestParams==
 
==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:
 
* [[#RequestParam|RequestParam]]
 
* [[#RequestParam|RequestParam]]
Line 155: Line 122:
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ParamNameValueSeparator|| required|| Parameters name-value separator string within list. Possible values are : '''True''', '''False'''. Default is ';'
+
| ParamNameValueSeparator|| required|| Parameters name-value separator string within input querystring.
 
|-
 
|-
| ParamEntrySeparator|| optional || Parameters entry separator string within list. Default is '='
+
| ParamEntrySeparator|| optional || Parameters entry separator string within input querystring.
This is the template used:
 
<syntaxhighlight lang="XML">
 
        <xsl:template match="RequestContent">
 
            <table cellpadding="0" cellspacing="0">
 
                <tr>
 
                        <td>Configured handlers:</td>
 
                        <td width="20"></td>
 
                        <td><b><xsl:value-of select="count(./*[@ItemType='Handler'])"/></b></td>
 
                </tr>
 
            </table>
 
        </xsl:template>
 
</syntaxhighlight>
 
 
|}
 
|}
 +
 +
 +
==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:
 +
* [[#RequestXMLParamHandler|RequestXMLParamHandler]]
 +
* [[#RequestFlatParamHandler|RequestFlatParamHandler]]
 +
* [[#RequestStringParamHandler|RequestStringParamHandler]]
 +
  
 
==RequestParam==
 
==RequestParam==
 +
This element specifies the rules to follow to convert a single parameter of an inbound http request into a partially populated GVBuffer object.
 
The following table shows the '''RequestParam''' attributes:
 
The following table shows the '''RequestParam''' attributes:
 
{|class="gvtable"
 
{|class="gvtable"
Line 179: Line 145:
 
| Name|| required|| If true the request parameter is mandatory. Possible values are : '''True''', '''False'''. Default is '''True'''.
 
| Name|| required|| If true the request parameter is mandatory. Possible values are : '''True''', '''False'''. Default is '''True'''.
 
|-
 
|-
| 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.
+
| Type|| optional || '''Not used'''
 +
|}
  
This is the template used:
 
<syntaxhighlight lang="XML">
 
      <xsl:template match="RequestXMLParamHandler">
 
            <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="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==
 
==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 an GVBuffer request object to be sent to GreenVulcano.
 +
 
Contains the sub-elements:
 
Contains the sub-elements:
 
* [[#RequestXMLParamMapping|RequestXMLParamMapping]]
 
* [[#RequestXMLParamMapping|RequestXMLParamMapping]]
Line 236: Line 159:
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| Inbound request parameter/content format.
+
| ItemType || fixed|| Element type.
 
|-
 
|-
| Class || optional || 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.XMLParameterHandler'''.
 
|-
 
|-
| 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'''.
+
| OutputType || required|| The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
 
+
Possible values are:
This is the template used:
+
* GVBuffer
<syntaxhighlight lang="XML">
+
* OpType
 
 
        <xsl:template match="RequestXMLParamMapping">
 
            <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: <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==
 
==RequestXMLParamMapping==
Element type (used for XPath navigation).
+
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:
 
Contains the sub-elements:
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferField|GVBufferField]]
Line 295: Line 183:
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| XPath of an element or attribute (within XML content of an inbound request parameter).
+
| ItemType || fixed|| Element type.
 
|-
 
|-
| 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 request 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==
 
==RequestFlatParamHandler==
Element type (used for XPath navigation).
+
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.
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
 
* [[#RequestFlatParamMapping|RequestFlatParamMapping]]
 
* [[#RequestFlatParamMapping|RequestFlatParamMapping]]
  
 
The following table shows the '''RequestFlatParamHandler''' attributes:
 
The following table shows the '''RequestFlatParamHandler''' attributes:
{|class="gvtable"
+
{|class="gvtable"e.
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| ItemType || fixed|| Inbound request parameter/content format.
+
| ItemType || fixed|| Element type.
 
|-
 
|-
| 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 || required|| The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
Possible values are '''GVBuffer''', OpType'''.
+
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 request 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==
 
==RequestFlatParamMapping==
Element type (used for XPath navigation).
+
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:
 
* [[#GVBufferField|GVBufferField]]
 
* [[#GVBufferField|GVBufferField]]
Line 419: Line 224:
 
! 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 || Element type.
 +
|-
 +
| Offset || required || The offset of a field within the flat string value of this inbound request 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 request 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
|-
 
| 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.
 
Possible values are:
 
'''left''', '''right''','''both'''.
 
This is the template used:
 
<syntaxhighlight lang="XML">
 
  <xsl:template match="RequestStringParamHandler">
 
            <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="RequestStringParamMapping">
 
                                <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>
 
 
|}
 
|}
  
  
 
==RequestStringParamHandler==
 
==RequestStringParamHandler==
Element type (used for XPath navigation).
+
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.
 +
 
 
Contains the sub-elements:
 
Contains the sub-elements:
 
* [[#RequestStringParamMapping|RequestStringParamMapping]]
 
* [[#RequestStringParamMapping|RequestStringParamMapping]]

Revision as of 08:27, 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.


DA COMPLETARE


GreenVulcano® ESB Configuration

The GVAdapterHttpConfiguration Element is used by: GVAdapters.

The following table shows the ExtendedInboundParamHandlerFormatter attributes:

Attribute Type Description
type fixed This attribute must keep the value 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 GVBufferFieldDefaultValue and GVBufferPropertyDefaultValue.

Contains the sub-elements GVBufferField.

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.

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.


DefaultValue

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


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 required Parameters name-value separator string within input querystring.
ParamEntrySeparator optional Parameters entry separator string within input querystring.


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:


RequestParam

This element specifies the rules to follow to convert a single parameter of an inbound http request into a partially populated GVBuffer object. The following table shows the RequestParam attributes:

Attribute Type Description
Name required If true the request parameter is mandatory. Possible values are : True, False. Default is True.
Type optional Not used


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 an GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestXMLParamHandler attributes:

Attribute Type Description
ItemType fixed Element type.
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 Element type.
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 an GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestFlatParamHandler attributes:

Attribute Type Description
ItemType fixed Element type.
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 Element type.
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 an GVBuffer request object to be sent to GreenVulcano.

Contains the sub-elements:

The following table shows the RequestStringParamHandler attributes:

Attribute Type Description
ItemType fixed Inbound request parameter/content format.
Class fixed The output type of this inbound request parameter handler (GVBuffer object or communication paradigm string).
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).

Possible values are: GVBuffer, OpType.

This is the template used:

   <xsl:template match="RequestStringParamMapping">
            <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 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>