Question
· Nov 1, 2019

How to add HTTPS to existing web service that uses HTTP.

Hello!  I have basic web services application that java clients connect to the cache web services.  Using the browser, the user enters in the following url.

http://localhost:57772/csp/foia/%25SOAP.WebServiceInvoke.cls?CLS=SOAPFoia.SOAPServiceFoiaWeb&OP=FoiaApp30
'

which runs a soap method called FoiaApp30.   I am not sure how to add https  security to the web service calls.  I have reviewed documentation pertaining configuring SST/TTL configuration and other information.   Can somebody please help me out on what I need to do?   If I change the url  from http to https, the web service class will not work.  The web service class is similar to the following example.   Also if I configure SST/TTL in the configuration setting under management section, I am not sure how to add the information to the web service.

 

Class MyApp.StockService Extends %SOAP.WebService
{

/// Name of the WebService.
Parameter SERVICENAME = "StockService";

/// TODO: change this to actual SOAP namespace.
/// SOAP Namespace for the WebService
Parameter NAMESPACE = "http://tempuri.org";

/// Namespaces of referenced classes will be used in the WSDL.
Parameter USECLASSNAMESPACES = 1;

/// This method returns tomorrow's price for the requested stock
Method Forecast(StockName As %String) As %Integer [WebMethod]
{
    // apply patented, nonlinear, heuristic to find new price
    Set price = $Random(1000)
    Quit price
}
}

Discussion (4)2
Log in or sign up to continue

Thanks Jenna for your help.  The sample URL  that I provided was example.  The only difference with the actual URL is that the local host is replaced with the actual server name.  The java client connects to cache web service through an internet connection.

 I am aware that the server needs to be configure to handle SSL which is new to me.  There is a lot of information in regards to how to set that up with the certificate.  I am not sure how to connect the URL to  SSL connection.  Unfortunately I have not found a simple example

to go by in try to set it up.  As for creating a web service, I was able to do that base on an example.