• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML calling Java WebService

 
Shankar sanjay
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When loaded via the file protocol, Ajax cannot be used.
 
Shankar sanjay
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the reason is my mobile app is pure html pages and wanted to call some web services.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic