Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2005

Tip: Looking for answers? Try searching our database.

is webservice.htc only compatible with .Net webservice?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
yudi - 01 Dec 2005 07:56 GMT
i tried to access webservice (it's not .net webservice) from javascript using
webservice.htc.
I got the problem in result, the result's always : 'service unavailbale'
so my question, is webservice.htc only compatible with .Net webservice?
because the problem's not in webservice, but in client side...
anyone can help me?
sory if i post in wrong thread.
Thanx, Yudi

Signature

ibnu_ws

Tasos Vogiatzoglou - 01 Dec 2005 08:24 GMT
Yes it is. I've used it extensively. Can you post the code you are
using ?
yudi - 01 Dec 2005 09:20 GMT
emm sorry i mean that i tried to access NuSOap webservice from javascript
using webservice.htc...

but when i try using it with javascript - i keep
getting
error.code   = Client
error.string = Service unavailable
error.raw    = null
!!!!!!!!!!!!!

this is the code
##################################
##########################

<script language="javascript">
// this function is called as soon as the page
loads (for testing)
function init() {
    // call the service - assign friendly name : "hello"
    service.useService("http://localhost/nusoap/server.php","hello");
    // call service with handleresult to show
                   service.hello.callService(handleResult,  "hello", "ITS ME!
");
}

function handleResult(res) {
    // if no errors - display results - should be  "Hello IT'S ME!"
    if (!res.error) { alert("Successful call. Result  is " + res.value); }
    // display errors
    else if(res.error){ alert( "You F***** UP" + "\n" + res.errorDetail.code + "\
n" + res.errorDetail.string + "\n" + res.errorDetail.raw); }
    // if something wierd happens
    else { alert("Something else fired the event!
"); }
}
</script>
</head>
<!-- load the init function and call webservice at
page load -->
<body onload="init();">
<div id="service" style="behavior:url(webservice.
htc)"></div>
<!-- here for further testing - IF I EVER GET
THERE!!!! -->
<BR>Enter first Value <input type='text'
id='ip1'><BR>
<button>Call Hello User</button>

</body></html>

##################################
##########################

thanx before..
Yudi

>Yes it is. I've used it extensively. Can you post the code you are
>using ?

Signature

ibnu_ws

Tasos Vogiatzoglou - 01 Dec 2005 18:33 GMT
service.useService("http://localhost/nusoap/server.php","hello");

where is the WSDL ?
yudi - 02 Dec 2005 05:19 GMT
sorry  I'm  the beginner in studying Webservice..
so must it be in WSDL form?
can you help me to create Webservice in WSDL form?
I use NuSoap to create webservice and try to access it from client side using
webservice.htc
Thanx

>service.useService("http://localhost/nusoap/server.php","hello");
>
>where is the WSDL ?

Signature

ibnu_ws

Tasos Vogiatzoglou - 05 Dec 2005 08:12 GMT
WSDL stands for Web Service Definition Language. It's an XML file that
describes the types and methods exported by your webservice.

In order to create a proxy (in whatever language you want) to call a
webservice, you need this WSDL xml file.

Maybe you should try something like this

http://localhost/nusoap/server.php?wsdl in your browser to see if an
xml file is returned and then try to put this URL in the webservice.htc
useService method.

Tell me if that works,
Tasos.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.