webservice.htc & https

B

Bart Malfait

Hi,

we want to access a webservice using https using webservices.htc (IE6). Is
this possible ?

Scenario: we've set up a server (W2K, .NET 1.1, latest SP's) with a
test-certificate (generated with makecert.exe). We also installed the
certificate as a trusted authority on the client (W2K, .NET 1.1, latest
SP's). Calling https://MyServer/ServiceTest/MyWebService.asmx?wsdl in the
client's IE succeeds. As expected, no pop-up anymore warning on an
unauthorized certificate. So far so good.

However, if we invoke the same URL in a piece of javascript in an html page,
using webservice.htc, we get a 'service not available' error. Replacing
'https' with 'http' succeeds. SSL-port is default on the server (443). Both
the javascript & webservice.htc are installed locally on the client (see
also below)

Any ideas what may go wrong are very appreciated !


----
FYI - client html page using webservices.htc:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 2</title>
</head>
<script>
var webServiceNameSpace;
var webService;

function loadWebService()
{
webServiceNameSpace = document.namespaces.add("webServiceNS",
"http://MyClient/Resources/webService");

webServiceNameSpace.doImport("http://MyClient/Resources/webservice.htc");

if (webServiceNameSpace != "complete") {
webServiceNameSpace .attachEvent("onreadystatechange",
createWebService);
}
else {
createWebService();
}
}

function createWebService()
{
var useOptions;

if (webServiceNameSpace .readyState == "complete")
{
webService = document.createElement("webServiceNS:webservice");
webService.id = "_servicegateway";
webService.visibility = "none";
document.appendChild(webService);
useOptions = webService.createUseOptions(true);

webService.useService("https://MyServer/ServiceTest/MyWebService.asmx?wsdl",
"myWebService", useOptions);
webService.myWebService.callService(handleResponse,
"HelloWorld");
}
}

function handleResponse(result)
{
alert(result.error);
}
</script>

<body onload = "loadWebService()"> ... </body>

</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top