How To Provide A SPARQL Endpoint Using Tomcat 7.0.27 - web-services

So I got this webapp running on a tomcat 7.0.27 which manages a large RDF/Ontology model with Jena, and what I want to do is provide a SPARQL endpoint to enable clients to query this model. Currently, there's a SOAP webservice where a SPARQL query can be embedded in a (SOAP) message, which is a legacy implementation I'm supposed to modernize.
How does one go about providing a SPARQL endpoint? It seems just an empty buzzword to me. What's the difference between a (SOAP) webservice and a SPARQL endpoint? I've been reading about Joseki and ARQ, which apparently (in combination?) provide SPARQL endpoint functionality, but I'm not sure whether I need it, since most people who are talking about it on the web are using older tomcat versions (5/6).
Can somebody explain to me how to provide a SPARQL endpoint or nudge me in the right direction in terms of further resources?

Tomcat is just a servlet container. It runs web applications. A SPARQL endpoint is a particular kind of web application that you can run in Tomcat.
Fuseki (the successor to Joseki, and, like Tomcat, a project of the Apache Software Foundation) is the most popular choice.
You say that your RDF model is “large”. Depending on how large it is (that is, does it comfortably fit in memory or not?) you may need a persistent RDF store as well, such as Apache TDB (which is designed to work with Fuseki) or OpenLink Virtuoso (which is its own webserver, so you wouldn't use it together with Tomcat and Fuseki but as a standalone server).

Related

Apache CXF vs Apache Camel

our problems:
a sets of existing applications (recruiting, purchasing, payroll etc..) communicate outside through various ways (email, pdf, csv file, webservices etc)
a new ERP system we gona use(SAP or Agresso) communicates the outside through web services
we need integrate the existing systems with the ERP system, and apply some rules
my questions:
can we do the job by only using CXF?
is CXF a subset of camel
or perhaps to achieve what we want, we have to combine those two?
also Mule doesn't give a specific price for the cost, anyone had experience with MuleSoft?
thanks for time!
The comment by BMW is very true.
However to answer you a little more closely.
CXF is a services framework. It allows you to create SOAP, REST and even CORBA services. So yes it can help you create and consume web services.
CXF is a component used inside Camel, CXF is not a subset of camel. Camel will allow you to provide and consume web services using CXF.
Camel is a EIP(Enterprise Integration Pattern) framework which allows you to do things such as route a file to a web service. Or expose a SOAP service that talks to JMS queues etc. I know Camel also has a SAP component.
Thus Camel orchestrates the various components into routes that allows various systems to integrate.
In short you will use Camel with the CXF and other components to resolve your problems.
I have not used Mule yet but I can tell you this. You can host your Camel routes on Apache Karaf and create your own light weight "ESB" so no need to use Mule ESB.
Another alternative would be Fuse ESB and also Servicemix. THey are also capable of hosting Camel route.
I currently have several camel routes that expose web services and consume various data from files, rss feeds etc hosted on Karaf and it works like a charm.

Servlet vs Webservices

Webservices like REST, SOAP which provides services which is made available for web application, as we know it can receives values as JSON, string, XML etc either by POST or GET and in the same way it can return data as JSON, string, XML etc.
The same thing can be done via servlet, as servlet can receive data as string, JSON etc either by POST or GET and in the same way it can return data as JSON, string, XML etc.
We need libraries based upon the web service we use, such as SOAP or REST, servlet libraries are almost in-built int it.
So whats the difference between Servlet and Web Services? Which one is more faster?
Can anyone please tell me some solution for this.
This is the kind of discussion that can lead to a lot of flame wars on semantics, but I would say web services are simply a method of communication utilizing standards to allow different technologies to be interoperable. Like an English-speaker translating between a French- and German-speaker.
Meanwhile, the way to implement web service endpoints (the places that serve responses to your requests) in a Java web server is with servlets. So servlets are simply a technology for implementing web service communication (in the JVM).
When you look at JAX-WS and JAX-RS, the frameworks that implement these standards are simply creating abstractions on top of Java's HttpServlet (typically) to make SOAP and REST web services easier to build by taking care of a lot of the low-level details.
Hope that helps.
where are a lot of difference between servlets and web services, but the main is:
in the web development servlets is the front end object and work in the web container, Web services can have different roles: as backend or as middle layer object.

What is the best approach from Object Modelling to code generation for Web services server and client side entities?

I want to create an Object Model (may be in UML?) and then use some tools to generate entities in JAVA (for client side) and in PHP (for server side).
Primarily, I wish to write a JAVA client side application communicating with a PHP based web services using REST and JSON.
Idea is to avoid writing (and then maintaining), object entities separately in java and php.
JSON serialization of entities would be a big plus
Please suggest tools/approach that I could take to achieve the objective.
you need to implement the Apache solr server
Solr client
Ibm developer works on Solr
Check php manual about the service
Wiki solr

EJB3 Based JAX-WS Web Service authentication on Weblogic

I'm just trying to develop an internal web service for a news agency which is connected to a MySQL database where all the authentication/news data remains. The purpose of all of this is to generate an XML version of the article/ list of articles depending upon the client's subscription, so it can be shown by a mobile frontend that I am working on, using Java Server Faces.
Up to date, I have generated and annotated JPA entities from my database using Eclipse, as well as created a Stateless Session Bean so it can be published as a web service. All of this works absolutely fine, so it's time to take it to the next level, but I don't know where to start.
I managed to set up a custom authenticator provider within WebLogic using my database, but don't really know if that's handy and where to go next.
I also had a look on OpenAM but thought there should be something native to either JAX-WS or WebLogic.
How could I approach this? The requirements as far as I can see would be:
One time authentication.
Using username/password stored on a MySQL table.
Authentication data provided within the SOAP message? (The client would log in through the JSF frontend, sending that data to the WS to check if it's valid).
Thanks!!!
p.s.: I did Java a long time ago, so I've been "disconnected" from the latest technologies/methodologies, so although my question goes quite straight to the point, if you think there would be a better way to accomplish what I've done so far just let me know, please.

Convert custom API to Ruby on Rails ActiveResource

I have a set of embedded devices that run software written in c++. The API to communicate the devices is simple: get/set/acquire parameters and signals.
I'd like to implement common web application to access all of the devices from a single point.
My idea was to add XML RPC interface to devices and then use ActiveResource to access devices from the web server. This combination doesn't seem to be used at all in practice.
I'm free to choose any protocol inside the devices. What are your recommendations?
If you're already considering XML RPC I'm assuming you have some sort of web server running on the device. I would probably choose a RESTful web service over XML RPC. If designed carefully you could have corresponding services on your Rails app.
For example:
http://somedevice/signals.json - gets all signals
http://yourrailsapp/somedevice/signals.json - gets somedevice's signals; you could use an id instead here if that makes more sense (http://yourrailsapp/devices/1/signals.json).
You probably won't find much XML RPC stuff in the Rails community. Rails itself really pushes you towards RESTful web services. Specifically a resource-oriented RESTful architecture. There are great books out there about it but it comes down to using http methods (get, put, post, delete) instead of passing parameters and then some intelligent URLS.