I do a mobile application which the user can use it get the required place’s number. The user must select the appropriate city and category to get the place’s information. All the information stored in the database.
What I want to know that ..
1) What is the benefit from the web service?
2) How to connect the web service and MySQl database?
3) How to connect the web service and mobile application to get the information from the database?
1) Benefits. You didn't mentioned other options, but if you are talking about some custom server-side implementation, the benefits are numerous:
It's easy to connect to web service from J2ME.
Multiple connection sessions at one time.
You can use web service from different applications and different technologies.
No issues with authentication and authorization.
You just call method from ws and in response you get easy-to-parse XML.
2) Web service - MySQL:
You have to create a Tomcat or IIS web service.
From web service code connect to MySQL, call a query and return the result.
For Tomcat and Java web service:
Getting started with Web Services Using Apache Axis
Developing and Deploying Java Web Services with MySQL on Apache Tomcat and Axis on Windows
JDBC for MySQL
For IIS and C#/.NET web service:
CodeProject:Your first C# Web Service by Chris Maunder
How to connect to MySQL 5.0. via C# .NET and the MySQL Connector/Net
3) J2ME - web service (with JAX-RPC)
1. generate stub from web service WDDL using J2ME Wireless Toolkit
2. add stub to your project, import stub namespace, set connection properties and call stub methods
How to build and run a J2ME Web service application?
Web Services APIs for J2ME, Part 1: Remote service invocation API
Related
I'm new Java developer and I'm developing a stock management desktop application with JavaFx and Spring Boot.
The application is supposed to allow multiuser connection. This meant, the same application will be installed on many client desktops (in a LAN).
All client will use the same MySQL or SQL server database.
I thought about a solution, but don't know how to implement it:
- Installing the application will generate a custom config file which will contain the database and hostname url so that we can modify it with the hostname, username and password... etc.
Please help me.
I am trying to make a Data Monitoring with Mobile App.
I have a mysql database and i am planning use Node.js server.
My project:
Node.js server connect to mysql db.
Mobile apps connect to node.js server and when the new data add to mysql, node.js server send to data mobile apps using restful service.
Is it possible to communicate between node.js server and firemonkey mobile client apps? (I' ll build mobile apps via firemonkey - Delphi)
The reason to use push notifications, is so that your Mobile app does not waste resources to maintain constant connection to the server awaiting for new data, whether it is a web socket or a check for new data.
Keep in mind that Push notifications code might be different for Android and iOS platforms.
I'm trying to connect to an existing MySQL DB from Lightswitch RTM through a WCF RIA service.
I did the following:
Install MySQL connector version 6.3.7 from MySQL developer zone on my development machine. The lastest version 6.4.3 does not seem to work and gives an error "Out of sync with server" when establishing a connection from within Visual Studio.
Test the connection from Visual Studio by creating a new data connection, selecting MySQL database as provider, and providing the MySQL server IP address, the user name and password.
This works and the DB shows up correctly.
Then I followed the tutorials here to use create a WCF RIA service:
Add a new project to the solution based on the template WCF RIA Services class library.
Add an ADO.NET entity data model to the WCF RIA Web project and using the wizard connect it to the MySQL database. The generated connection string is
metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=10.192.xx.yy;User Id=xxxxxxx;database=projet;password=xxxxxxxxxx;Persist Security Info=True".
Add a domain service to the WCF RIA Web project.
This works correctly. The entity diagram shows the three selected tables of the database with all fields.
Then I connected the WCF RIA service to lightswitch following this tutorial here:
In the Lightswitch project, create a new data source and attach it to the WCF RIA service
Add a reference to the WCF RIA Web project and select the required data source objects. This works and the data source objects are correctly imported.
Finally copy the connection string from the WCF RIA Web project file App.config to the file web.config in the server generated project of the Lightswitch project. The line is:
<add name="b70821ef-..." connectionString="metadata=res:///Model.csdl|res:///Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=10.192.xx.yy;User Id=xxxxxxx;database=projet;password=xxxxxxx;Persist Security Info=True"" providerName="System.Data.EntityClient"/>
The solution can be built without errors. However, when running the Lightswitch application, the details screen for the MySQL table only shows a red cross and indicates that it cannot load the data.
I suspect that the connection string pasted to web.config is wrong.
What is wrong/missing in the above approach or how can I isolate and debug the problem?
Follow this post.
http://lightswitchhelpwebsite.com/Forum/tabid/63/aft/89/Default.aspx
For me it was the solution-> see the last point about config of coonection string
regards
I'm attempting to write a Windows Phone 7 application which needs to connect to a remote data source, in this case it's a MySQL database on a Linux server. I'm not able to move this over to MSSQL, nor to build any kind of windows-based solution (like a WCF web service on the server).
Is there a way for me to use my MySQL database from my Windows Phone 7 application? The MySQL assemblies don't seem to work on the phone. If not, what would the best solution for me to use this database from the phone?
You could build your self a service which would send you json or xml. this can easily be built using mono, python, Ruby, php or any technology that you are comfortable with.
You can build it in a restful manner where all you have to do is call urls in a HTTP GET to retreive data which you handle with the services.
and use the HTTP POST to submit changes to your service.
you can then from WP7 make calls to this service and consume the data.
WP7 does not support sockets at the moment. So your best bet is transfering your payloads over HTTP.
As I mentioned before, if you have access to the machines configuration. You could run Mono which isn't too far off of .Net in terms of language and functionality.
further more, from the phone you can use the Rx library to make these calls Async and keep your application responsive.
I have a basic hosting package that gives me access to create a MySQL database. I can of course host silverlight applications on any site. But how can I work with a database from within Silverlight? I cannot run any service on my hosting provider, they only allow php or perl scripts.
You can use the C# webclient to make HTTP calls to a PHP page hosted on the server. The PHP page can proxy queries/results between the silverlight client and the mysql database.
remember, just because it's not a SOAP/WCF "service" does not mean that it's not a web service. Look into PHP based REST solutions for some nice alternatives that can easily be invoked via silverlight:
http://www.bing.com/search?q=PHP+REST
Edit: As #Spencer Ruport correctly points out in the comments, you of course have to be wary of the fact that the web service will be exposed to the public, and anyone can easily sniff the http traffic between your silverlight application and the server. This enable them to call your service directly so be sure to think about authentication and what it means in the context of your app/data
You can use the WebClient class in silverlight to communicate to a php service. Here is the first google result I found: link