Lot of SO Answers are saying that SOAP webservice is not good using javascript.but the following URL tells that it is possible.butis it possible through jquery using cross domain policy in for SOAP? any help please? I am working on HTML5 with javascript for mobiles,not in server side.
jQuery does have a SOAP project you can use, if you are interested.
http://plugins.jquery.com/project/jqSOAPClient
It is currently in beta, but it will get the job done.
Related
Ive been looking around and i cant find an answer for creating a Pure JavaScript Proxy server without node.js. If anyone has an answer please comment. I’m wondering if its possible because i want to set up my own proxy server without node.js so its fully web based.
EDIT 2
So now that i know that i cant directly create a proxy server on the web, is there a way to do it in Java? (Or a similar language)
You cannot accomplish having a proxy server (or any type of server) in the browser. Reason is that proxy servers require a static host that would map data to and from the server.
You will at least need to have a client/server type architecture to accomplish what you're trying to do.
Take a read at: https://en.wikipedia.org/wiki/Proxy_server
I am developing one mobile web application.
In this, i want to call a Web Service and fetch data from their using Java Script only.
I searched a lot and try to implement some code also but it didn't help me out.
One thing is that the Web Service was made in .NET using SOAP.
So, please help me to solve it immediately.
One easy would be to create an ASP.NET Web API Http service wrapper around your current webservice and use jQuery to access it. This will be much simpler than using JS to access a SOAP service.
More on ASP.NET Web API: http://www.asp.net/web-api
I have a wsdl service and as I generate it with svcutil.exe, it gave me a .cs file. Now my question is how can I call the service with javascript for android. Where do I go from here? Any suggestions or any reference/step-by-step tutorial or a sample demo would be a great help for me. I am developing an application for android with phonegap 1.4.1, Many thanks.
The .cs file you have is just a DTO. You would need to code you Operations and Data contracts in the WCF service to make anything happen.
With javascript in mind, I would just use JQuery and the .Ajax() method for making the calls from the client side. There are tons of articles on how to accomplish that.
http://www.codeproject.com/Articles/128478/Consuming-WCF-REST-Services-Using-jQuery-AJAX-Call
http://forums.asp.net/t/1513059.aspx/1
JQuery/WCF without ASP.NET AJAX:
I'm currently working on a web application that customers can add to their webpages by adding a javascript link to a js file on my server. The application read all the javascriptfiles from my sever, but I still get an error when trying to use ajax to get data from my database. I didn't think that would be a problem because the files is on my server.
Can I fix this or do I have to make a cross-browser solution? I don't have any control over the costumers server.
Thanks in advance
Mikael
This is not possible: When you execute a remote script, it runs in the context of the containing document.
There are some popular workarounds for this:
Using an iframe, which fixes the cross-domain problem but doesn't integrate well with the remote site (e.g. no custom styling)
Using JSONP to make cross-domain Ajax requests (detailed explanation here)
Using a server-side proxy script (not an option in this scenario)
Using YQL (I'm not familiar with this but it's said to work)
The same origin policy is based on the host document not the script itself.
You need to use a cross domain ajax technique.
I'd like to send a JSON rpc to a remote web-server. The client-side of my application must be completely javascript. The choice of the client library should be independant from the json-rpc implementation on the server-side. I don't need json-over-http. Simple json objects over tcp/ip is enough for my use-case.
Thanks
You could try jsolait. AFAIR it has support for JsonRPC 1.0 over sockets.
Since you are connecting to a remote web server, you will have to use HTTP.
You can use XMLHttpRequest for this from Javascript or you can use a library such as jquery that packages it up in an easier to use API. Many Javascript libraries support this functionality.
I would use Ajax with jQuery. Dead simple.
JQuery Post Documention