Connecting to a secure webService
Hello All,
I am working on creating a custom application for FMS 3.0 that calls a webservice to validate the user coming in. I have tested the following sample code from the Server-Side ActionScript Language Ref. (See below) The URL has been changed to protect the innocent.
This codes seems to work fine when going to an unsecured site but the innvocation of the service never seems to go out when attempting it over SSL. The Server documentation says that outgoing calls like this should work over SSL. Is this true? If so what do I need to do to get it to work?
Thanks for your time,
-John
Example Code:
try
{
var wsdURI = "https://<serverName>/<url>?WSDL";
stockService = new WebService(wsdURI);
//Handle failed load of wsdl
stockService.onFault = function(fault){
app.logMessage(fault.faultstring);
}
}
catch(e)
{
app.logError("An error occurred loading the wsdl.");
}
app.logMessage("After wsdl load. Before invocation of service");
// Method invocations return an asynchronous callback
callback2 = stockService.Message("gobbledygook");
// Note: callback is undefined if the service itself is not created
// (and service.onFault is also invoked.")
app.logMessage("After invocation.");
// Handle a successful result
callback2.onResult = function(result){
// Receive the SOAP output
app.logMessage("web service call successfully called.");
app.logMessage(result);
}
callback2.onFault = function(fault){
app.logMessage("web service call is a big fail dog.");
app.logMessage(fault.faultstring);
}
