•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 423,353 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,153 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our RSS, Web Services and SOAP advertiser: Programming Forums
Views: 1173 | Replies: 1
![]() |
•
•
Join Date: Sep 2006
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All,
I have just converted a few projects (Web Application, Web Service) to .Net 2005. The web application calls the web service using javascript from the client side.
I am getting Error 401 - Unauthorized Access. I understand how to get around this error on the server side (i.e. PreAuthenticate and set credentials to default credentials), but can't seem to get it working client-side.
Unfortunately, I cannot move this code to the server side - my dev manager wants it where it is.
Here is the javascript call:
PBService.useService("http://MyServer/PBWebservice/PBWebservice.asmx?WSDL","retVal");
PBService.retVal.callService(ParseXML, "MyFunction", document.getElementById("cnn").value, ID);
where cnn and ID are being passed to the web service as parameters.
Thanks for your help,
Rachel
I have just converted a few projects (Web Application, Web Service) to .Net 2005. The web application calls the web service using javascript from the client side.
I am getting Error 401 - Unauthorized Access. I understand how to get around this error on the server side (i.e. PreAuthenticate and set credentials to default credentials), but can't seem to get it working client-side.
Unfortunately, I cannot move this code to the server side - my dev manager wants it where it is.
Here is the javascript call:
PBService.useService("http://MyServer/PBWebservice/PBWebservice.asmx?WSDL","retVal");
PBService.retVal.callService(ParseXML, "MyFunction", document.getElementById("cnn").value, ID);
where cnn and ID are being passed to the web service as parameters.
Thanks for your help,
Rachel
•
•
Join Date: Jul 2008
Posts: 21
Reputation:
Rep Power: 1
Solved Threads: 1
PBService seems to be a server side component and if so, you will not be able to use it in a javascript.
Instead you can use the XMLHttpRequest with javascript (AJAX to be precise) object to post date to your webservice and parse the response.
Search for XMLHttpRequest and you will get tonnes of code samples.
Instead you can use the XMLHttpRequest with javascript (AJAX to be precise) object to post date to your webservice and parse the response.
Search for XMLHttpRequest and you will get tonnes of code samples.
RaTri
My Cricket Community
My Cricket Community
![]() |
•
•
•
•
•
•
•
•
DaniWeb RSS, Web Services and SOAP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
adult advertising article blog browser browsers community dani web data design development domains firefox forensic google help html internet javascript legal linux marketing math michael knight microsoft mobile mozilla multimedia news opera php privacy registration report research search security seo sex software survey technology video w3c web web development webmaster xml yahoo youtube
- clickmanu.com (Windows Vista)
- Questionaire with analysis (JavaScript / DHTML / AJAX)
- hacktool.rootkit / backdoor.generic2.ppu issue (Viruses, Spyware and other Nasties)
- PHP .tpl format template help! URGENT! (PHP)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: websphere /apache /tomcat security
- Next Thread: Accessing .NET webservice using SOAPpy.


Linear Mode