문제

we made a HTML5 mobile app, & now we are creating a IOS native App. We want the IOS app to call methods on the Java servlet (with stripes) (running the HTML5 App) so that we can use the same behind-the-scenes logic. Do we need to setup a web service to do this?

I.E we would like to just call the existing Stripes action beans from IOS (as they are already set up to receive ajax requests, but will this violate the cross-domain law)?

Thanks!

도움이 되었습니까?

해결책

Cross-domain isn't an issue if you're making requests from a native app, so it should be possible to make requests to your AJAX ActionBeans directly.

다른 팁

You can directly call the logic by using API and get the response. Do servlet mapping to the url pattern you need. then in servlet extend the HttpServlet and override doGet and doPost method, which has HttpServletRequest and HttpServletResponse as input parameters, which can be used to communicate with your mobile app.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top