Service Virtualization

 View Only
  • 1.  How VSI Service Stop/Start from HTTP API ?

    Posted May 01, 2017 01:47 PM

    Hi ,

     

      I am trying to start and stop the service from VSE through HTTP API. When I am doing that I am getting error "405 Method Not Allowed". Please help me how we can invoke through API?

     

    DevTest Version :  9.0 

     

    HTTP API : http://{{servername}}:1505/api/Dcm/VSEs/VSE/test_Services/actions/stop 

       http://{{servername}}:1505/api/Dcm/VSEs/VSE/test_Services/actions/start

     

    Error: 

    <?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>1008</Id><Message>Method Not Allowed</Message><AdditionalInformation>&#xD;
    javax.ws.rs.WebApplicationException&#xD;
    at com.sun.jersey.server.impl.uri.rules.TerminatingRule.accept(TerminatingRule.java:66)&#xD;
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)&#xD;
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)&#xD;
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)&#xD;
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)&#xD;
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)&#xD;
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)&#xD;
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)&#xD;
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)&#xD;
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)&#xD;
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)&#xD;
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)&#xD;
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)&#xD;
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)&#xD;
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)&#xD;
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)&#xD;
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)&#xD;
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)&#xD;
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)&#xD;
    at com.itko.lisa.invoke.AuthenFilter.doFilter(AuthenFilter.java:241)&#xD;
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)&#xD;
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)&#xD;
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)&#xD;
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)&#xD;
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)&#xD;
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)&#xD;
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)&#xD;
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)&#xD;
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)&#xD;
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)&#xD;
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)&#xD;
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)&#xD;
    at org.eclipse.jetty.server.Server.handle(Server.java:517)&#xD;
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306)&#xD;
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)&#xD;
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)&#xD;
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)&#xD;
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)&#xD;
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)&#xD;
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)&#xD;
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)&#xD;
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)&#xD;
    at java.lang.Thread.run(Unknown Source)&#xD;
    &#xD;
    </AdditionalInformation></Error>



  • 2.  Re: How VSI Service Stop/Start from HTTP API ?
    Best Answer

    Posted May 01, 2017 06:21 PM


  • 3.  Re: How VSI Service Stop/Start from HTTP API ?

    Posted May 01, 2017 09:57 PM

    Are you calling the correct ports? 



  • 4.  Re: How VSI Service Stop/Start from HTTP API ?

    Posted May 01, 2017 10:40 PM

    I have tried calling the GET VSE API on the port 1505 with username/password via DevTest Workstation, and it is showing me "No Data".

     

    Maybe you can check if there is any authorization required?



  • 5.  Re: How VSI Service Stop/Start from HTTP API ?

    Posted May 01, 2017 10:45 PM

    Error.xsd" type="application/vnd.ca.lisaInvoke.error+xml"><Id>1008</Id><Message>Method Not Allowed</Message>

     

    Above error message clearly indicate incorrect HTTP verb/method being used as schema validation itself failed. 

     

    As suggested above please use correct correct HTTP Verbs whiling using Invoke API. 

     

    Thanks, 

    Rajesh k Singh



  • 6.  Re: How VSI Service Stop/Start from HTTP API ?

    Posted May 02, 2017 12:38 AM

    It is working fine with POST action. Thanks for everyone.