Reputation: 3960
I currently have a mySQL database and want interact with it using OData.
In other words, I want to expose the data in this form: http://services.odata.org/Northwind/Northwind.svc/
I've found several tutorials on how to do this (for example, http://msdn.microsoft.com/en-us/vs2010trainingcourse_buildingappandservicesusingodatavs2010_topic3.aspx) if I have Microsoft Visual Studio. But I'm a mac girl. :(
I've also looked at the libraries at the odata homepage (under libraries, and then mysql). But I can't get them to work.
Is there any easy SIMPLE library that can handle this for me?
Thanks so much for the help!!
Upvotes: 19
Views: 24273
Reputation: 338
Here’s another alternative for you. Using Skyvia is a no-coding, cloud solution to expose your MySQL database as OData.
Here’s how:
First, create a connection to your MySQL database.
Then, create an endpoint. A wizard will guide you through the rest of the configuration.
Select the MySQL connection you created earlier and select the tables you need. Then, configure security. Finally, an endpoint URL will be provided for you.
That’s it. For more details, check out this link.
Upvotes: 1
Reputation: 3960
I've figured out how to do it - using odata4j. I've documented my steps below in case anyone else wants to do something similar.
You will need to:
Detailed steps are below:
At this point, right-click the project and select Build Path > Configure Build Path. Add the following "External Jars" from your Odata4j archive file.
Now edit the code in NorthwindJpaProducerExample in the following ways:
And then you have OData!
I ran in to a couple problems while following these steps and will document them here in case you have them also.
Not SUPER easy, but a lot better than a 70+ page manual.
Upvotes: 22