I have two systems to integrate: 1)desktop application (Java6) and 2)web-application (HTML,JS). I want first application to share some services to the second one. How could simply I do that ? I want some simple solution.
Thanks!
Expose them as standards Web Services or RESTful web-services
For an application to serve services, it should start server socket on port and listening on it. Or it should be using webservices. JDK6 comes with WebServices support. May be you can look at it.
Related
I am trying to develop a simple database application, I wish to use RMI technology for this. What I need to know is, are there any common frameworks for developing RMI applications or do we have to develop the server and clients from beginning?
Maybe you should take a look at the: Remoting and web services using Spring. And there you have simple example of this approach.
Hi guys is there a way to self-host a web service in Java just like WCF?
Jersey using Grizzly embedded within it would seem like a good fit for your needs. It wouldn't require and outside application server and would be fairly lightweight to get setup. You can just read the Jersey getting started documents to get going with that exact path:
Jersey User Guide
If by self-hosting you mean generating a web service endpoint for invocation, there are a number of ways to go on this, depending on your potential deployment environment.
I'd start off looking at Oracle's JAX-WS implementation, which includes RESTful capabilities. If you want to run a relatively simple stack, you could use Apache Axis2. And then JBoss has JBossWS, which can run standalone or in the JBoss Application Server. I'm pretty sure most of the major application server engines have a Web Services component as well.
I have a web service that is using:
Java (familiar)
SOAP (new to me)
JBOSS (new to me)
The web service is currently unsecure. My task is to make it secure using https (ssl or tsl).
I am new to web services and web things in general. In the last week have gone through a tone of literature. Much of it which I think was not relevant to my project. I think that I need two things:
A pretty basic tutorial on web services (java specific)
A tutorial on making web services secured
Here are some of the tutorials I have gone through already:
SO Answer - In-process SOAP service server for Java
How to make a web service server.
Does not have instructions for the client.
Also does not specify what should happen so I am not certain that I got the propper result when navigating to the URL.
An Introductory Tutorial on Web Services, Java and XML
Pretty good description of lots of xml things and how messages are passed. Not certain but this seems more low level than what I need
Three Minutes to a Web Service
Good tutorial but in the second step one of the commands did not work.
I think that this may be because the tutorial is really old and maybe my jdk is differnt or something like that..
You can check out these frameworks
Apache axis
Apache cxf
The web service is currently unsecure. My task is to make it secure using https (ssl or tsl).
If it's just about (one-way) SSL, then this question doesn't have much to do with web services actually. It's more a web server or app server configuration issue. For JBoss, see SSLSetup or, if you are using Apache for the SSL encryption, see Apache SSL/TLS Encryption.
I would guess that you need to look at JBoss's documentation for how they handle security. Maybe this would help:
Chapter 8. Security on JBoss
how hard is adding a basic web services interface to an existing java server application without having to turn it into a .war, or embedding a small web server like jetty?
say, xml-rpc instead of more modern approaches, if it helps.
if not too hard, can you suggest a starting point?
thank you in advance :)
It sounds like you're asking for the impossible: expose an HTTP service without plugging into or embedding an HTTP server!
Unless you want to reimplement what Jetty already does, I'd reccommend using Jetty as a library. That way you don't need to conform to the more awkward aspects of the Servlet spec. E.g. your servlets can have real constructors with parameters.
There is also a simple HTTP server implementation in JDK 6, but it's in the com.sun namespace so I'd avoid it for production code.
Check out the Restlet API which provides a painless way to implement RESTful web services that can run inside a web container or standalone.
I don't know what you are doing, but what about rmi?
RMI # stackoverflow
Spring-WS has the facility for using JRE 1.6's embedded web server, if that's an option for you. Spring-WS gives you a very nice SOAP server layer, if that's what you're after.
If not, then an embedded Jetty instance is probably the best idea.
Does anyone know of a sample distributed application (.NET or J2EE) using RMI or Web Services?
As often, Sun has an excellent tutorial on RMI:
http://java.sun.com/docs/books/tutorial/rmi/index.html
A RMI example: link
A Web Service example: link
Hope it helps
Here's a simple solution:
BEA Weblogic has a sample web application called MedRec that I've been using for a while. This sample comes with a .NET client built in called CSharpClient that connects to MedRec via Web Services. I was thrilled that I didn't need to install anything else.
In Weblogic 10 the client can be found in the folder "bea\wlserver_10.0\samples\server\medrec\src\clients\CSharpClient".
Another powerful bare bone working RMI example that loads dynamic objects from the client to server and execute it there then return the results. This can easily expanded for full featured distributed computing environment.
http://www.ningzhang.info/example.java.rmi.ComputeEngine