Pavan Kumar Mantha [https://community.jboss.org/people/manthapavan] created the 
discussion

"Re: EJB3 as a server, android as a client"

To view the discussion, visit: https://community.jboss.org/message/764489#764489

--------------------------------------------------------------
Hi Li Yan

once you have developed the EJB component and Android Activity. You can code a 
Servlet that will internally call EJB from Android you are free to call Servlet 
using HttpURLConnection Class in the API.
pass the parameters to the servlet and from servlet pass them to EJB and start 
your Business Logic.

                    String urlString = " http://projectcontextpath/servletname 
http://projectcontextpath/servletname";

            URL url = new URL(urlString);
            URLConnection connection = url.openConnection();

            try {
                HttpURLConnection httpConnection = (HttpURLConnection) 
connection;
                httpConnection.setRequestMethod("GET");
                httpConnection.connect();
                        }catch(Exception e){

                              e.printStackTrace();
                         }

Hope This helps you. Happy Coding.
Thanks.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/764489#764489]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to