Service Virtualization

  • 1.  How to create virtual service using only copybook and payload mapping file.

    Posted Dec 29, 2016 01:07 AM

    Hello , 

     

    I am working on to create a virtual service using copybook and payload mapping file. 

    I don't have any other artifact, can anyone help me with how to proceed with virtualization ?

     

    Key area - 

    1.Transport protocol

    2.Approach of virtualization 

    3.Data protocol. 

     

    Thanks

    Akshay M

    C-9892228993



  • 2.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Jan 03, 2017 11:56 AM

    Sorry, Akshayman, your question is pretty complex and has many unknown variables.  The DevTest Recorder is your friend in this use case.  I would do my best to generate the service by recording -- not from scratch or guesswork. 

     

    To answer your question:  It is not possible to create a service from just a copybook and mapping file.  Copybooks and mapping files help DevTest translate the payload data (i.e., data protocols) you see in the VSI.  The transport is the potential sticky issue for you and that information is not provided in your question.

     

    I will assume that you are referring to some type of mainframe transport protocol such as IMS connect or CICS that contains a payload in copybook format.  If this is the case, you are going to need considerably more information to generate your service.  Research the documentation available for DevTest with regard to these protocols.  I would recommend using the DevTest recording feature and configuring the appropriate DevTest transport protocol properties (for example, if IMS Connect: lisa.vse.protocol.ims.header.length and lisa.vse.protocol.ims.response.includes.llll and several other properties).  Determining the settings are likely to require that you obtain information from the mainframe support team or an application developer familiar with the low level configuration to the 'mainframe gateway'.  Otherwise, you end up guessing at which settings are applicable.  

     

    If a mainframe protocol and a previous service exists, you might be able to copy/modify the VSM and alter the VSI, but there is significant opportunity for injecting errors. I would not recommend this approach. 

     

    If your application uses HTTP or JMS transport and the payload just happens to be copybook layout, then create your service using R/R pairs and specify a Request & Response Copybook DPH as the data protocol pointing to the appropriate mappings.  



  • 3.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Sep 04, 2018 08:21 AM
      |   view attached

    Hi Joel,

     

    I need your help as i am  doing  POC on mainframe virtualization :Error screeshotIMS configuration screen

     

    Approach-

    Step1 - Created copybook for request and response.

    Step2 - Created RR pair as per the copybook. (fixed length message)

    Step3 - Created mapping file to map incoming payload to the respective copybook.

    Step4 - In Virtualization steps,

                1.Transport Protocol - IMS

                2.Selected RR Pair folder.

                3.passed the copybook and mapping file location.

                4.Data protocol- Copybook DP and Generic XML Payload Parser on request side and Copybook DP on response   side.

     PFA Request/Response pair file and mapping file for the reference.

     

     

    After the above steps, in next step under request/response pair screen i am getting below error -

     

    java.lang.RuntimeException: Unexpected end of stream.at com.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectProcessor.updateResponse(IMSConnectProcessor.java:147)
    at

    com.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectTransportProtocol.doIMSConnectProcessing(IMSConnectTransportProtocol.java:141)
    at

    com.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectTransportProtocol.updateTransactionFromRequestResponsePair(IMSConnectTransportProtocol.java:532)
    at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.updateTransactionFromDelegateTPH(VSFromRRPairsTransportProtocol.java:242)
    at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.recordTransactionsFromRRTxns(VSFromRRPairsTransportProtocol.java:220)

     

    Thanks,

    Girija

    Attachment(s)



  • 4.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Jan 15, 2017 02:16 AM
      |   view attached

    Hi Joel,

     

    Thanks for the reply.

     Here is the case ,

     

    I want to virtualize a Mainframe service using RR pair as I don't have live system available.

     

    Approach-

    Step1 - Created copybook for request and response.

    Step2 - Created RR pair as per the copybook. (fixed length message)

    Step3 - Crated mapping file to map incoming payload to the respective copybook.

    Step4 - In Virtualization steps,

                1.Transport Protocol - HTTP.

                2.Selected RR Pair folder.

                3.passed the copybook and mapping file location.

                4.Data protocol- Copybook DP and Generic XML Payload Parser on request side and Copybook DP on response             side.

     

    After the above steps, in next step under request transaction input payload is not getting loaded. Instead getting below error -

    Unknown copybook and request response is loaded in hexa format.

     

    Could you please throw some light on this?

    PFA copybook , mapping and RR Pair that we are referring in current project.

     

    Thanks

    Akshay M.

    Attachment(s)

    zip
    CopybookRRV.zip   1 KB 1 version


  • 5.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Jan 16, 2017 08:46 AM
      |   view attached

    Please see the attached project.  I got the input side to work with my sample data.  The output side is unfinished.  The project (VRS file, sample Clear Text Data, and mapping seems to trap the Transaction ID key "12345678" and create an input XML that maps to my sample copybook.

     

    I found a reference in the documentation @ Manage Copybook Bundles - DevTest Solutions - 10.0 - CA Technologies Documentation  suggests that the payload needs to be encoded.  It reads: "Supported data types are byte data or base 64 string (byte data that has been encoded to byte64 string).'   But, in my case, I used clear text (US-ASCII).

     

    Check your R/R pairs to ensure that you have HTTP information.  In my case, I used a RESTful HTTP request.  There is still an issue with the response in my VSI, but maybe the sample project will help you get started.

    Attachment(s)

    zip
    WIP_Mainframe_Cpybook.zip   20 KB 1 version


  • 6.  Re: How to create virtual service using only copybook and payload mapping file.
    Best Answer

    Posted Jan 16, 2017 09:44 AM
      |   view attached

    Hi Akshayman,

     

    The Payload file mapping, should contain the details of the element from request and response copybook. The mapping details will also contain the element value(this has to be static and common in all Request/Response files), its start and end length in the request and response pair. Attaching the modified payload mapping file. Please place it under the same folder structure which contains the copybooks. Let me know if this helps.

     

    Regards,

    Monalisa Nayak

    Attachment(s)

    zip
    mapping.xml.zip   431 B 1 version


  • 7.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Jan 16, 2017 10:18 AM

    Excellent input Monalisa.Nayak   

     

    Akshayman Typically, we see a mainframe interface flow through some type of gateway (i.e., IMS Connect, CICS Link, or CICS Gateway). Because of the absence of any of these details, your scenario implies that you are virtualizing a layer in front of the actual gateway (transport) -- which is OK. 

     

    Generally, something in the request payload or headers contains some type of IMS or CICS transaction ID to enable the mainframe to execute the proper transaction.  In the mapping.xml, we often use this Txn ID, as well as other fields in the request, to identify the correct copybook for mapping.  

     

    My caution is that if your plan is for this service to eventually stand-in for one of the gateway transport protocols, your HTTP-based VSM and copybook mapping is likely to experience issues.  



  • 8.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Jan 17, 2017 04:00 AM

    Bingo Monalisa. 

    Thank you for the mapping file , attached mapping file is working as expected. 

     

    Thanks

    Akshay M. 



  • 9.  Re: How to create virtual service using only copybook and payload mapping file.

    Posted Sep 04, 2018 08:01 AM

    Hi Monalisa,

     

    I am also  facing the same issue which akshayaman was facing but here i am using the transport protocol as 'IMs connect' and i am getting error while creating the VSM. PFB error message :

     

    java.lang.RuntimeException: Unexpected end of stream.at com.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectProcessor.updateResponse(IMSConnectProcessor.java:147)atcom.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectTransportProtocol.doIMSConnectProcessing(IMSConnectTransportProtocol.java:141)at com.itko.lisa.vse.stateful.protocol.ims.connect.IMSConnectTransportProtocol.updateTransactionFromRequestResponsePair(IMSConnectTransportProtocol.java:532)at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.updateTransactionFromDelegateTPH(VSFromRRPairsTransportProtocol.java:242)at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.recordTransactionsFromRRTxns(VSFromRRPairsTransportProtocol.java:220)at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.doImportOnPath(VSFromRRPairsTransportProtocol.java:196)at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.doImport(VSFromRRPairsTransportProtocol.java:167)at com.itko.lisa.vse.stateful.protocol.rrpairs.VSFromRRPairsTransportProtocol.beginRecordProcess(VSFromRRPairsTransportProtocol.java:140)
    at com.itko.lisa.vse.stateful.protocol.TransportProtocol.startRecording(TransportProtocol.java:645)
    at com.itko.lisa.vse.stateful.recorder.RecordingPanel.startRecording(RecordingPanel.java:266)
    at com.itko.lisa.vse.stateful.recorder.RecordingPanel.activate(RecordingPanel.java:219)
    at com.itko.lisa.gui.WizardPanel.stateChange(WizardPanel.java:587)
    at com.itko.lisa.gui.WizardPanel.nextStep(WizardPanel.java:446)
    at com.itko.lisa.gui.WizardPanel.next(WizardPanel.java:435)
    at com.itko.lisa.gui.WizardPanel$7.actionPerformed(WizardPanel.java:343)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

     

    Thanks,

    Girija