Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   service unavailable (http://www.go4expert.com/forums/service-unavailable-t1118/)

mariechristine 3Aug2006 15:50

service unavailable
 
I am trying to invoke a webservice from javascript.

When I work locally (html and javascript on my PC) calling the webservice on a remote pc, it is successfully working. However, when I put the htm & javascript on another pc and I open the page using ip of other pc, I am getting "Service unavailable" error!

Do you have any idea?


The following is the code I am using:
HTML Code:

<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function init()
{
service.onServiceAvailable = alertReady;
service.useService("http://webservices.codingtheweb.com/bin/qotd.wsdl","quote");
}

function alertReady() {
alert("Ready");
}

function getQuote() {
service.quote.callService(onmyresult,"getQuote");
}

function onmyresult(result)
{
if (!result.error) {
service.innerHTML = result.value;
}else{
service.innerHTML = "Error: " + result.errorDetail.code + " " + result.errorDetail.string + " " + result.errorDetail.raw;
}
}
</SCRIPT>
</HEAD>
<BODY onload="init()">
<button onclick="getQuote()">Get Quote of the Day</button>
<div id="service" style="behavior:url(htc/webservice.htc)"></div>
</BODY>
</HTML>

:(

shabbir 3Aug2006 18:15

Re: service unavailable
 
Please do not post your queries under the Articles and source code section.

Duplicate of service unvailable. Thread closed.


All times are GMT +5.5. The time now is 17:05.