javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated for
Worklight HTTPS request
I am trying to request google maps service through my worklight adapter. I
am using HTTPS for the first time. Here is my XML file
<wl:adapter name="GoogleMapApi"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.worklight.com/integration"
xmlns:http="http://www.worklight.com/integration/http">
<displayName>GoogleMapApi</displayName>
<description>GoogleMapApi</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>maps.googleapis.com</domain>
<port>80</port>
<!-- Following properties used by adapter's key manager for
choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getListOfBanks"/>
</wl:adapter>
And my implementation is
function getListOfBanks(latitude, longitude)
{
var input={
method:'get',
returnContentType:'JSON',
path:'/maps/api/place/nearbysearch/json?&sensor=false&location='+latitude+','+longitude+'&radius=50000&types=bank&name=bank&key=AIzaSyAvK-cXlRIptgo3e5SrAc62wDJfcOQD0so',
};
return WL.Server.invokeHttp(input);
}
What the service does is that if we feed the current latitude and
longitude, it gives us banks as JSON objects. Google has given me SSL key,
but I don't know if I am using it correct. By the way when I use the URL
on my browser it is listing me with the objects.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?&sensor=false&location=38.9714,-77.386&radius=50000&types=bank&name=bank&key=AIzaSyAvK-cXlRIptgo3e5SrAc62wDJfcOQD0so
No comments:
Post a Comment