Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Step by step building a IBAN validation Service in TIBCO Cloud? Integration


    Manoj Chaurasia

    Table of Contents

    Service Specification creation

    This Example shows a Banking Data Validation API can be easily implemented using TIBCO Cloud? Integration.

    The first sample shows how to validate an IBAN Number.

    Use of Specification Designer to define the Service Request, here a REST Get with one parameter the IBAN.

    Screenshot2022-11-09at2_32_42PM.thumb.png.1518f1817df88cc23439efa80a8d915d.png

     

    Use of Specification Designer to define the Service Response, here if valid or not as boolean and JSON Response.

     

    Screenshot2022-11-09at2_32_52PM.thumb.png.2701a64caa75fffa3e34fc630985626a.png

    Business Studio Service creation

    You can create a tiny Services Mock from TIBCO Cloud Integration itself, but here we create it directly using TIBCO Business Studio,

    as will complete it fully functional in a next Step. 

    Open Business Studio locally and browse your Service Specification defined in your TIBCO Cloud Account.

     

    Screenshot2022-11-09at2_33_02PM.png.d8eacd3f9e898b6d71ea06163efff5a4.png

    Create an empty new Business Studio Project and copy the Service Specification to the Services Descriptors Folder using drag'n drop

     

    Screenshot2022-11-09at2_33_11PM.png.706650d5222bf41b67d48a544388eb7b.png

    From Services Descriptors Folder you can drag'n drop your Service Description directly to the Service Implementation.

     

    Screenshot2022-11-09at2_33_23PM.thumb.png.0e214e34d81ba92ee2e52160d77d75a5.png

    To be able to deploy the project now as Mock, we can add a dummy Response with always "true"

     

    Screenshot2022-11-09at2_33_32PM.thumb.png.a63e8015ebc9fdb87354e7b75e1522e2.png

    Adding the full Implementation 

    Process Overview

    the Implementation checks first for valid country Codes in the first Activity,

    as a next step the IBAN checksum gets validated, followed by a Log Activity and the final Response.

    All fully graphically defined using same tiny mappings.

     

    Screenshot2022-11-09at2_33_45PM.thumb.png.6ab23381b8e67e4818335f17aa993506.png

    Activity:: check country code

    To validate the wanted country Codes a Mapper Activity is used together with a simple XML Schema.

     

    Screenshot2022-11-09at2_33_56PM.thumb.png.ecccaa9faa7715dc8e875097dd99cb05.png

    The Valid Country Codes are defined as Module Properties, here: "DE|FR|GB|IS|IT|ES|NL"

     

    Screenshot2022-11-09at2_34_05PM.png.28af01f6b6a1e470afd8d08949be596b.png

    Activity:: check IBAN Checksum 

    For the Checksum Validation, an XSLT Transformation is used with the REST IBAN as the input string.

     

    Screenshot2022-11-09at2_34_14PM.thumb.png.4a6654dc6dcefb374f84e75ae9576051.png

    Full XSLT to validate the IBAN string checksum.

     <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:local="http://localhost/"> 	 	<xsl:template match="IBAN[local:validate(.)]">         <xsl:text>Validated IBAN</xsl:text>     </xsl:template> 	 	<xsl:function name="local:validate">         <xsl:param name="pIBAN" as="xs:string"/>         <xsl:sequence select="xs:integer(                                  codepoints-to-string(                                     for $n in string-to-codepoints(                                                  concat(                                                     substring($pIBAN,5),                                                     substring($pIBAN,1,4)))                                     return if ($n > 64)                                            then string-to-codepoints(                                                    string($n - 55)))                                            else $n                                  )) mod 97 eq 1"/>     </xsl:function> </xsl:stylesheet>

     

    Response:: Mapping

    As the XSTL activity gives a String back to the Process, this get's changed to valid boolean true/false in the final activity.

     

    Screenshot2022-11-09at2_34_25PM.thumb.png.0a2a37cc2e09b806de75cc217845aa47.png

    Implementation Source

    Attach the Services Specification Input files, and Business Studio Project Export, too. (see end of this page)

    Note

    Services validate current only the checksum, and no other country specific IBAN configurations like the String Length, etc.

    Testing

    The deployed Application can be tested by just using the "Push to Cloud" Wizard directly online.

    Or you follow the steps here, to execute some local debugging upfront.

     

    Screenshot2022-11-09at2_34_53PM.png.4b56092963c4b3f4f60bd7f71a13ae83.png

    ... looks in TIBCO Cloud Integration like this, here with one running Instance:

     

    Screenshot2022-11-09at2_35_06PM.thumb.png.f08031fde3e4ab39e9447b0ca231303e.png

    For Testing, you can just click on the Endpoint and execute your Testing against the real URL.

    Positive Test

    Use e.g. IBAN DE89370400440532013000

     

    Screenshot2022-11-09at2_35_17PM.thumb.png.9afef09ea4c48d92dae9bc80a7f2291a.png

    Negative Test

    Use e.g. IBAN DE89370400440532013001 wrong checksum.

     

    Screenshot2022-11-09at2_35_29PM.thumb.png.95764f7d221fa68a1cb3b023fe4c0fb9.png

    bankingdatavalidation-v1.0.zip

    tci-apispec-bankingdatavalidation.zip


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...