Service Virtualization

  • 1.  Not able to get Operation Name from Request?

    Posted Oct 03, 2017 06:28 AM

    Hi All,

     

    I am trying to create a virtual service through Request Response Pairs with the request as mentioned below.

    Also My requirement is to put a assertion in VSM based on Operation Name of the Incoming Request.However for the below mentioned I am not able to get the Operation name as "GetSubscriberOverviewForESPRequest" but I am getting "Envelope" as operation name .Please suggest.

     

    Request in VSI:

    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
    <GetSubscriberOverviewForESPRequest xmlns="http://services.kpn.com/GetSubscriberOverviewForESP">
    <RequestHeader xmlns="http://services.kpn.com/xsd/common/1.0">
    <TransactionId>00505695652611e7ef85cbdfb28d9750</TransactionId>
    <Channel>12</Channel>
    <TenantID>16</TenantID>
    <ProcessTime>2017-08-08T13:40:26</ProcessTime>
    <AccessUser>
    <AccessUserName>esp</AccessUserName>
    <AccessPassword>REDACTED</AccessPassword>
    </AccessUser>
    </RequestHeader>
    <RequestBody>
    <IdentifiedBy>
    <ServiceNumber>31683803115</ServiceNumber>
    </IdentifiedBy>
    </RequestBody>
    </GetSubscriberOverviewForESPRequest>
    </SOAP:Body>
    </SOAP:Envelope>

     

     

    In VSM,I am using below code so that I get back operatio name as "GetSubscriberOverviewForESPRequest " but I am not getting it.

     

    import com.itko.lisa.vse.stateful.model.Request;
    import com.itko.util.ParameterList;

    Request req = (Request) testExec.getStateValue("lisa.vse.request");
    String opName = req.getOperation();
    testExec.setStateValue("ReqOp",opName);

     

    Please suggest inputs.

     

    Thanks

    Sarthak



  • 2.  Re: Not able to get Operation Name from Request?
    Best Answer

    Posted Oct 03, 2017 07:30 AM

    Which data protocols are you using ? 
    I assume you will be using Web  Services(SOAP) protocol along with XML data protocol. 
    If so then sequence of this protocol is important. 

     

    Ensure the sequence as - 
    1.XML data protocol
    2.Web  Services(SOAP) 

     

    Regards,

    Akshay M. 



  • 3.  Re: Not able to get Operation Name from Request?

    Posted Oct 03, 2017 07:45 AM

    HI Akshay,

     

    Yes I am using Web  Services(SOAP) protocol along with XML data protocol but my sequence was :

     

    1.Web  Services(SOAP)

    2.XML data protocol

     

    Thanks for the solution.It worked for me.

     

    Thanks

    Sarthak Gupta