Service Virtualization

  • 1.  Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 20, 2017 03:50 AM
      |   view attached

    Hi,

    DevTest Solutions 9.5.1: I have created a VS using RR pair(EBCDIC format- Mainframe system over MQ- IBM MQ Native protocol) but getting " <bodyAsString>The request failed to produce a response for the virtual service to reply with.</bodyAsString>" error in VSI step.  Please do the needful.. thanks

     

    Steps to create a VS:

    Transport Protocol: IBM MQ Native

    Request Side Data Protocol: Added Copybook DataProtol, Generic XML payload parser

    Response Side Data Protocol: Added Copybook DataProtol

    Configure How to Parse the Copybook Payloads: Selected Copybook file definition folder, Payload to file definition map path 

     

    Outcome:

     

    Virtual Service Image Response Selection response:

    <java.util.Arrays_-ArrayList>
      <a class="TransientResponse-array">
        <TransientResponse xmlns="http://www.ca.com/com/itko/lisa/vse/stateful/model/v1.0">
          <id>0</id>
          <binary>false</binary>
          <charset>UTF-8</charset>
          <metaData>
            <p key="channel.name">Response 1</p>
          </metaData>
          <body>
            <bodyAsString>The request failed to produce a response for the virtual service to reply with.</bodyAsString>
          </body>
          <unknown>true</unknown>
          <thinkTimeSpec>0</thinkTimeSpec>
        </TransientResponse>
      </a>
    </java.util.Arrays_-ArrayList>

     

     

    lisa.vse.request:

     

    <Request xmlns="http://www.ca.com/com/itko/lisa/vse/stateful/model/v1.0">
      <id>0</id>
      <binary>false</binary>
      <charset>UTF-8</charset>
      <metaData>
        <p key="msg.characterSet">819</p>
        <p key="msg.format">MQSTR</p>
        <p key="msg.messageId">414D5120444944495230323520202020ED5836599B62CA20</p>
        <p key="msg.putApplicationName">C:\Program</p>
        <p key="msg.priority">0</p>
        <p key="msg.userId">mqlisa</p>
        <p key="msg.putApplicationType">28</p>
        <p key="msg.persistence">0</p>
        <p key="msg.putDateTime">1505892141100</p>
        <p key="Payload.class">Bytes</p>
        <p key="channel.name">Request 1</p>
      </metaData>
      <body>
        <bodyAsString>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#xd;
    &lt;copybook-payload&gt;
      &lt;unknown-copybook&gt;53444D4845414452303031434E534D5250524F46202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204D4353434E534D5250524F462020202020202020202020202020202020202020303031303030303030303030202020202020200F4D4353494E5141505320202020202020202020202020202020202020202020203030313030303030303030302020202020202020200F20202020202020202020202020202020202020202020202020202020202020204D5120393937303137333233352020202020202020202020202020202020202020202039393730313733323335202020202020202020202020202020202020202020203030303030303030303030303030307B204649435320202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204E414220202020202020202020202020202020202020202020202020202020204155444E414220202020202020202020202020202020202020202020202020202020202030303020303030303030303030303030303030303030202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030307B20202020202020202020202020202020202020202020203939373031373332333520202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204649435320202020202030303030303039393930303030303030303020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202031&lt;/unknown-copybook&gt;
    &lt;/copybook-payload&gt;</bodyAsString>
      </body>
      <arguments>
        <p key="test">unknown-copybook</p>
      </arguments>
      <attributes>
        <p key="recorded_raw_request_bytes">U0RNSEVBRFIwMDFDTlNNUlBST0YgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUNTQ05TTVJQUk9GICAgICAgICAgICAgICAgICAgICAwMDEwMDAwMDAwMDAgICAgICAgD01DU0lOUUFQUyAgICAgICAgICAgICAgICAgICAgICAgMDAxMDAwMDAwMDAwICAgICAgICAgDyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVEgOTk3MDE3MzIzNSAgICAgICAgICAgICAgICAgICAgICA5OTcwMTczMjM1ICAgICAgICAgICAgICAgICAgICAgIDAwMDAwMDAwMDAwMDAwMHsgRklDUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTkFCICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBVUROQUIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMDAgMDAwMDAwMDAwMDAwMDAwMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMHsgICAgICAgICAgICAgICAgICAgICAgIDk5NzAxNzMyMzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJQ1MgICAgICAwMDAwMDA5OTkwMDAwMDAwMDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAx</p>
      </attributes>
      <matchTolerance>Exact</matchTolerance>
      <operation>Request 1</operation>
    </Request>

     

    Thanks,

    Narasimha

    Attachment(s)



  • 2.  Re: Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 20, 2017 01:35 PM

    Before addressing the unknown response side issue, are you certain the request is mapping correctly? 

     

    The mapping definition file upload is set to perform a matchType "all" which means arguments, attributes, meta data, operation, and request payload will be analyzed; however, there are some specific rules that apply.  

    See: Payload Mapping File - DevTest Solutions - 10.1 - CA Technologies Documentation  

     

    From the posted information and mapping definition, I do not see values that map to key="COMPANY-NAME" (which matches on attributes, arguments, and meta data) 

      <metaData>
        <p key="msg.characterSet">819</p>
        <p key="msg.format">MQSTR</p>
        <p key="msg.messageId">414D5120444944495230323520202020ED5836599B62CA20</p>
        <p key="msg.putApplicationName">C:\Program</p>
        <p key="msg.priority">0</p>
        <p key="msg.userId">mqlisa</p>
        <p key="msg.putApplicationType">28</p>
        <p key="msg.persistence">0</p>
        <p key="msg.putDateTime">1505892141100</p>
        <p key="Payload.class">Bytes</p>
        <p key="channel.name">Request 1</p>
      </metaData>

     

    When converting the payload from hex to ascii, I did not see the mapping definition value="GCSInnovation" (which matches on operation and request payload) in the payload.  Blank characters replaced with "< >" in the request body shown below:

    SDMHEADR001CNSMRPROF < > MCSCNSMRPROF < > 001000000000 < >  MCSINQAPS < > 001000000000 < >   < > MQ 9970173235 < > 9970173235 < > 000000000000000{ FICS < > AUDNAB < > 000 000000000000000000 < > 000000000000000000000000000000000{ < > 9970173235 < > FICS < > 000000999000000000 < > 1

     

    Also, check keyStart and keyEnd values. You may be limiting the search area. 

     

    On the basis of the above, this leads me to believe that the "unknown-copybook" indicator means that the request did not map to a corresponding copybook file so the incoming request operation ended up as "unknown" resulting in an unknown stateless/stateful response.

     

    Any additional information you can provide here could be helpful to us.



  • 3.  Re: Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 20, 2017 09:06 PM

    Thanks for looking into this issue Joel. J_NeSmith

     

    I had only input, output copybooks, sample request and response pairs with me. I have created this sample payload mapping file by referring to one of the threads in CA communities.

     

    Following are the artifacts available with me:

     

    - Input Copybook (SDMKI214.txt)
    - Output Copybook (NHSAZB1C.txt)

    - Sample request and response pairs

     

    I have attached copybooks as well.

    Attachment(s)

    zip
    NHSAZB1C.txt.zip   1 KB 1 version
    zip
    SDMKI214.txt.zip   456 B 1 version


  • 4.  Re: Copybook Data Protocol: Not able to select any response in VSI step
    Best Answer

    Posted Sep 21, 2017 09:17 AM

    Your comment: "I had only input, output copybooks, sample request and response pairs with me."

     

    When you created your MQ R/R pairs, did you also include sidecar files?  Your R/R pairs only contain the body of the request / response. The sidecar provides the ability to add the request / response JMS header information.

    Refer here for some additional information:

    https://communities.ca.com/thread/241736401#comment-241822545

    Request/Response Pairs - DevTest Solutions - 10.1 - CA Technologies Documentation   

     

    In terms of the copybook mapping, you need to identify the request data content that will identify the copybook to DevTest. Perhaps, this data is a queue name or perhaps a value in the request has a specific piece of data that identifies a transaction name. Knowledge of the specific transactions is required to determine how the mapping will occur.

     

    Consider everything that follows as a sample to give an idea.

     

    Ensure the copybook_bundle.cbb file contains "startColumn":"6", "endColumn":"72" in its attributes. This tells the parser that the copybooks tagnames and picture clauses are standard Cobol layout. 

     

    Since you only have one request / response, use a simple mapping to identify the copybook. For example, indicate in the mapping.xml file that a value of SDMHEADR001 indicates to use the SDMKI214 copybook. In the long term, this will probably change, but to try to get a sample mapping working, create a copy of your mapping file that looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <payloads>
      <payload name="TEST" type="request" matchType="all" key="COMPANY-NAME" value="SDMHEADR001" definesResponse="true">
        <section name="requestBody">
          <copybook key="CPY1" order="1" max="1">SDMKI214.txt</copybook>
        </section>
      </payload>
      <payload name="TEST" type="response" matchType="payload" key="STATUS" value="SUCCESS">
        <section name="responseBody">
          <copybook key="CPY1" order="1" max="1">NHSAZB1C.txt</copybook>
        </section>
      </payload>
    </payloads> 

     

    I did not see a cobol tagname in the response copybook, NHSAXB1C, that looks like it carries a value of "SUCCESS". I see a CSTPROFO-RSP-CD, but this field is only 3 characters long.  Hopefully, your response contains the value "SUCCESS" in it somewhere; otherwise, the "value=" in the response-side mapping will need to contain some other value.

     

    You may need to open a ticket with CA Support to get the entire flow to work.  



  • 5.  Re: Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 22, 2017 01:09 AM

    Thanks a lot for your inputs Joel, I will open a case to sort out the issue.



  • 6.  Re: Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 25, 2017 10:13 PM

    Hi Joel,

    One quick question on this- when I create VS using RR pair(which I have shared in this conversation), will DevTest convert the request to XML format on Stateless Transactions screen and Remaining Transactions screen?

     

     

     

    Thanks,

    Narasimha.



  • 7.  Re: Copybook Data Protocol: Not able to select any response in VSI step

    Posted Sep 26, 2017 09:07 AM

    Hi Narasimharao, the copybook DPH should convert the payload into an XML representation for both stateful and stateless transactions. It still looks as if there is an issue parsing the request.