POST with form params

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

POST with form params

#1

Postby Steve James » Fri Nov 17, 2017 2:49 pm

Hi, I'm trying to call a internal REST endpoint . Something I do fairly often.

The difference this time is the form parameters make the rest call too long for a GET so I'm having to POST. The endpoint is also HTTPS.

As it is internal I do not need to go across our proxy. I am getting the following error that I an't resolve.
Wrapped 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 (getUSRNbyWardJS#87)
I've attached the error log.

Any help gratefully received.
Attachments
SSLError.zip
(2.13 KiB) Downloaded 245 times
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: POST with form params

#2

Postby Steve » Fri Nov 17, 2017 3:36 pm

Hi Steve,

I am pretty sure that you do not have the trusted CA cert in your trust store. You will need to export the certificate and add the certificate to your JRE cacerts file.

First list all the certificates in your cacerts file:

<ebase-install-dir>/jre/bin/keytool -list -v -keystore $JA<ebase-install-dir>/jre/lib/security/cacerts

Second export the certificate:

1) Open the URL in Firefox and click on the padlock.
2) Click the More Information.
3) Click on the View Certificate button on the security tab
3) Click on the Details tab and export the Primary Root CA and/or any other certificates that you do not think are in your cacerts file.

Thirdly import the missing certificates into your cacerts file:

1) Backup the file: <ebase-install-dir>\jre\lib\security\cacerts
2) Copy the new certificate(s) into the cacerts file using the following command:

<ebase-install-dir>\jre\\bin\keytool -import -noprompt -trustcacerts -alias <AliasName> -file <certificate> -keystore <ebase-install-dir>\jre\lib\security\cacerts -storepass <Password>

Note that you can call the alias name anything that you like and the default password for cacerts is changeit

Restart the server and this should work.

I hope this helps

Steve
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Re: POST with form params

#3

Postby Steve James » Mon Nov 20, 2017 12:42 pm

Thanks Steve. Looks like I got there.

I was struggling with the POST call as well. I'm normally ok to do a GET but worked out my errors 8)

Thanks
Steve
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Re: POST with form params

#4

Postby Steve James » Fri Jan 26, 2018 12:02 pm

.
0 x


Who is online

Users browsing this forum: No registered users and 5 guests