Service Virtualization

  • 1.  Response attribute of one step in request attribute of next step

    Posted Feb 16, 2018 05:24 AM

    In my teat case step can i use my one of the SOAP response attributes in the SOAP request of next step ?



  • 2.  Re: Response attribute of one step in request attribute of next step

    Posted Feb 16, 2018 07:04 AM

    Yes, you can. 

    Add a filter on the step that has the answer that you want. The filter will pass the value to a property. Use the property in the next step.

     

    Regards,

    Francis



  • 3.  Re: Response attribute of one step in request attribute of next step

    Posted Feb 16, 2018 10:16 AM

    Thank you. But, I don't want to save the whole response here so which filter am i suppose to use.?



  • 4.  Re: Response attribute of one step in request attribute of next step
    Best Answer

    Broadcom Employee
    Posted Feb 16, 2018 10:52 AM

    You can use XML XPath filter if it is an XML response and that should help you. Documentation on the XML XPath Filter is available at  XML XPath Filter - DevTest Solutions - 10.2 - CA Technologies Documentation.

     

     If the XML XPath filter doesn't help then try any other filter. The documentation on all filters is available at Filter Descriptions - DevTest Solutions - 10.2 - CA Technologies Documentation .



  • 5.  Re: Response attribute of one step in request attribute of next step

    Posted Feb 19, 2018 11:56 AM

    @Prema Thank you.

     

    I used the XML Xpath filter but my node has the value <cidPersID>+00542798134</cidPersID> but i need only the value not +. I used the following /text() xpath it gives whole value i.e +00542798134 but i need only 00542798134. Is there a way



  • 6.  Re: Response attribute of one step in request attribute of next step

    Broadcom Employee
    Posted Feb 19, 2018 12:40 PM

    You should be able to use the substring function on your xpath.

     

    E.g. 

     

    substring(/cidPersID/text(),2) to get 00542798134



  • 7.  Re: Response attribute of one step in request attribute of next step

    Posted Feb 19, 2018 12:56 PM

    @Prem I tried this it's not working.



  • 8.  Re: Response attribute of one step in request attribute of next step

    Broadcom Employee
    Posted Feb 19, 2018 02:04 PM

    what was your original path which gave +00542798134 ?

     

    I don't have your complete xml payload - but substring(//cidPersID/text(),2) should work assuming there is a single cidPersID in the XML response.

     

    What version of Devtest are you working with?



  • 9.  Re: Response attribute of one step in request attribute of next step

    Posted Feb 20, 2018 05:13 AM

    @Prem,

    Pasted xml below. I am using 7.5.2 version of Lisa.

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header />
    <soap:Body>
    <ns2:activateProductArrangementResponse xmlns:ns2="http://LIB_SIM_SalesProcessManagement/IA_ActivateProductArrangement" xmlns:ns3="http://www.lloydstsb.com/Schema/Infrastructure/SOAP" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns5="http://www.lloydstsb.com/Schema/Enterprise/LCSM">
    <activateProductArrangementResponse>
    <header>
    <interactionId>Cvs8UDsL4MLkOudkivqSs5Y</interactionId>
    <businessTransaction>activateProductArrangement</businessTransaction>
    <productArrangement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns7="http://LIB_SIM_BO/BusinessObjects" xsi:type="ns7:DepositArrangement">
    <arrangementType>CA</arrangementType>
    <applicationStatus>1010</applicationStatus>
    <arrangementId>319402</arrangementId>
    <accountNumber>45479568</accountNumber>
    <associatedProduct>
    <productIdentifier>92</productIdentifier>
    <productoffer>
    <template>
    <templateIdentifier>7</templateIdentifier>
    <systemCode>00010</systemCode>
    <externalTemplateIdentifier>CA_WELCOME_MSG_PDF</externalTemplateIdentifier>
    </template>
    </productoffer>
    <productName>ABC</productName>
    <instructionDetails>
    <instructionMnemonic>P_CLASSIC</instructionMnemonic>
    </instructionDetails>
    <associatedFamily>
    <extsysprodfamilyidentifier>
    <productFamilyIdentifier>502</productFamilyIdentifier>
    </extsysprodfamilyidentifier>
    </associatedFamily>
    <orderIdentifier>720165275</orderIdentifier>
    </associatedProduct>
    <primaryInvolvedParty>
    <emailAddress>a@c.co</emailAddress>
    <postalAddress>
    <statusCode>ABC</statusCode>
    <isPAFFormat>true</isPAFFormat>
    <durationofStay>0505</durationofStay>
    <structuredAddress>
    <subBuilding>FLAT 103</subBuilding>
    <buildingNumber>35</buildingNumber>
    <addressLinePAFData>INDESCON SQUARE</addressLinePAFData>
    <district>POPLAR</district>
    <postTown>LONDON</postTown>
    <country>United Kingdom</country>
    <postCodeOut>E14</postCodeOut>
    <postCodeIn>9DR</postCodeIn>
    <pointSuffix>1E</pointSuffix>
    </structuredAddress>
    </postalAddress>
    <telephoneNumber>
    <countryPhoneCode>44</countryPhoneCode>
    <phoneNumber>1234567890</phoneNumber>
    <telephoneType>7</telephoneType>
    </telephoneNumber>
    <isRegisteredIn />

    <customerIdentifier>648121905</customerIdentifier>

    <existingAccountDuration>0000</existingAccountDuration>
    <cidPersID>+00542798134</cidPersID>
    <hasExistingCreditCard>false</hasExistingCreditCard>
    <isRegistrationSelected>false</isRegistrationSelected>
    <customerSegment>3</customerSegment>
    <customerNumber>30135413406907</customerNumber>
    <otherBankDuration>0000</otherBankDuration>
    <cbsCustomerNumber>30135413406907</cbsCustomerNumber>
    <newCustomerIndicator>true</newCustomerIndicator>
    <isAuthCustomer>false</isAuthCustomer>
    <taxResidencyDetails>
    <taxResidencyCountries>GBR</taxResidencyCountries>
    </taxResidencyDetails>
    </primaryInvolvedParty>

    <marketingPreferenceBySMS>true</marketingPreferenceBySMS>
    <isJointParty>false</isJointParty>
    <applicationType>10001</applicationType>

    <marketingPreferenceByEmail>true</marketingPreferenceByEmail>
    <marketingPreferenceByPhone>false</marketingPreferenceByPhone>
    <marketingPreferenceByMail>true</marketingPreferenceByMail>
    <SIRAEnabledSwitch>true</SIRAEnabledSwitch>
    <isOverdraftRequired>true</isOverdraftRequired>

    </productArrangement>
    <resultCondition>
    <extraConditions>
    <conditions>
    <reasonCode>0</reasonCode>
    </conditions>
    </extraConditions>
    </resultCondition>
    </activateProductArrangementResponse>
    </ns2:activateProductArrangementResponse>
    </soap:Body>
    </soap:Envelope>



  • 10.  Re: Response attribute of one step in request attribute of next step

    Broadcom Employee
    Posted Feb 20, 2018 11:02 AM

    I was not able toc create any XPath filter on the above XML. I took only the below and able to create XPath Filter using substring on "+00542798134".

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header />
    <soap:Body>
    <existingAccountDuration>0000</existingAccountDuration>
    <cidPersID>+00542798134</cidPersID>
    <hasExistingCreditCard>false</hasExistingCreditCard>
    <isRegistrationSelected>false</isRegistrationSelected>
    <customerSegment>3</customerSegment>
    <customerNumber>30135413406907</customerNumber>
    <otherBankDuration>0000</otherBankDuration>
    <cbsCustomerNumber>30135413406907</cbsCustomerNumber>
    <newCustomerIndicator>true</newCustomerIndicator>
    <isAuthCustomer>false</isAuthCustomer>
    </soap:Body>
    </soap:Envelope>

     

    I used the XPath  "substring(string(/soap:Envelope/soap:Body/cidPersID),2)" to get the value as "00542798134"