Service Virtualization

  • 1.  DevTest Rest API DeployMar Issue - Postman Rest Client

    Posted May 12, 2016 05:03 PM

    Hi All,

     

    I am trying to deploy MAR file with the help of REST APIs from POSTMAN tool but getting issue related to Jersey. It seems there is a bug in Jersey service implementation in the DevTest tool.

    I am trying to deploy the MAR file on the VSE which is running on different host. I am setting up form-data as a file by browsing a MAR file but getting error.

     

    Here is my URL, Header and Body details :

     

    POST http://localhost:1505/api/Dcm/VSEs/VSE/actions/deployMar \

    header :

         authorization: Basic QzgzODU1HfHgTdRdEdTfTdfUiExNg=='

    Body :

         form-data : 'body=@/usr/local/soapservice.mar'

     

    The error I am getting -

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <Error xmlns="http://www.ca.com/lisa/invoke/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ca.com/lisa/invoke/v2.0 Error.xsd" type="application/vnd.ca.lisaInvoke.error+xml">

        <Id>1003</Id>

        <Message>File is not provided</Message>

        <AdditionalInformation>&#xD;

      com.itko.lisa.invoke.api.exception.BadRequestException: File is not provided

      at com.itko.lisa.invoke.ParamterUtils.getInputStream(ParamterUtils.java:74)

      at com.itko.lisa.invoke.resource.VseResource.deployService(VseResource.java:1041)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

     

    Your help will be appreciated. Thanks.



  • 2.  Re: DevTest Rest API DeployMar Issue - Postman Rest Client
    Best Answer

    Posted May 15, 2016 06:56 PM

    This issue was related to POST request body form-data parameter. Finally I decompile DevTest API Jars and find out the parameters required for deployMar REST call. The parameter "file" is mandatory.

     

    Thanks.