开发者

iphone application communicating with a java servlet on a WebSphere

Here is a Generic question:

I wish to build an iPhone application that will communicate with a Java Servlet installed in a webSphere, my iPhone application will ask the servlet to perform some SQL queries in the connected DB, and will receive the answers accordingly.

Pl开发者_如何学运维ease help to understand the following questions:

  1. How should i send a request to the Java Servlet to perfrom the actions needed? (to operate the methods on the servlet?)

  2. How should i receive the results back to my iPhone app? (Strings? XMLs?)

Any help will do.


I think the web service is the more standard way of doing this like SB said. But if you want to use a servlet instead you can pass in parameters to the URL eg

http://mysite.com/myservlet?parameter=inputdata

You could then call specific methods based on the parameters. Data can be returned by writing xml or csv directly into the response by calling HttpServletResponse.getWriter()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜