| | |
Web Service / Javascript Issue
Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 9
Reputation:
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:
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
![]() |
Similar Threads
- clickmanu.com (Windows Vista and Windows 7)
- 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.
Views: 2100 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for RSS, Web Services and SOAP
.htaccess 301 accept access alltop api authentication binarysecuritytoken blog card collaboration credit data development ebay email evernote flash google government highrise htaccess intel internet legal live netbeans patent paypal php podcast proxy redirect rss rssfeeds searchmonkey server service soap software swappingxmlfromflash swappingxmlnodes url web webservices webservicesecurity wiki wikipedia xerces xml xslt y!os yahoo ydn





