Service Virtualization

  • 1.  Patch Method for Rest over HTTPS

    Posted Jun 28, 2017 12:12 PM
      |   view attached

    REST call with method "PATCH"

    Hi All,

    I am trying to using the code from the above mentioned link for Patch method for rest call over Https but I am getting SSL error. However, using inbuild  DevTest Rest step all the methods are working fine and I am not getting any SSL issue. I have not installed/configured any specific SSL certs DevTest, I believe is using default SSL certs only and handshake is successful.

     

    However, while using the code from the above link in javascript step I am getting below SSL error:

    Message:     Sourced file: inline evaluation of: ``import okhttp3.MediaType;  import okhttp3.OkHttpClient;  import okhttp3.Request; . . . '' : Typed variable declaration : Method Invocation execute : at Line: 62 : in file: inline evaluation of: ``import okhttp3.MediaType;  import okhttp3.OkHttpClient;  import okhttp3.Request; . . . '' : .execute ( )

    Target exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

     

    Attaching a complete stack trace.

     

    Any help will be much appreciated.

    Attachment(s)

    zip
    SSL Stack Trace.txt.zip   15 KB 1 version


  • 2.  Re: Patch Method for Rest over HTTPS
    Best Answer

    Posted Jul 11, 2017 06:07 PM

    Hi,

     

    So I did have a look at your attachment,  and it looks like the certificate that is being sent to the server is being rejected from the client,  so the client's certificate should be in the server's trust store.  If you are using the self signed certificate that comes with devtest,  you might want to reach out to your administration team for a certificate that you can use with your DevTest installation

     

    If you continue to have issues,  please open a support ticket and we will be happy to assist.