Service Virtualization

 View Only
  • 1.  Help on Matching logic for XML Transactions

    Posted Jun 21, 2019 04:07 PM
    Hi All - this is first post to the group.  Hope, some of you may have experience this issue and found a suitable solution.

    Key Ask - I have a dynamic XML request, for which i need to send a standard XML response.  In the dynamic incoming request, i am trying to validate only few tags rather than validating all the tags. It seems, CA virtualization tool always matches the incoming XML against the recorded XML and if XML structure and tags does't match then returns the error response.

    I have tried with Signature as well as Exact matching logic and the result is same.

    I also tried following data protocols, and the results still the same.
    1. Web services(SOAP)
    2. XML Data Protocol
    3. XML Data Protocol + Generic XML data parser
    4. Web Services (SOAP) + Generic XML Data Parser


    So, any help would be really appreciated, as this is been pending for a while.  Need to find out a right solution ASAP.

    ------------------------------
    Vasu
    ------------------------------


  • 2.  RE: Help on Matching logic for XML Transactions

    Posted Jun 21, 2019 05:01 PM
      |   view attached
    Just to add, our input request is XML with SOAP header. attached the sample with no data - just the tags.  

    I need to validate the request based on the following tags alone,
    <ST01__TransactionSetIdentifierCode>270</ST01__TransactionSetIdentifierCode>
    <ST02__TransactionSetControlNumber>str1234</ST02__TransactionSetControlNumber>
    <NM103__InformationSourceLastOrOrganizationName>str1234</NM103__InformationSourceLastOrOrganizationName>

    If these tags are there in the coming request then send the response otherwise send error.  

    In all the data protocol- tools compares all the tags rather than these three tags. Where as in Operation mode - tool just compares the operation name i.e. X12_005010X279A1_270B1 which is same for all incoming requests.

    Attachment(s)

    xml
    sample.xml   30 KB 1 version


  • 3.  RE: Help on Matching logic for XML Transactions
    Best Answer

    Posted Jun 22, 2019 01:38 PM
    Hi Vasu,

    The Request Data Manager DPH - using the "keep" action - is basically the solution for your requirement of matching only on a few arguments instead of all of them.

    In your case I would define the virtual service with following DPHs
    - SOAP DPH
    - Request Data Copier DPH
    - Request Data Manager DPH (using 3 keep statements, one for each of your validating tags)

    The Request Data Copier I would add to copy all of your arguments into properties BEFORE the "keep" actions in the RDM DPH deletes them. That way you can still use all of the request arguments as dynamic data in your responses should you need that.

    Cheers,
    Danny 



    ------------------------------
    Cheers,
    Danny
    ------------------------------