| Author |
HTML calling Java WebService
|
Shankar sanjay
Ranch Hand
Joined: Sep 14, 2009
Posts: 107
|
|
Hi,
I am using soapclient.js (java script file from http://www.codeproject.com/Articles/12816/JavaScript-SOAP-Client) and my html works IF I DEPLOYED IN SERVER. I mean that I can able to invoke my java web services using deployed html page.
The problem is if I open that HTML file in IE using file System(like go c:\) and call web services(using html button) its not working.
My doubt is the client should be running on any web/app server? anyone has tried like this?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
When loaded via the file protocol, Ajax cannot be used.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Shankar sanjay
Ranch Hand
Joined: Sep 14, 2009
Posts: 107
|
|
hi Thanks for the reply and for me, its new to hear that ajax cannot be used in file protocol system.
after going thru the soapclient.js file understood that based on async Parameter, it decides that whether asynch(ajax) or sync call. If I pass async parameter as false, still I am facing the same problem.
I would like to know is there any sample java script code(not Ajax) which will use invoke web services.
Please help me on this
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Whether it's asynchronous or not, the rule is the same.
Why do you need to use the file protocol? There's not really any valid reason.
|
 |
Shankar sanjay
Ranch Hand
Joined: Sep 14, 2009
Posts: 107
|
|
|
the reason is my mobile app is pure html pages and wanted to call some web services.
|
 |
 |
|
|
subject: HTML calling Java WebService
|
|
|