how to publish web services and database - java

**..I creat database mysql and web service by eclipse and android app and I publish it on tomcat 7 on local network.
I need to know if it can be publish my database and web service over the internet.
i.e( I need my android app access tha database and webservic online) .
i am using tomcat 7
android 2.3.3
eclipse juno**

I don't know what "publish over the internet" means. I'm guessing that you want to deploy your web service on a server where it's visible on the internet, and you want to give that service access to a MySQL database in a secure way but not let unwanted users get at it.
You could try Amazon Web Services for a low-cost start on this. You'll just pay for what you use that way. Set up an EC account with them and install Tomcat and MySQL.

Related

How to have Azure App Service Tomcat to forward all 80/443 traffic to JBoss running on the same App Service

First of all, my Azure subscription is through a Cloud Service Provider, so I don't have access to certain features (i.e. cannot install a marketplace tomcat, only the native one; with the native Tomcat I do not have access to server.xml, which I need for some traffic rerouting solutions - modifying Connectors).
The basic need is to have IBM's B2B Client app running and sending files back and forth. It comes with its own JBoss, and all you do is put the app in a directory on Azure App Service and run the executable. This is already not a problem, and I have it starting with the app service using a WebJob.
Problem:
App Service only has two inbound ports open - 80 and 443, and they are both being used by Tomcat.
So I need to either:
1) Disable Tomcat, and only have JBoss running and listening on those ports without conflicts;
or
2) Have native Tomcat forward traffic to JBoss.
How can I do either of those in this environment, and are there better solutions for this problem?
According to the subsection Network endpoint listening of the wiki page Azure Web App sandbox of Kudu for Azure App Services, you couldn't use the other ports on Azure App Service besides 80 & 443 to access the application server from the internet. So if you can't create a JBoss AS instance from Azure Marketplace, per my experience, I think the only way is that creating an Azure VM instance to install a JBoss AS instance to deploy your specified Java Application.
Hope it helps. Any concern, please feel free to let me know.

Where can I deploy my java REST webservice for free so that I can access it remotely?

I have developed a REST web-service in Java interacting with a MySQL database.I want to deploy the web-service and the create a database at a server so that I can invoke it from an application.I tried Microsoft Azure but was unable to get it done.Where can I find relevant information for this?
I had similar problems with a MySQL database using the third party option in the Azure Marketplace from ClearDb. What I ended up doing was switching my database from a MySQL instance to an Azure Database Instance (Subset of SQL Server's features.) This worked perfectly for me! I was able to query from my database feed data to my api, and access the API through my Azure Web App.
I understand this may not be an option for you, however, Digital Ocean is a great cloud hosting option (with scaling similar to Azure, although not as good in my honest opinion.) You can set up a Linux Environment with a MySQL Server and JVM and serve your whole API through there. Best of Luck!
#coderden, According to your description, I think you have been deployed your Java Application on an Azure WebApp. Then when you created a MySQL database on Azure for connection from the Java webapp, please make sure the webapp & mysql instance created in a same resource group and note the connection string of MySQL on Azure.
As reference, please see the article to try again although it's for PHP, the steps are the same for Java.

How to import my own android application project into IBM Bluemix?

Can someone help me use the new PaaS - IBM Bluemix?
I faced a dilemma that I want to import my android application project which was developed on my local computer into the IBM Bluemix and run on the platform ,but I didn't know how to use it.
I have search on Internet about this ,I still cannot find the solution.
Does IBM Bluemix support this kind of service?
I just want to debug or test on this cloud platform.
You don't deploy an android application to bluemix as the android application exists on the actual mobile device (or emulator) and not in the cloud. What Bluemix offers you is the ability to have services running on the cloud that can work with your android application on the mobile device. This is called MBaaS (Mobile Backend as a Service).
For example you can have a MobileData service that allows you to store data in the cloud that your mobile device(s) (iOS, android or web) can access (think of having a game save that can then be picked up by another user device to resume playing at the same point). Bluemix provides an SDK to access these services on Bluemix from your android application source code.
IBM Bluemix is a cloud platform where you can build web applications / mobile back end services utilizing a wide range of services.
Lets say you are building a weather app. This app will require two components
1. a server side web application
2. a mobile application (lets say android)
The server side component does only one thing, it constantly collects weather forecast from multiple data sources (eg www.data.gov, forecast.io etc). This app has restful apis exposed to internet which can be invoked by mobile app to request weather forecast for a particular geo cordinates (E.g http://weatherapp.mybluemix.net/getForcast/122.20,-100.20). The server app responds to get requests in JSON format.
The Mobile app, detects current location's geo co-ordinate using mobile phone's GPS and request weather forecast of the location from server component using a HTTP get (GET:http://weatherapp.mybluemix.net/getForcast/122.20,-100.20) . The mobile app then parse the response JSON data and display information on a neat elegant screen.
If you want to port this app onto IBM bluemix, you can build the server component using, NOde.js or JSP or PHP etc, use mMongoDB,mySQL DB or Postgresql databases, use twillio for text messaging/mms or voice call, use IBM Push for notifying user about weather forecast etc.
Using Android SDK, IBM Cloud services SDk (Mobile data, push notification etc) and sell it on Google play.
Hope this helps
-Keep coding-
We have sample applications for Bluemix which can be deployed on Android. See the "boilerplate" app in the Bluemix catalog named "Mobile Cloud". Head to the Bluemix console [1], click on "CATALOG" at the top. The Mobile Cloud docs [2] reference several applications for iOS, Android, etc with server-side pieces can be deployed on Bluemix.
[1] https://bluemix.net/
[2] https://www.ng.bluemix.net/docs/#starters/mobile/index.html
you can refer developerwork article to get started to use Bluemix services for your andriod app.
First ,you need to login to bluemix and create a new account in ther,
There u have create an application in ur dashboard,where the runtimes in node.js,and add the following services namely,push,mobile data and mobile security application.
Then u need to download the android SDK available in it and add to ur android app all the jar files in the libs folder.
U need to save the app id,secret id and the link in order to connect it from local android app to bluemix.
Hope this was useful,if any doubt further,let me know

How to retrieve data from MYSQL database hosted on Azure VM?

I'm a software engineering student and I need your help.
I have developped a dynamic web project (Java ee/JSF/Hibernate/MySQL/Apache Tomcat/Eclipse) and I have deployed it on windows azure. I actually created a virtual machine where I installed MySQL and Tomcat.
My problem is:
How can I retreive data from my Database hosted on the VM to process
some actions on?
I thought about REST WS project from wich I will invoke some services, but I don't know what services are exposed or how to do the connection to DB.(I need something free)
I'm blocked and your help will be more than appreciated .
Best regards.
One option is, instead of hosting the database on the VM, You could create Mysql on Azure as shown here - http://azure.microsoft.com/en-us/documentation/articles/store-php-create-mysql-database/
Also, now Azure Websites now supports Java Web Applications - you can deploy your Tomcat Application to Azure Websites as shown here - http://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/

GAE or just simple Tomcat Server, which should I take?

I have been working on a small Web RESTfull APP that will provide urls to create user to a database and offer signing procedure (validate email/password against database). The target client to this web app will be Android devices, from my mobile application. Once the mobile app invokes the AP and response(in JSON format is received), I parse the response, and the user proceeds with the rest of the mobile app.
At the moment I am thinking deployment. For my development, the app is deployed to a Tomcat server but I know war archives can also be deployed to Google App engine.Being a newbie in webapps, I kindly need your suggestions.Should I deploy to a Tomcat server or to Google App Engine? Is any of these methods better than the other and why?
Thanks.

Categories

Resources