0

I want to develop mobile apps based on HTML, JS. It must work on any device etc iphone, ipad, android and windows phone... I must use JAVA EE on server side. First I choosed Dxtreme. after I learned dxtreme, it is possible REST Service using ASP.NET Web API. But it is inpossible on Java EE. following error :

But call along @POST, @PUT and @DELETE methods throws error "XMLHttpRequest cannot load http://www.restserver/Service/item. Origin http://www.localhost:51140 is not allowed by Access-Control-Allow-Origin".

I believe there must be something that people must be using SOAP or REST Service on Mobile.

Which mobile framework is it possible ?

Please help me.

Thanks.

2 Answers2

0

have You read About Phonegap?U can use phonegap to build application that can work around different Mobile platform.Its uses HTML5,CSS3,Javascript.Hope this helps you......

Sharad Mhaske
  • 1,103
  • 9
  • 19
0

Generally, people access web services using RESTful interfaces on the server end. You can create that with ASP.NET Web API and many other server side frameworks of course. Your error, I'm guessing, but not sure, is from your client application. If I'm correct, you are probably running some simulator or the app within a browser client, and not one of the mobile framework simulators, and are running into the problem where the browser restricts your access to services on systems other than the site your started with. I.e. if you got to myboringwebpage.com and try to look up something on api.twitter.com within the app, the browser will stop you unless you add certain things to your web server/page telling the browser that that is OK. Look up "CORS". With Icenium, if you use the browser development environment "Mist" you will get those issues. If you use the Windows environment "Graphite" there is no such restriction. If you use the Intel HTML5 XDK at http://html5m.com/, it runs some process to get around those issues, while running a simulator in a browser. If you end up building PhoneGap apps, which you can using Icenium, appery.io, Intel HTML5 XDK, PhoneGap Build and others, the built app, installed on the phone, will not be restricted as an in-browser "app" would. However, I had problems with the Intel framework's XHR code handling all the different methods. Sorry this probably doesn't cover everything you need - you'll have to live and learn a lot of this.

JustTrying
  • 764
  • 6
  • 11