Service Virtualization

  • 1.  Swift Msgs Validation

    Posted Nov 15, 2017 09:35 AM

    Hi,

     

     Reading a XML msg and the after the XSD Validation, it is transformed and the Message is transformed into a SWIFT message.

     

     Now I want to validate the Data displaying for Each tag in each block. Could any one please help me with the Steps or any document . Thanks before Hand.

     

    i.e Eg:Block 4: tag 20 : 56789LISA, tag 21:6789LISA, tag 32c:171115(year, month , date).

     

    Thanks,


    Santhosh



  • 2.  Re: Swift Msgs Validation

    Broadcom Employee
    Posted Nov 15, 2017 10:45 AM

    Have you tried the SWIFT Validation assertion?



  • 3.  Re: Swift Msgs Validation

    Posted Jan 04, 2018 06:33 PM

    You never replied. Did Rick.Brown suggestion work for you?

    The Assertion path is.

     

     

    As an aside, it is possible to convert a Swift message to XML. Assuming that the Swift message is in a property (e.g., fl_swiftMessage), a JSR-223 code snippet would be:

    // swift message pattern

    // {1:F....}{2:Oxxxabcd050901....}{3:{108:11122233344455}}{4::20:aaabbbcccddd:23B:CRED....-}

    import com.itko.lisa.vse.stateful.protocol.swift.SwiftDataProtocolHelper;

    String xml = SwiftDataProtocolHelper.swiftToXml( testExec.getStateValue("fl_swiftMessage") );

    testExec.setStateValue("fl_swiftXml", xml );
    return swiftXml;

     

    The resulting XML would look something like this:

    <message>
      <block1>
        <applicationId>F</applicationId>
        :

      </block1>
      <block2 type="output">
        <messageType>***</messageType>
        <senderInputTime>abcd</senderInputTime>
        <MIRDate>050901</MIRDate>
        :

       </block2>
      <block3>
        <BLOCK3_108>11122233344455</BLOCK3_108>
      </block3>
      <block4>
        <BLOCK4_20>aaabbbcccddd</BLOCK4_20>
        <BLOCK4_23B>CRED</BLOCK4_23B>
        :
      </block4>
    </message>



  • 4.  Re: Swift Msgs Validation

    Posted Jan 04, 2018 08:32 PM

    Thanks alot. Able to read the whole swift message and by using that, XML data is displaying.

     

    Regards,


    Santhosh