Service Virtualization

  • 1.  REST Service - Parse incoming mutipart/form-data request in VSM ?

    Posted Jun 27, 2016 10:55 AM

    Hi All,

    I am looking for a solution to send zip file to the REST virtual service and trying to save the file on registry server. Any suggestion would be helpful.

    Thanks.



  • 2.  Re: Provide ZIP file to the REST Virtual Service and process it

    Posted Jun 27, 2016 11:03 AM

    Hi AVSDevTest,

     

    I see that you entered this question as a discussion. I have converted this to a question for you. In the future, please be sure to select "question" from the create drop down when asking a question!

     

    Thanks,

    Melanie



  • 3.  Re: Provide ZIP file to the REST Virtual Service and process it

    Posted Jun 27, 2016 11:19 AM

    Sure Melanie. Thanks.



  • 4.  Re: REST virtual service to accept ZIP file as input and save it ?

    Posted Jun 28, 2016 12:00 PM

    Can anyone please suggest me the way to process incoming request with multipart/form-data in VSM ? Any groovy server side code will be helpful. Thanks.

     

    Here is my lisa.vse.request -

     

    <Request xmlns="http://www.ca.com/com/itko/lisa/vse/stateful/model/v1.0">

      <id>0</id>

      <binary>true</binary>

      <charset>UTF-8</charset>

      <metaData>

        <p key="HTTP-Method">POST</p>

        <p key="HTTP-URI">/upload-file</p>

        <p key="HTTP-Version">1.1</p>

        <p key="Host">localhost:8099</p>

        <p key="Connection">keep-alive</p>

        <p key="Content-Length">485</p>

        <p key="Cache-Control">no-cache</p>

        <p key="Origin">chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop</p>

        <p key="Content-Type">multipart/form-data; boundary=----WebKitFormBoundaryJYiKG84nBm7GuuaO</p>

        <p key="User-Agent">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</p>

        <p key="Postman-Token">3cc20c15-3148-4cd7-1c00-c7a19524bca8</p>

        <p key="Accept">*/*</p>

        <p key="Accept-Encoding">gzip, deflate</p>

        <p key="Accept-Language">en-US,en;q=0.8</p>

        <p key="lisa.vse.request.client.id">127.0.0.1:62417</p>

      </metaData>

      <body>

          <bodyBytes>LS0tLS0tV2ViS2l0Rm9ybUJvdW5kYXJ5SllpS0c4NG5CbTdHdXVhTw0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9Imptcy1yc3AuemlwIg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXppcC1jb21wcmVzc2VkDQoNClBLAwQUAAAACADWWs5IIhZ44H4AAACmAAAACwAAAGptcy1yc3AudHh0PY0xDsIwDAB3JP4QZYfAxuCmAxIDUhcKDyjUlEiNjeIKwe+Joe1m31lnKN+xNy9MEpgKu11vrEG6cRuoK+zlfFjtbOmXC4go0nSo48D+WNVm3wekAVxeM7wnjj9cY8o5cApUPLDRmK/+AXAjUHfl9uNPKE8mQTNfKFbtpqdfUEsBAj8AFAAAAAgA1lrOSCIWeOB+AAAApgAAAAsAJAAAAAAAAAAgAAAAAAAAAGptcy1yc3AudHh0CgAgAAAAAAABABgAVShS+ljG0QEz2lH6WMbRAXtOSfpYxtEBUEsFBgAAAAABAAEAXQAAAKcAAAAAAA0KLS0tLS0tV2ViS2l0Rm9ybUJvdW5kYXJ5SllpS0c4NG5CbTdHdXVhTy0tDQo=</bodyBytes>

      </body>

      <arguments/>

      <attributes>

        <p key="HTTP-Segment-Attr-0">upload-file</p>

      </attributes>

      <matchTolerance>Exact</matchTolerance>

      <operation>POST /upload-file</operation>

    </Request>



  • 5.  Re: REST virtual service to accept ZIP file as input and save it ?

    Posted Jun 28, 2016 05:02 PM

    Hi DevTestUser, have you been implemented such kind of service. Can you provide some references. Thanks.



  • 6.  Re: REST virtual service to accept ZIP file as input ?

    Posted Jun 28, 2016 06:40 PM

    Hi, I have  not tried any kind of ZIP file or attachment in my VS .. Can you please share more details on what you trying to do.. do you want to send the ZIP file as attachment  from your VS to REST Call ?



  • 7.  Re: REST virtual service to accept ZIP file as input ?

    Posted Jun 29, 2016 12:16 PM

    Hi, I want to write a virtual service which will consume ZIP attachment from client and store it somewhere on registry host.



  • 8.  Re: REST virtual service to accept ZIP file as input ?

    Posted Jun 29, 2016 07:37 PM

    sorry have not got chance to work with this kind of service till now. may be check with CA experts