-
Dec 13th, 2014, 12:54 AM
#1
Thread Starter
New Member
Consume remotely based aspnet webservice using only html jquery for mobile app dev
Hi All,
On one of our server we have hosted basic aspnet webservices. Other applications use this services and are able to get the result. Our requirement is to make native mobile app such that it can consume this aspnet webservice by using only html and jquery.
Found many solutions shown as html and webservice asmx file are in same project and has to be deployed on server, we don't require this since we want to develop native mobile app.
We have referred below article to access remote aspnet webservice,but it requires some configuration changes in web.config file of webservice which we are not planning to do. http://www.codeproject.com/Articles/...es-Using-JSONP
Is there any alternative to JSONP? Other than html and jquery what more tools/library has to be used.
Any help is really appreciated.
Thanks and B'Regards,
Vijay
-
Dec 25th, 2014, 03:20 PM
#2
Re: Consume remotely based aspnet webservice using only html jquery for mobile app de
If the website exposes all of the data and functions thru websevices, you can call that webservice from nearly any enviroment. You can simple configure the webservice to output JSON by adding this:
At the top of the asmx file, just before the classdeclaration
and:
Code:
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
Before the methodes you want to expose
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|